All labs

What a Convolution Actually Computes

Edit nine numbers and watch the feature map change. Weight sharing, stride, padding, ReLU, and pooling, with the parameter count next to the dense alternative.

Ch 14 14.5
Explorer
Deep Learning
18 mindifficulty 2/5

Controls

Input image
Kernel
Kernel weights (editable)

Weight sum 0 zero-sum: a difference operator, blind to flat regions.

1

Step between window positions — the cheapest way to downsample.

1

1 disables pooling.

Same padding

Zero-pad the border so the output keeps the input size.

ReLU after convolution

Clips negative responses to zero — this is what makes edge detectors directional.

Show cell values

Input

24×24 intensities in [0, 1].

Feature map

Raw convolution response.

Amber is a positive response, blue negative, background zero.

No pooling

Output 24×24.

Output shape
24×24
from 24×24
Response range
-3.80 … 3.80
signed response
Learnable parameters
10
9 weights plus a bias — independent of image size
Dense equivalent
331,776
a fully connected layer of the same output size

Why the same kernel everywhere

A convolution slides one small set of weights across every position, so a vertical edge is detected the same way in the corner as in the centre. That is translation equivariance, and it is why 10 parameters do the work of 331,776. The price is a built-in assumption: nearby pixels are related and absolute position does not matter. For tabular data that assumption is false, which is why convolution is not a general replacement for a dense layer.

Kernel arithmetic

weight sum0
response on a flat patch of 0.50
receptive field, this layer3×3
receptive field after 3 such layers7×7
stride / pooling reduction÷1

Any zero-sum kernel outputs exactly zero on a constant region: difference operators see change, not level. Stack layers to grow the receptive field — depth, not kernel size, is how convolutional networks see large structures.

Convolution is not just blurring

The operation is a learned local template match. A zero-sum kernel is blind to brightness and responds only to change; a positive-sum kernel passes brightness through. Which features a network detects is not a design decision made by hand — the nine numbers are learned by gradient descent, and the architecture only fixes their size, stride, and how many of them there are.