What is pooling? How does pooling help with Convolutional Neural Networks?

Medium Last updated on May 7, 2022, 1:24 a.m.

Pooling is a method to downsample the features that have been extracted from input data. When we have a very rich featured dataset, our model needs to determine relevant features, therefore by using downsampling we can extract the generalized features of the desired objective. There are 2 methods through which we can do pooling: Max Pooling, and Average Pooling .

Markdown Monster icon
Fig 1: Example of Max Pooling and Average Pooling for 2x2 filter and stride 2.

Max pooling is a sample-based discretization process that extracts the most important features like edges whereas, average pooling extracts features so smoothly. For image data, you can see the difference. Although both approaches are used for the downsampling, max pooling is better for extracting the extreme features. Average pooling sometimes can’t extract good features because it takes all into count and results in an average value which may/may not be important for object detection type tasks.

Note that, average pooling brings all into count and flows it to the next layer which means all values actually are used for feature mapping and creating output - which is a very generalized computation. If we don’t need all inputs from the Conv layer, we will get bad accuracy for average pooling.

Is there any advantage of using average pooling over max-pooling?

Average pooling doesn’t have any significant advantage over max-pooling for general tasks. If the variance observed in a max pool filter is not significant, both pooling will give the same type of results. But in extreme cases, max-pooling will provide better results for sure.