Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A hard limit on each unit’s weights
Weight decay gently pulls every weight towards zero all the time. A max-norm constraint does nothing until a unit’s weights grow too long; then it scales them back to the limit. It is like a leash with slack: free movement inside the circle, a firm stop at its edge. Because a unit’s output is bounded by its weight length times its input length, this also stops activations from exploding.
Max-norm was part of the original dropout recipe and lets training survive learning rates that would otherwise blow up. Related constraints (weight clipping, spectral normalisation, gradient clipping) are routine in GANs, reinforcement learning and large-model training, where stability matters as much as accuracy.
- 1. A max-norm constraint acts…
- 2. Max-norm bounds…
- 3. Max-norm was recommended alongside…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Projection: after each update, for each unit’s incoming weight vector w: if ‖w‖ > c, set w ← w·c/‖w‖. Example: w = (3, 4), c = 1 → (0.6, 0.8); w = (0.3, 0.4) is unchanged.
- Closest point: the projected vector is the point of the ball ‖v‖ ≤ c nearest to w.
- Columns, not the whole matrix: in a layer computing xW, unit j’s incoming weights are column j. For columns of norms 5, 0.5, 2 and c = 1, the new norms are 1, 0.5, 1; two of the three units were clipped.
- Activation bound: |wᵀx| ≤ ‖w‖‖x‖ ≤ c‖x‖ by Cauchy–Schwarz, for example at most 10 for c = 2 and ‖x‖ = 5.
- Typical c: 3–4 in the dropout paper.
- 1. Project (3, 4) onto the ball of radius 1:
- 2. Max-norm on a vector of norm 0.5 with c = 1:
- 3. Largest |wᵀx| for c = 2, ‖x‖ = 5:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Max-norm in code
Exercise 1.
- A vector of norm 2.58 was projected to norm 2, and none of 20 000 random points of the ball was closer to the original.
- Clipping the columns (3, 4), (0.3, 0.4), (1.2, 1.6) at c = 1 gave norms 1, 0.5, 1 and left the short column unchanged, whereas weight decay shrinks it too.
Practice.
- Keras:
kernel_constraint=MaxNorm(3). In PyTorch, applytorch.renorm(or a manual rescale) afteroptimizer.step(). - Choose the axis carefully: the norm is over each unit’s incoming weights (each output column in Keras’
(in, out)kernels). - Max-norm pairs naturally with dropout and high learning rates, but tune both; it cannot rescue a learning rate at which optimisation itself fails (exercise 2).
with torch.no_grad():
layer.weight.data = torch.renorm(layer.weight.data, p=2, dim=0, maxnorm=3.0) # rows are units in nn.Linear- 1. In PyTorch's nn.Linear, a unit's incoming weights are…
- 2. The Keras constraint is…
- 3. Max-norm is applied…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Projected gradient descent. Taking a gradient step and then projecting onto a convex set is projected gradient descent, which converges for convex problems under the usual step-size conditions. Max-norm is projected SGD onto a product of balls, one per unit.
Max-norm versus weight decay. Weight decay is a penalty (soft, always active); max-norm is a constraint (hard, active only at the boundary). By Lagrangian duality a constraint ‖w‖ ≤ c corresponds to some penalty λ, but the correspondence depends on the data. In practice the constraint allows weights to move freely until they become large.
Max-norm matrix factorisation. Srebro and Shraibman (2005) studied the max-norm of matrices as a regulariser for collaborative filtering, with generalisation bounds; the per-unit constraint in networks shares the name and the bounding idea.
Relatives. Spectral normalisation (E5-7) bounds a layer’s largest singular value, controlling its Lipschitz constant. WGAN’s weight clipping bounds individual weights. Gradient clipping bounds updates rather than weights.
- 1. Max-norm training is an instance of…
- 2. Weight decay is a penalty; max-norm is…
- 3. Spectral normalisation bounds…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.Can max-norm rescue high learning rates?
History.
- N. Srebro and A. Shraibman (2005) studied max-norm regularisation for matrices.
- G. Hinton et al. (2012) and N. Srivastava et al. (2014) used per-unit max-norm with dropout and high learning rates.
- I. Goodfellow et al. (2013) used it in maxout networks.
- Gradient clipping (Pascanu et al., 2013) and spectral normalisation (Miyato et al., 2018) are related controls.
Exercise 2. A 2–64–64–2 ReLU network with dropout 0.5, trained by SGD with momentum 0.9 (1000 mini-batch steps) on 100 two-moons points; three seeds:
| learning rate | max-norm | mean test accuracy | median test CE | diverged runs | largest unit norm |
|---|---|---|---|---|---|
| 0.03 | off | 0.867 | 0.364 | 0 | 3.25 |
| 0.03 | c = 2 | 0.869 | 0.350 | 0 | 2 |
| 0.3 | off | 0.825 | 0.623 | 0 | 8.43 |
| 0.3 | c = 2 | 0.828 | 0.421 | 0 | 2 |
| 1.0 | off | 0.547 | ∞ | 2 | ∞ |
| 1.0 | c = 2 | 0.491 | 0.707 | 0 | 2 |
- At learning rate 1, max-norm prevented divergence (0 of 3 runs against 2 of 3) but the network learned nothing (accuracy about 0.5). Bounding the weights does not make an oversized step productive.
- At 0.3 it helped: the unconstrained weights grew to norm 8, and capping them at 2 cut the median test loss from 0.62 to 0.42.
- At 0.03 the weights stayed small anyway, and the effect was small.
- Lesson: max-norm is a stabiliser that matters when weights grow; it complements, but does not replace, a sensible learning rate.
Max-norm in AI, robotics and aerospace
- Stable training of models that will be retrained automatically, where a blow-up would waste a run.
- Lipschitz control for neural controllers: bounding weight norms bounds how fast the output can change with the input, which supports stability arguments in control.
- Reinforcement learning uses norm constraints and clipping to stabilise value and policy networks.
References
- N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, R. Salakhutdinov (2014). “Dropout: a simple way to prevent neural networks from overfitting.” JMLR 15.
- N. Srebro, A. Shraibman (2005). “Rank, trace-norm and max-norm.” Proc. COLT.
- I. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, Y. Bengio (2013). “Maxout networks.” Proc. ICML.
- T. Miyato, T. Kataoka, M. Koyama, Y. Yoshida (2018). “Spectral normalization for generative adversarial networks.” Proc. ICLR.