§8.7.1 Batch normalization
Batch normalization batch normalization An adaptive REPARAMETRIZATION (not an optimizer): replace a layer's minibatch activations H with (H−µ)/σ (back-propagating THROUGH µ,σ), then γĤ+β to keep expressiveness. Removes cross-layer update coordination; test-time uses running averages. defined in ch. 8 — open in glossary (Ioffe & Szegedy, 2015) is one of the most important recent innovations — and it is not an optimization algorithm. It is an adaptive reparametrization that tames the core difficulty of very deep nets: the gradient tells you how to update each layer assuming the others stay fixed, but you update them all at once. Take a deep linear chain :
Term by term
| the gradient predicts ŷ drops by ε·gᵀg — so you might pick ε from that | the plan | |
| but the real update multiplies l changed factors, adding 2nd…lth-order terms like ε²g₁g₂∏wᵢ that can be negligible OR exponentially large | the surprise | |
| the effect of updating one layer depends on ALL the others, so the learning rate is nearly impossible to choose. Batch norm sidesteps this entirely | the problem |
Batch norm’s fix: standardize each unit’s activations across the minibatch, then give the network back a clean way to choose the scale and shift. Drag and to see the three stages:
The middle row is always zero-mean, unit-variance — that is what removes the cross-layer coordination problem. Then γ and β restore expressive power, but now the output's mean is set solely by β and its std solely by γ, instead of by a tangled interaction of every lower-layer parameter — so gradient descent can adjust them cleanly.
Term by term
| standardize each unit to zero mean, unit variance using the MINIBATCH mean/std — and crucially back-propagate THROUGH µ and σ, so the gradient can never just shift the mean or std | normalize | |
| learned scale γ and shift β restore full expressive power — but now the output mean is set solely by β and the std solely by γ, easy for gradient descent to adjust | restore | |
| replace µ,σ with running averages collected during training, so the model can be evaluated on a single example | inference |
Why back-propagate through the normalization?
That is the key innovation. Earlier attempts either added a penalty encouraging normalized statistics (imperfect) or renormalized after each gradient step (wasteful — the optimizer kept proposing to change the mean and variance, and the renormalization kept undoing it). By making the normalization part of the model and differentiating through it, the gradient’s request to change a unit’s mean or variance is zeroed out automatically. In a purely linear net this would render the lower layers useless (their only influence — first and second-order statistics — is normalized away); in a real nonlinear net they still perform useful nonlinear transformations. Apply batch norm to (dropping the redundant bias , absorbed by ), and in CNNs use the same µ, σ at every spatial location.
§8.7.2 Coordinate descent
Sometimes a problem splits cleanly. Coordinate descent coordinate descent Minimize with respect to one variable (or a BLOCK — block coordinate descent) at a time, cycling; effective when the variable groups are separable (e.g. sparse coding W vs H, each subproblem convex), poor when they interact strongly. defined in ch. 8 — open in glossary minimizes with respect to one variable at a time (or a block — block coordinate descent block coordinate descent Coordinate descent over a subset (block) of variables at once — e.g. alternating between the dictionary W and the codes H in sparse coding, each subproblem convex while the other block is fixed. defined in ch. 8 — open in glossary ), cycling until convergence. It shines when the variables separate into fairly isolated groups. The classic case is sparse coding, : jointly non-convex, but convex in the dictionary with the codes fixed, and vice versa — so alternate between the two. It is a poor strategy, though, when one variable strongly influences another’s optimum (e.g. with small ), where changing one coordinate far from the other is penalized and progress crawls.
§8.7.3 Polyak averaging
Polyak averaging polyak averaging Average the parameter trajectory θ̂ = (1/t)Σθ⁽ⁱ⁾ (an exponentially-decayed running average for non-convex problems) to land near a valley floor the optimizer merely oscillated across. defined in ch. 8 — open in glossary averages the points visited along the optimization trajectory rather than returning the last one:
Term by term
| the plain average of the whole trajectory — if the optimizer leaps back and forth across a valley without hitting the bottom, the average of both sides lands near it | convex form | |
| for non-convex problems, an EXPONENTIALLY-DECAYING average — distant past points may be behind cost barriers and are down-weighted | non-convex form | |
| strong convergence guarantees for convex gradient descent; for neural nets it is heuristic but works well in practice | the caveat |
Next: pretraining, designing models to aid optimization, and continuation / curriculum learning — pretraining, model design & curriculum.
Check yourself — batch norm, coordinate descent, Polyak averaging
1.What problem does batch normalization address, using the deep linear chain ŷ = x·w₁w₂···wₗ as an example?
2.In BatchNormLab, the middle row (H−µ)/σ is always zero-mean and unit-variance regardless of γ and β. Why does that matter?
3.Why is it crucial to BACK-PROPAGATE through the mean µ and std σ in batch normalization?
4.When does coordinate (or block coordinate) descent work well, and when does it struggle?
5.What is Polyak averaging, and how is it adapted for non-convex problems?