Interactive Explainer
Pooling, Cell by Cell
Pooling is the quiet workhorse of a CNN: it shrinks a feature map by summarising each little window with a single number. Slide the window below and watch the output grid fill in — max keeps the strongest activation in each patch, average smooths it. The output size is no mystery either; one floor formula predicts it exactly.
Slide the window, watch the output
A $6\times6$ feature map sits on the left. A pooling window of size $K$ slides across it with stride $S$; each landing produces one number on the right. Step through the positions, or press play. The highlighted patch on the left is the current window; the outlined cell on the right is the number it produces. In max mode the winning input cell is starred.
Why pool at all?
- Downsampling. Pooling shrinks the feature map so later layers see a coarser, cheaper representation. With $K=S=2$ you drop three-quarters of the activations in one step.
- Max keeps the strongest signal. If a filter fires anywhere in the window, max-pool passes that response through — a small amount of translation invariance for free. The starred cell is the one that "wins".
- Average smooths. Average-pool blends every cell equally, which suppresses noise but can wash out a sharp, localised activation. Global average pooling at the very end of a network is average-pool taken to the whole feature map.
- No parameters. Pooling has nothing to learn — it is a fixed reduction. That is why it is cheap, and why many modern nets replace it with stride-2 convolutions when they want the downsampling to be learnable.