Wiki
Core6 min read

Pooling and hierarchies

Shrink 224 to 11 without losing the plot: max-pooling, stride-two convs, and how 'less resolution, same meaning' is what lets deeper layers see bigger things.

Convolution outputs get bigger machinery, not smaller: 224×224 in, 64 channels out, and at full resolution that's prohibitive to stack ten layers deep. The workable structure everyone converged on is shrink-as-you-go: small spatial footprint early, growing channel counts, so total activations stay roughly constant while the scale of meaning per cell goes up.

poolmax(i,j)=max⁡ p,q∈window  in [ si+p, sj+q ] \text{pool}_{\text{max}}(i,j) = \max_{\,p,q \in \text{window}}\; \text{in}\,[\,si+p,\ sj+q\,]

Why max is enough

Max-pooling asks, of each little 2×2 or 3×3 neighborhood: what's the strongest activation here? — and discards the exact position of it inside the window. "An edge fired somewhere in this region" survives a one-pixel shift; the precise sub-pixel placement doesn't. That's the invariance the artifact shows: slide the input, watch the pooled map barely move.

8×8 → 4×4 → 2×2 by max-pooling. Slide the blob; watch the pooled maps.

layer activations (8×8)
→
2×2 max-pool (4×4)
→
pool again (2×2)

The brightest activation keeps winning each window (ring-highlighted). Nudge the blob one pixel: within a window, position doesn't matter — the pooled map's bright cell stays put.

Real max-pool at every level; outlined cells mark where the strongest activation survives. Illustrative: one channel, no stride-2-conv alternative shown — learnable downsampling keeps more than “the max” but costs more compute to learn.

What pooling buys — and what it's really for

Two jobs, both important:

  1. Cost control. Quarter the resolution, quarter the next layers' compute. Without it, every layer would pay full price everywhere.
  2. Invariance. Recognition shouldn't depend on a 2-pixel shift. Pooling hard-codes "position within a small window doesn't matter", which training also can learn — but here it's free and guaranteed.

Modern nets often swap explicit pooling for a stride-2 convolution — same shrinkage, but the shrink is learnable — or replace both with an attention block; the hierarchy-with-shrinking shape survives all three.

Why the hierarchy is the real payoff

Stack sliding filters with shrinking: layer 1 sees a 7×7-pixel patch, layer 2 (after one pool) still sees the same neighbor count but over half the resolution, so effectively spans more image. Five layers down, one activation's receptive field is half a photo. All the corner-detection machinery of chapter 3 is about making that expansion of context per layer the default.

Pooling ≠ information retention

Max is a lossy summary: it keeps the strongest signal, not the average texture under it. That's fine for detection-style tasks (present/absent) and poor for dense prediction — segmentation and depth networks keep more resolution and learn their own downsampling. Know what pooling silently assumes: the question is "is it there?", not "how much exactly?"

Illustrative vs real

One fixed 8×8 activation pattern with a draggable bright blob, real max-pool arithmetic at each shrink stage. Missing: channel dim and learned (stride-conv) downsamplers — the pattern (shrink while meaning holds) is the transferable part.

Check yourself

Eduspheria wiki · Deep Learning, Convolutions and vision

0 / 5 answered

  1. 1What does max-pooling over a small window throw away?
    Multiple choice
  2. 2A 224 by 224 feature map is passed through max pooling with a 2 by 2 window and stride 2. What is the output height?
    pixels
    Numeric answer
  3. 3Pooling trades some spatial detail for translation invariance and cheaper downstream compute.
    True / false
  4. 4What kind of convolution replaces pooling in many modern networks, shrinking the map while making the shrink learnable?
    Short answer
  5. 5Pooling is a poor fit for which kind of task?
    Multiple choice

From the mid-term paper

Exam-modeled · Mid-Term March 2025

0 / 6 answered

  1. 1A pinhole camera with focal length f = 35 mm sees a point at camera coordinates (X, Y, Z) = (100, 150, 200). Using u = f times X / Z, what is u in millimetres?
    Numeric answer
  2. 2For the same pinhole setup, what is v in millimetres, using v = f times Y / Z?
    Numeric answer
  3. 3A camera has intrinsic parameters fx = fy = 1000 and principal point (cx, cy) = (640, 360). For a point at camera coordinates (X, Y, Z) = (2, 3, 5), what is the pixel coordinate u = fx times X / Z + cx?
    Numeric answer
  4. 4A 512 by 512 image is down-sampled by a factor of 4. What is each new side length in pixels?
    Numeric answer
  5. 5After down-sampling, the image is quantized to 4 bits. How many intensity levels does it have?
    Numeric answer
  6. 6Reducing an image from 256 intensity levels to 16 is an example of which operation?
    Multiple choice

Where next: residual-connections — depth was supposed to power all of these hierarchies, but there's a catch that took an age to fix.

This lesson has exercises attached — tracing receptive fields through a stack — launching once the exercises layer ships.