Max Pooling Explained: A Simple Guide


It's one of those clever tricks in the art of artificial intelligence that can see, and it's called max pooling. It's an important component of how computers learn to recognize things in photographs, ranging from detecting a cat in an image to more advanced tasks.
Let's break down what max pooling is, why it is so valuable, and debunk some of the myths about it.
What is Max Pooling?
Think of max pooling as reducing an image in size without discarding the most important information. After a computer network has detected features in an image (e.g., edges, corners, or color), it generates a "feature map," i.e., a grid of numbers.
To shrink this grid, max pooling slides a small window (usually 2x2) across it. In each window, it checks all the numbers and keeps only the largest one.
For example, if the window can see 1, 5, 6, and 8, max pooling will take 8 and won't even consider the others. It does this over and over again and shrinks the grid quite a bit, but it keeps the strongest characteristics that were found.
Why Does It Matter?
Reducing the feature map in this way has two major advantages:
It's More Efficient: There is a lot of information in images. Compressing information, max pooling allows the computer to do computations faster and use less memory. This reduces the amount of computation and makes the whole process much more efficient.
It Puts its Attention Where it Matters: By selecting the largest number, the network is focusing on the most conspicuous characteristic of what is in that small space. This causes it to concentrate on the most important signals that it must make a decision on.
Does It Blind the Network to Location?
It's a general feeling that pooling gets the network to pay attention to whether a feature is or isn't there, but not where it is. It's nearly true, but with a little exception. Pooling provides the network some "wiggle room." It reduces the network's sensitivity to where a feature is.
For instance, when the cat ear in a picture is moved by a small distance, the max pooling operation will likely still pick up on the same prominent feature. The network will still recognize the cat ear, which is great because things in the real world aren't normally in the exact same position.
But if the ear of the cat moved to a completely different position in the picture, the network would notice that. So position does matter, but pooling makes the system more robust and adaptable to small variations.
What about Fine Detail Jobs?
You can wonder whether or not pooling is a terrible concept for something like image segmentation, where you're trying to put a label on each and every one of the pixels in an image. I mean, if you're discarding information, how do you manage to build a perfect, detailed boundary?
That makes sense. Information loss would be a problem for operations that need this amount of detail. That is not to say that pooling cannot be employed. AI engineers have devised clever means of using pooling in a manner to achieve the "big picture" of what appears in the picture and then utilize other forms of processing to reverse the detailed information needed for the final, correct output.
Types of Pooling at a Glance
Max Pooling: Picks the maximum of every patch to keep the strongest features.
Average Pooling: Pools all the values in a patch to get a smoother summary.
Minimum Pooling: Selects the minimum value of a patch, and that is helpful in the detection of darker features against lighter ground.
Global Max Pooling: Pools the entire feature map to a single top value.
Global Average Pooling: It shrinks the entire feature map into a single value by averaging all of its figures.
L2 Pooling: Calculates the square root of sum of squares of all the values in a patch, intermediate between average and max pooling.
Subscribe to my newsletter
Read articles from Meemansha Priyadarshini directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Meemansha Priyadarshini
Meemansha Priyadarshini
I am a passionate technical writer with a strong foundation in programming, machine learning, and deep learning. My background in innovation engineering and my expertise in advanced AI technologies make me adept at explaining complex technical concepts in a clear and engaging manner. I have a keen eye for detail, strong research skills, and a commitment to producing high-quality content.