← Contents Volume II · Lecture 4

Volume II · Seeing — Convolutional Networks

4

When Deeper Stopped Working, Until It Didn't

Take a 20-layer plain convolutional network and a 56-layer version of the same design, trained on the same data. The deeper one should, at worst, match the shallower one — it could simply learn to leave its extra layers doing nothing. Instead its training error, not just its test error, comes out higher. Something is broken in the optimisation itself.

The mental model

Past a point, stacking more plain layers made networks measurably worse — and not from overfitting, since even their training error got worse. A single new connection, added deliberately, fixed it.

The degradation problem, stated precisely

He, Zhang, Ren, and Sun, at Microsoft Research, framed the problem exactly this way in the paper that introduced ResNet: as plain, non-residual networks are made deeper, accuracy first saturates, then degrades rapidly — and this is explicitly not overfitting. If it were overfitting, the deeper network's training error would stay low while only its test error suffered. What they observed instead was the training error itself rising for the deeper plain network. The network was failing to fit its own training data, not failing to generalise from it.

That is the detail that makes this a genuinely strange result rather than an expected one. A deeper network should, in principle, be at least as capable as a shallower one: give the extra layers weights that compute the identity function — pass their input straight through unchanged — and the deeper network reduces exactly to the shallower one, no worse. The extra depth costs nothing if it does nothing. What He et al. found is that, in practice, a stack of plain nonlinear layers has a hard time learning to approximate that identity mapping. The optimiser simply does not find it, even though it exists.

TRAINING ERROR · NOT OVERFITTING — BOTH CURVES ARE TRAINING ERROR error training iterations → 20-layer plain net 56-layer plain net
Figure 4a Illustrative, not real data. The deeper plain network's training error — not test error — ends up higher than the shallower one's. The extra layers are making optimisation harder, not the model more prone to memorise.

The residual connection

ResNet's fix is a single structural change. Instead of asking a stack of layers to learn a desired mapping H(x) directly, let the stack learn a residual, F(x) := H(x) − x, and produce the block's output as F(x) + x — the transformed path added back to the untransformed input, carried forward by a shortcut connection.

A residual block output = F(x) + x

The relabelling looks cosmetic and is not. Learning F(x) ≈ 0 — the residual doing nothing — is a much easier target for a stack of nonlinear layers to hit than learning H(x) = x directly through those same layers. Driving a set of weights toward zero is a natural, easy-to-reach point for gradient descent; reproducing an exact identity mapping through several nonlinear transformations is not. The shortcut does not make the network more expressive — a plain stack could in theory already represent an identity mapping — it makes that particular, useful mapping easy to *find*.

x weight layers · F(x) skip · identity x +
Figure 4b The input x takes two paths: one through the block's weight layers, computing F(x); one straight around them, carrying x unchanged. The block adds the two back together.

Why this fixes training, not just representation

The mechanism is about gradients, not just forward representation. The shortcut connection gives the gradient a direct, additive path straight back through the network — an identity path, whose derivative with respect to its input is exactly one — running in parallel with the path through F. Even when F's local gradient is small, the total gradient reaching that block does not vanish, because the identity path contributes its share regardless. Depth stops being an obstacle to gradient flow, because every block has a route for gradient to pass through unchanged.

Plate 4.1 The mechanism, made adjustable. Push N up past 20 with Plain selected and watch the gradient number collapse toward zero — the degradation problem from §4.1, mechanically. Switch to Residual at the same N and g and the number never drops below 1: the identity path's derivative of exactly one is doing that, regardless of how small F's own gradient gets. Try N = 152, the depth ResNet actually shipped at, and compare.

Representable versus learnable

A plain 56-layer network could, in principle, already represent everything a residual 56-layer network can. What changes is not what is representable but what is learnable — the residual formulation turns a hard optimisation target (identity, through nonlinear layers) into an easy one (zero).

The empirical result matched the mechanism: ResNet trained cleanly up to 152 layers — eight times deeper than VGGNet, and at lower computational complexity — and took first place across ImageNet classification, detection, and localisation, plus COCO detection and segmentation, in 2015.

Where this idea resurfaces

The residual connection did not stay confined to convolutional networks. It is reused directly inside every Transformer block — the sibling series on LLM attention builds its entire architecture around a residual stream running past each attention and feed-forward sub-layer, though that series does not dwell on where the idea originally came from. When you meet it there, this is the lecture it traces back to: the same problem, a stack of layers whose gradient needs an unobstructed way home, and the same fix.

Plain versus residual, at depth
NetworkDepthTraining behaviour
Plain (VGG-style)~19 layers, reliableDegrades past a point — training error itself rises
ResNetUp to 152 layersTrains cleanly; 1st place ImageNet + COCO, 2015

Read the primary source