A convolution reuses one local rule across a grid. Its efficiency comes from restricting connectivity and sharing parameters, not from ignoring spatial structure.
Local filters, shared gradients, spatial shapes, receptive fields and the information lost in downsampling.
How this chapter is built
M3Load-bearing
The content is mathematics. Understanding is demonstrated by computation, not recall.
basics11/11what the words mean
concept2/2what to picture
theory4/4why it works, and when it does not
mathematics15/15derive it, then compute it
practice9/9build it, break it, read the papers
Five strands, not one. Mathematics is the spine; the other four are the body. A chapter cannot pay its way out of teaching with problems, nor out of problems with teaching.
A 224 by 224 RGB image has 150,528 scalar inputs. One dense output unit would require that many weights, and separate units would not share a detector between locations. A local shared kernel imposes a different hypothesis class. We compute its output, differentiate its shared weights, and track precisely what it sees and what downsampling discards.
Fig. 11 — One kernel applied at every position. Nine shared weights and one bias produce a 4×4 map from a 6×6 input.
What this chapter covers
Cross-correlation, kernels and feature maps
Input channels, output channels and groups
Parameter counts and multiply-accumulates
Padding, stride, dilation and exact output shapes
Backpropagation as accumulation over overlapping windows
Transposed convolution is an adjoint, not an inverse
Translation equivariance and its boundary conditions
Receptive-field size, spacing and effective influence
Max pooling, average pooling and their derivatives
LeNet, AlexNet, VGG, ResNet and EfficientNet
Apparatus
The mathematics this chapter leans on, held in Book 0 so it can be assumed here without being taught here. Not a gate — follow a link when a step stops making sense.
CChannels in vision; compute in FLOPs in the scaling chapters
WA weight matrix
∇Gradient operator
JA Jacobian matrix
Definitions
Definition 1Kernel
A small array of shared weights. In an ordinary two-dimensional layer, each output channel has one spatial kernel for each input channel; their responses are added.
Definition 2Cross-correlation
Multiplying a window by the kernel in its stored orientation and summing. Common CNN layers call this convolution. Mathematical convolution reverses the kernel along each spatial axis.
Definition 3Feature map
The spatial array of activations in one channel. A convolutional layer normally returns several feature maps; an activation function is a separate operation.
Definition 4Stride
The spacing between successive kernel origins in the input grid. A stride above one samples fewer output locations and changes which translations preserve the output sampling grid.
Definition 5Padding
The boundary extension applied before evaluating windows. Zero, reflection and circular padding are different functions. The number of added positions can differ on the two sides.
Definition 6Dilation
The spacing between adjacent kernel taps. A kernel of width k and dilation d spans d(k - 1) + 1 input positions while retaining k weights along that axis.
Definition 7Receptive field
The input positions that can influence a chosen output through the computation graph. Its bounding span may contain holes, and possible influence need not mean a large learned derivative.
Definition 8Translation equivariance
Shifting an input shifts its output by the corresponding amount. This differs from invariance, where the output stays unchanged. Boundaries and subsampling restrict an equivariance claim.
Definition 9Pooling
A fixed reduction over a spatial window, often its maximum or mean. Pooling usually operates independently per channel. Window size, stride and padding remain part of its definition.
Definition 10Grouped and depthwise convolution
A grouped layer splits input and output channels into disjoint groups. Depthwise convolution uses one group per input channel, optionally with several output filters per channel. A following pointwise layer can mix channels.
Definition 11Transposed convolution
The linear adjoint of a chosen convolutional map, implemented with its transposed connectivity. It distributes input values into overlapping output windows. It does not generally reconstruct the input of the original map.
Formal results
I.11.T1
Stride-one convolution commutes with translation on an unrestricted grid
For F_K(X)[i,j] = sum_(c,u,v) K[c,u,v] X[c,i+u,j+v] and translation T_a X[i,j] = X[i-a_1,j-a_2], substitution gives F_K(T_a X) = T_a F_K(X). A spatially constant bias and pointwise activation preserve this property.
What this does not promise
A finite crop with boundary padding may break the identity near its edges. Stride s preserves the correspondence only for translations aligned with that sampling lattice. Equivariance does not imply an unchanged classification output.
I.11.T2
Shared-kernel gradients sum over every window
For one stride-one valid channel, Y[i,j] = sum_(u,v) K[u,v] X[i+u,j+v] + b and upstream G, dL/dK[u,v] = sum_(i,j) G[i,j] X[i+u,j+v]. The input derivative accumulates G[i,j] K[u,v] at each participating input entry. I.11.B02 derives both and checks them by finite differences.
What this does not promise
No additional kernel flip belongs in this scatter-add rule. A different convolution convention, stride, dilation or padding changes the index map. Padding constants are not trainable input values.
I.11.T3
Receptive-field span follows the preceding sampling jump
For a sequential stack, start with R_0 = J_0 = 1. At layer l, effective kernel width is e_l = d_l(k_l - 1) + 1; then R_l = R_(l-1) + (e_l - 1)J_(l-1) and J_l = s_l J_(l-1). Apply separately to height and width.
What this does not promise
This gives a bounding span and sampling jump for local layers, not the learned strength of influence. Dilation may leave holes. Global operations, branching and boundary alignment need their own dependency accounting.
Assumptions
Each is paired with the problem that shows what its removal costs. An assumption nobody tests is a disclaimer.
The declared boundary extension and stride are compatible with the translation being tested.I.11.X03
A max-pooling window has a unique maximum when using the one-hot derivative.I.11.X05
Both channel counts are divisible by the group count, and tensor layouts match the implementation.I.11.X08
A residual addition joins tensors with identical shapes; an identity path is not a universal lower bound on the total derivative.I.11.X09
For input width 7, kernel 3, padding 1 and stride 2, the output is floor((7 + 2 - 3)/2) + 1 = 4, not 5. The explicit floor-mode layer does not silently add a fifth window.
A zero-filled boundary can break translation equivariance. I.11.X03 shifts a finite three-value input and gets a different edge response from shifting the original output.
A response moved within one pooling window may leave its maximum unchanged. Moving it across a window boundary changes the pooled map. Pooling does not guarantee invariance to every small translation.
Assigning an input gradient instead of adding contributions loses derivatives where convolution windows overlap. The centre entry in I.11.B02 receives four contributions.
Reducing spatial resolution can alias high-frequency patterns. Low-pass filtering before subsampling can reduce this sensitivity, but cannot guarantee recovery of information already discarded.