Reuse a small filter across an image

A convolution reuses the same learned kernel across different image locations to produce feature maps.

The idea

Use the same small detector at every part of a picture instead of learning a completely separate detector for each location.

A kernel slides over local patches. Each output location is computed from the patch and the shared kernel weights. Pooling can then summarize local responses.

How it works

  1. Take a local patch from the input channels.
  2. Apply the same kernel weights to that patch and sum products plus bias.
  3. Slide according to stride/padding to build a feature map.
  4. Stack nonlinearities, pooling/strided layers, and later classifiers; learn all weights via backpropagation.

2D convolution/cross-correlation

Deep-learning libraries usually implement cross-correlation under the name convolution; the same kernel parameters are reused at all valid spatial locations.

out[cₒ,i,j] = b[cₒ] + Σcᵢ Σu,v W[cₒ,cᵢ,u,v] · X[cᵢ,i+u,j+v]

Check your understanding

Why is a CNN kernel called shared?

Answer and explanation

The same learned kernel weights are applied at many spatial locations, which is parameter sharing.

A common misconception

A convolution kernel is not necessarily an edge detector. Some learned filters may resemble familiar patterns, but the network learns whatever features reduce its objective.

Open CNN lab

Deep Learning

Build intuition for weighted neurons, shared filters, recurrent state, and self-attention before opening the full labs.

  1. One neuron, one weighted decision
  2. Reuse a small filter across an image
  3. Carry state through a sequence
  4. Let tokens build context from one another