Average Pooling Operation
What you'll learn: How average pooling reduces spatial dimensions by computing the mean value across local regions instead of taking the maximum.
What is Average Pooling?
While max pooling (which you just learned) selects the brightest pixel in each window, average pooling computes the mean of all values in that window. It's a gentler, smoother way to downsample spatial information.
Think of it like this: If max pooling is asking "what's the loudest sound in this room?", average pooling asks "what's the average noise level?" One highlights peaks; the other gives you the overall trend.
How It Works
Average pooling slides a window (commonly 2×2) across your feature map with a given stride, just like max pooling. But instead of picking the maximum value, it computes the arithmetic mean:
- For a 2×2 window containing
[2, 4, 1, 3], average pooling outputs(2+4+1+3)/4 = 2.5 - Max pooling would have output
4
When to Use Average Pooling
Average pooling is preferred when:
- You want to preserve background information rather than only the strongest features
- You're working with smooth, continuous data where extreme values aren't critical
- You need a softer transition between spatial regions
It's less common than max pooling in modern CNNs (max pooling better preserves dominant features like edges), but you'll still see it in certain architectures, especially in global average pooling at the network's end.
Average vs Max: The Key Difference
Max pooling is aggressive—it emphasizes the strongest activation. Average pooling is democratic—it considers all activations equally, producing smoother, more blurred downsampled features.
Key Takeaway: Average pooling downsamples by computing the mean over spatial windows, offering a smoother alternative to max pooling that retains more distributed information but may lose sharp feature peaks.