Computer Vision
Pooling (Max & Average)
How discarding spatial precision (shrinking the grid) actually helps the network recognize a feature regardless of its exact pixel location.
Stage 1 of 4: The Feature Map
Pooling window at output position 0, result is 0.30
- Input Activation
A feature map is a grid of activations produced by a convolution layer. High values (bright cells) indicate a feature was found.
Check your understanding
2 questions in the bank. Each attempt draws a fresh set in a fresh order, so a second go is a real second go.
Pooling downsamples a feature map to reduce its size and compute cost, while preserving its strongest signals and gaining translation invariance.
A feature map generated by a convolutional layer tells the network where specific patterns exist in an image. But keeping track of the exact pixel coordinates of every edge is both computationally expensive and fragile—if an object moves slightly, the activations shift, and a naive network might fail to recognize it.
Pooling solves this by summarizing local regions of the feature map. By taking the maximum (or average) value over a small window, the network reduces the spatial dimensions of the data while preserving the most important signals.
Why Max Pooling Wins
Max pooling is the standard for most CNNs. Because a high activation means "I found the feature strongly right here", taking the maximum over a 2x2 patch ensures the feature's presence is recorded in the next layer, even if its exact position within that 2x2 patch is lost. This creates translation invariance—the network becomes less sensitive to small shifts in the input.
Average pooling, on the other hand, dilutes strong signals by mixing them with weaker ones. As you can see in the simulation, applying average pooling to a sparse feature map (like one that has passed through a ReLU activation) often results in a washed-out, blurry output where the sharp features are lost.
Reference
- Max Pooling
- Keeps only the strongest signal in the window
- Average Pooling
- Averages all signals in the window
- Stride
- The step size the window moves. Usually matches window size for pooling.
- Translation Invariance
- The ability to recognize a feature even if it shifts slightly
Break it on purpose
Use Average Pooling on sparse activations, washing out the strong signals into a blur, demonstrating why Max Pooling is the standard choice for feature maps.