Benefits of Max Pooling in Neural Networks: Theoretical and Experimental Evidence

Kyle Matoba, Nikolaos Dimitriadis, François FleuretTMLR 2023

Abstract: When deep neural networks became state of the art image classifiers, numerous max pooling operations were an important component of the architecture. However, modern computer vision networks typically have few, if any, max pooling operations. To understand whether this trend is justified, we develop a mathematical framework analyzing ReLU based approximations of max pooling, and prove a sense in which max pooling cannot be replicated. We formulate and analyze a novel class of optimal approximations, and find that the residual can be made exponentially small in the kernel size, but only with an exponentially wide approximation. This work gives a theoretical basis for understanding the reduced use of max pooling in newer architectures and establishes an empirical observation about natural images: since max pooling does not seem necessary, the inputs on which max pooling is distinct – those with a large difference between the max and other values – are not prevalent.

Introduction

In the early 2010s, max pooling was considered essential for providing translation invariance—the ability of a network to recognize a feature regardless of its exact position. However, recent years have seen a trend toward "all-convolutional" nets, where strided convolutions handle downsampling. The prevailing wisdom suggests that a convolution followed by a ReLU activation is simpler and more flexible, theoretically capable of learning a max-pooling-like mapping. This paper challenges that assumption, exploring the expressivity gap between these two operations.

Methods

The authors investigate the "max pooling vs. convolution" debate through two primary lenses:

  1. Theoretical Framework: They develop a mathematical model to analyze how well a composition of linear layers and ReLUs can approximate the max() function. They introduce a novel class of functions called subpool max averages ($M_d(R)$) to quantify the error inherent in these approximations.
Visualizing the subpool max averages ($M_d(R)$) used to analyze approximation error.
  1. Experimental Verification:
    • Approximation Tasks: Standard feedforward networks were trained to determine if increasing width and depth allows them to learn the max function.
  2. Robustness Testing: The researchers modified LeNet and ResNet architectures to create "Maxpool" vs. "Conv-Strided" variants. These models were then subjected to adversarial attacks using the Fast Gradient Sign Method (FGSM) to measure robust accuracy on MNIST and CIFAR-10.

Key Insights and Theoretical Bounds

The theoretical analysis reveals fundamental limitations in how ReLU networks approximate max pooling. The authors prove that computing the maximum of $d$ variables requires a ReLU network with a depth of at least $\lceil \log_2 d \rceil$. One cannot simply flatten the operation into a shallow layer without significant accuracy loss.

Summary of theoretical results for approximating max pooling with ReLU networks of varying depth.

Furthermore, even with exponential width, a shallow ReLU network will always maintain a non-zero error when mimicking a max operation. The paper suggests that modern networks succeed without max pooling because, in natural images, the difference between the maximum value in a neighborhood and its neighbors is rarely extreme. However, when that difference is large, max pooling becomes strictly more expressive.

Results: The Robustness Advantage

One of the most significant findings is the "Robustness Aha Moment." Max pooling is inherently noise-blind to anything that isn't the maximum value. In contrast, a strided convolution is a weighted sum of all values in a window, making it easier to confuse with small, adversarial perturbations.

  • Adversarial Superiority: In ResNet experiments on CIFAR-10, the Maxpool variant consistently outperformed convolutional baselines in robust accuracy.
  • Complexity vs. Performance: To match the adversarial robustness of a 4.6M parameter Maxpool model, a convolutional model (Conv-Large) required over 10.2M parameters—more than double the size—and still struggled to maintain the same level of clean accuracy.

Limitations and Future Outlook

While the theoretical proofs focus on the max() function in isolation, they provide a clean mathematical basis for understanding architectural choices. The authors note that modern hardware (TPUs/GPUs) is often optimized for convolutions, which may drive the shift away from max pooling despite its theoretical benefits. Future work could explore these findings under different error metrics like $L_2$ or in safety-critical applications where robustness is paramount.

Summary updated

BibTeX
@article{matoba2023benefits,
  author = {Kyle Matoba and Nikolaos Dimitriadis and François Fleuret},
  title = {{Benefits of Max Pooling in Neural Networks: Theoretical and Experimental Evidence}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=YgeXqrH7gA},
}
Figure