S3Pool: Pooling with Stochastic Spatial Sampling

Shuangfei Zhai, Hui Wu, Abhishek Kumar, Yu Cheng, Yongxi Lu, Zhongfei Zhang, Rogério Schmidt Feris

Introduction

Standard Convolutional Neural Networks (CNNs) typically employ deterministic pooling layers, such as max pooling, to reduce spatial dimensions and achieve translation invariance. However, these methods often discard information in a fixed, uniform pattern, which can lead to overfitting and a failure to account for the spatial variability inherent in real-world data. S3Pool (Stochastic Spatial Sampling Pooling) addresses this by introducing a stochastic sampling strategy into the downsampling process, serving as both a regularizer and a form of implicit data augmentation.

The S3Pool Method

S3Pool decomposes the pooling operation into two distinct steps: local feature extraction and stochastic downsampling. First, a sliding window (e.g., $2 \times 2$) moves across the feature map with a stride of 1, capturing local statistics like the maximum value while maintaining the original spatial resolution. Second, instead of selecting pixels at fixed intervals, S3Pool employs Stochastic Spatial Sampling.

Visualization of stochastic spatial sampling with different grid sizes.

The feature map is divided into a grid of horizontal and vertical strips defined by a grid size hyperparameter ($g$). Within each strip, rows and columns are randomly selected to form the downsampled output. This process introduces controlled spatial distortion, where a larger $g$ results in more aggressive randomization and stronger regularization. During inference, the stochastic process is approximated using standard average pooling to ensure stable predictions.

Key Insights: Implicit Data Augmentation

A primary benefit of S3Pool is its role as a "virtual" data augmenter. By generating thousands of slightly distorted versions of internal feature maps during training, the model is forced to learn more robust representations. This spatial distortion effectively simulates various transformations without the computational cost of explicit data augmentation techniques.

Example of the spatial distortion produced by the stochastic sampling process.

Experimental Results

The authors evaluated S3Pool on CIFAR-10, CIFAR-100, and STL-10 datasets. The results demonstrate superior generalization compared to standard max pooling and Dropout. Notably, on the STL-10 dataset—which features high-resolution images but limited training data—S3Pool reduced the error rate of a ResNet model from 39.84% to 24.06%. Furthermore, S3Pool is computationally efficient, adding only 4-8% to training time, making it a practical replacement for traditional pooling layers.

Conclusion

S3Pool offers a simple yet effective modification to the standard CNN architecture. By replacing deterministic downsampling with stochastic spatial sampling, it provides powerful regularization and implicit data augmentation with minimal overhead. While hyperparameter tuning for the grid size remains a manual task, the significant gains in generalization, especially on small datasets, highlight its potential for broad application in computer vision.

Summary updated

BibTeX
@inproceedings{zhai2017s,
  author = {Shuangfei Zhai and Hui Wu and Abhishek Kumar and Yu Cheng and Yongxi Lu and Zhongfei Zhang and Rogério Schmidt Feris},
  title = {{S3Pool: Pooling with Stochastic Spatial Sampling}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=LDK4OT3Zn-c},
}
Figure