Pooling downsamples local neighborhoods by aggregating their values. In a CNN, it reduces the spatial detail passed to later layers and makes predictions more robust when image content shifts slightly. This matters because a later fully connected layer tends to associate features with specific locations, while pooling preserves useful spatial evidence across nearby positions. section 3.5 section 3.8
Max pooling applies a sliding window over each channel:
- For a K × K region, select its largest value and write it to the output. With a matching stride, each spatial dimension shrinks by roughly K. section 3.5
- Use the stride to control how far the window moves; pooling and convolution both expose this setting. section 3.8
- Treat ordinary max pooling as a tradeoff: it improves shift robustness and enlarges later receptive fields, but can discard more information than necessary. section 14.1
- For severe aliasing, pool with stride=1 and padding, then blur and downsample with a stride-2 convolution; a binomial filter weights nearby values more heavily. section 14.1.2
A shift-sensitive classifier
Shift an MNIST digit one pixel with `np.roll`, then evaluate it through a PyTorch model. The probability assigned to the correct class can fall from 0.7816 for the original image to 0.4428 or 0.3153 after small shifts; pooling addresses this location sensitivity. section 3.5
PyTorch anti-aliased pooling pattern
Apply `F.max_pool2d(x, kernel_size, stride=1, padding=kernel_size//2)`, then pass the result through `BlurLayer(kernel_size=int(1.5*shrink_factor), stride=shrink_factor)`. This keeps the local maxima behavior while mixing neighboring information before reduction. section 14.1.2
Figure 14.2 An approach to max pooling that helps mitigate aliasing: also called anti-aliasing. First we do max pooling with a stride of 1 to get an output the same size as the input. Then we apply a blurring kernel/convolution with a stride of 2, which shrinks the output to the desired size and maintains the behavior of max pooling but allows us to delineate that the three outputs came from three different inputs. This approach captures more information than naive max pooling.
Visualizes the anti-aliasing sequence: stride-1 max pooling preserves a full-size intermediate representation, then blurring with stride 2 reduces it while distinguishing inputs that naive pooling makes identical. section 14.1.2







