The 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)=maxp,qwindow  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.

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.