What a Convolution Assumes
Suppose the same two-pixel patch should score +1 in the upper left of an image and −1 in the lower right. The pixels under the detector are identical; only their absolute position differs. A shared local kernel cannot represent that rule. This limitation makes the assumptions behind convolution precise.
The rule that is shared
Let be a single-channel image and an kernel. At output position , a stride-one layer computes
The short ranges of and make the operation local. Sharing appears in what lacks: its weights have no output-position indices . The same coefficients are therefore used at every valid location.
A single-channel kernel has nine weights whether the image is 32 pixels wide or 1,000. That economy comes directly from preventing each location from choosing its own local rule.
Locality and sharing are separate choices. A locally connected layer can still use a small window while assigning a different kernel to every output position. The counterexample below concerns the additional restriction imposed by sharing: identical patches are sent through identical coefficients.
Following deep-learning convention, the displayed operation does not flip the kernel and is mathematically cross-correlation. For a learned kernel, flipping the parameterization does not change the argument here.
Same evidence, different answer
Take a kernel that matches a two-pixel diagonal:
Same patch, opposite targets
Upper left
Target:+1
Shared response: 2 · row 1, column 1
Lower right
Target:−1
Shared response: 2 · row 4, column 4
The kernel returns 2 at both positions. If the task instead asks for +1 in the upper left and −1 in the lower right, fitting both examples would require
The value 2 is incidental. Replace with any other shared weights and call the resulting score . Because the local patch is identical in both examples, both scores must still equal .
More training data cannot remove the conflict. With squared error, the two examples give
The best shared score is , leaving a loss of 2. This is not an optimization failure. The layer maps the two cases to the same value before the loss is evaluated.
Changing a shared kernel changes both responses in the same way. The layer has access to the patch, not the coordinate needed to distinguish the targets.
Giving each position its own kernel would make the two targets representable, but it would also remove spatial sharing and make the parameter count grow with the number of output locations.
This is a claim about one shared local layer, not an entire network. A larger system may receive position or infer it from information outside the patch. The counterexample isolates what this layer alone cannot express.
The useful consequence: equivariance
Write for a translation by . With stride 1, on an infinite grid, or at finite-image locations unaffected by the boundary rule, the shared local layer obeys
Translating the input moves each patch under the same , so the response moves by the same amount. It does not remain unchanged. This is translation equivariance, not invariance: the layer preserves where the match occurred.
Boundaries complicate the equality because padding defines values beyond the image. A stride larger than one samples only part of the response grid. Shifts divisible by the stride preserve the simple alignment; other shifts generally do not.
What training changes
Training changes the entries of . It does not decide whether a conventional layer shares those entries across space. At the output of this layer, should identical local patches receive the same score regardless of position? If yes, sharing removes unnecessary parameters and gives equivariance. If no, the missing position must enter the calculation.