Module 3 identified the legal linear maps as intertwiners. This module specialises to the group you already use: translations on a finite grid. The theorem is that a linear map commutes with cyclic shifts if and only if its matrix is circulant if and only if the map is convolution by a single kernel. Weight sharing is not an optional engineering optimisation. It is the intertwiner equation for this group.
Setup
Let under addition modulo . Feature maps are vectors , indexed by grid sites . Translation by acts by the regular representation
A linear layer is a matrix , acting as . Write for the impulse at site (the first standard-basis vector), and for the impulse at site .
Theorem 4.1 (Translation equivariance is convolution).
A linear map is equivariant under the shift action if and only if there exists a kernel such that
for all . Equivalently, is a circulant matrix: , constant on wrapped diagonals. The free parameters are exactly the entries of (or fewer, if one further restricts support to a local patch — the usual CNN kernel).
Derivation
The argument is the impulse-response argument from signal processing, written so that Module 5 can copy it for a nonabelian group.
Equivariance convolution. Assume for every . Define , the response to an impulse at the origin. Equivariance on that impulse gives
The right-hand side is shifted by : . A general input is , so
which is . The matrix entries are .
Convolution equivariance. If is convolution by a fixed , then
where . Thus intertwines with itself.
That is the whole proof. The kernel is the first column of , transported around the grid by the group action. There is one orbit of parameters, not independent entries.
Corollary 4.1 (Two-dimensional grid).
On with translations , the same argument with impulses shows that a translation-equivariant linear layer is 2D circular convolution by a kernel . Restricting to a patch (and ignoring wrap-around, or using appropriate padding) recovers the standard CNN weight-sharing pattern: one shared filter, not one weight per pixel.
Example 4.1 (3x3 conv on a 32x32 grid).
Without equivariance, a linear map has free parameters. Translation equivariance forces the map to be convolution by a single kernel; a local support leaves nine free parameters per input–output channel pair. The reduction is Theorem 4.1 plus a support constraint. Multi-channel convolutions take matrix-valued, .
Myth: weight sharing is an implementation trick
You may choose not to be equivariant (locally connected layers, absolute position embeddings). Then free parameters proliferate and the commuting square fails. Sharing and equivariance are the same constraint, not two independent design choices.
N = 4, written out
Take and a kernel , meaning . The matrix of Theorem 4.1 is
Each row is a cyclic shift of the previous row. Four free numbers, not sixteen. The first column is itself, because . Every other column is a shift of the first, because .
Example 4.2 (A numerical residual).
Let and . Then . Shift by one site: , and , which is . For a dense matrix with the same first column but a scrambled second column, the two paths disagree. The script translation_share.py runs the same test in 2D: a shared circulant conv has shift-residual on the order of ; a dense map of the same shape has residual of order .
dense W_xy16 independent entriescirculant, W_xy = k(x-y)one value per diagonalFigure 4.1. Left: a free matrix assigns an independent weight to every (output site, input site) pair. Right: equivariance forces W_xy = k(x-y). Matching colours are the same number.
Figure 4.1 is the same fact as a picture of the matrix.
Move the shift slider: the shared circulant map’s two paths stay on top of each other, and the residual printed under the plot stays at machine zero. The dense map, with the same number of rows and columns but no tying, produces a residual of order one.
The next module copies the impulse argument with no longer abelian: the kernel lives on the group, and sharing becomes constancy on orbits.