Generalized Stochastic Pooling

Francesco Landolfi, Davide Bacciu2025

Abstract

Pooling layers play a critical role in Convolutional Neural Networks by reducing spatial dimensions and enhancing translation invariance. While conventional methods like max pooling and average pooling are effective, they can respectively amplify noise or dilute important features. Stochastic pooling introduces probabilistic sampling to improve generalization but is susceptible to biases from outliers, often mimicking max pooling in such cases. To address these limitations, we propose a generalization of stochastic pooling that introduces a tunable parameter to control the balance between uniform sampling, stochastic pooling, and max pooling. Experiments on multiple datasets demonstrate that uniform sampling outperforms the biased one, achieving a favorable trade-off between regularization and performance.

Introduction

In Convolutional Neural Networks (CNNs), pooling layers are essential for reducing data dimensions and achieving translation invariance. However, standard pooling methods have inherent drawbacks. Max pooling selects the strongest signal but can amplify noise or ignore subtle details. Conversely, average pooling smooths the feature map but may dilute important features. Stochastic pooling was proposed to mitigate these issues by sampling values based on their magnitude. However, the authors argue that standard stochastic pooling remains overly "greedy"—outliers with high magnitudes are disproportionately selected, causing the layer to behave like max pooling and reducing the benefits of stochasticity.

Methodology

The proposed Generalized Stochastic Pooling introduces a "randomness temperature" parameter, $\alpha$, to control the probability $p$ of selecting a feature $X$:

$$p_{cmn}^{(\alpha)} = \frac{|X_{cmn}|^\alpha}{\sum |X_{cuv}|^\alpha}$$

This formulation unifies several pooling strategies:

  • $\alpha = 0$ (Uniform Sampling): Every pixel in the window has an equal selection probability. During training, this provides maximum randomness; during inference, it simplifies to Average Pooling.
  • $\alpha = 1$: Equivalent to standard Stochastic Pooling.
  • $\alpha \to \infty$ (Max Pooling): The probability of selecting the maximum value approaches unity.

By adjusting $\alpha$, the trade-off between regularization (randomness) and feature selection (signal strength) can be tuned. During training, values are sampled; during inference, a deterministic weighted average is used for stability.

Experimental Setup

The method was evaluated using a ResNet-like architecture on three benchmark datasets:

  • CIFAR-10: 60,000 images across 10 classes.
  • CIFAR-100: 60,000 images across 100 classes.
  • SVHN (Street View House Numbers): Real-world house number images.

Results and Discussion

The most significant finding is that the bias toward high-magnitude features in standard stochastic pooling ($\alpha=1$) can be detrimental. As $\alpha$ increases, the model tends to overfit, evidenced by a widening gap between training and validation error.

Classification error over training epochs for varying alpha.

Lower values of $\alpha$ provide stronger regularization. By forcing the network to process lower-magnitude features during training, the model becomes more robust. Quantitative results across datasets confirm that $\alpha=0$ (uniform sampling) consistently outperforms higher $\alpha$ values and standard max pooling.

Comparison of classification error (%) across different pooling strategies and datasets.

On CIFAR-10, StochasticPool ($\alpha=0$) achieved an error of 11.39%, significantly outperforming standard StochasticPool ($\alpha=1$ at 12.21%) and MaxPool (14.88%). While S3Pool showed slightly better performance on CIFAR-10 (11.18%), Generalized Stochastic Pooling remains highly competitive and consistent across different datasets.

Conclusion

Generalized Stochastic Pooling provides a unified framework for understanding pooling layers. The study highlights that uniform sampling ($\alpha=0$) offers superior regularization compared to magnitude-biased stochastic pooling. While the current implementation is slower than native C++/CUDA layers, the performance gains suggest that developing optimized kernels for this method is a promising direction for future work.

Summary updated

BibTeX
@misc{landolfi2025generalized,
  author = {Francesco Landolfi and Davide Bacciu},
  title = {{Generalized Stochastic Pooling}},
  year = {2025},
  doi = {10.14428/esann/2025.es2025-156},
}
Figure