๐Ÿ”— Deep Learning ยท Lecture 37 of 38

Double Descent and the Generalisation Mystery of Deep Learning

Over-parameterised networks can fit random labels yet generalise on real data, and test error can fall again beyond the interpolation threshold. We explore double descent, benign overfitting and implicit regularisation.

Classical statistics teaches a U-shaped curve: as model complexity grows, test error first falls (less bias) and then rises (more variance). Past the point where a model perfectly fits the training data, the prediction is disaster. Yet modern deep networks, with far more parameters than training examples, interpolate their training data and generalise well. This lecture examines one of the most interesting open questions in machine learning.

The puzzle#

Zhang et al. (2017), "Understanding deep learning requires rethinking generalization", showed that:

  1. Standard CNNs reach 100% training accuracy on CIFAR-10 with completely random labels โ€” they can memorise.
  2. The same architectures, on real labels, generalise well.
  3. Explicit regularisers (weight decay, dropout, augmentation) help but are not necessary for good generalisation.

So capacity-based explanations (VC dimension, Rademacher complexity) cannot explain why these networks generalise: the same model class that generalises on real data can fit noise perfectly.

Double descent#

Belkin, Hsu, Ma and Mandal (2019) unified classical and modern regimes in the double descent curve:

  • In the under-parameterised regime, test error follows the classical U-shape.
  • At the interpolation threshold โ€” when the model has just enough capacity to fit the training data exactly โ€” test error peaks.
  • In the over-parameterised regime, test error decreases again, often below the classical minimum.

Nakkiran et al. (2019) showed double descent occurs in deep networks along several axes:

  • Model-wise: increasing width;
  • Epoch-wise: training longer can make test error rise then fall again;
  • Sample-wise: in a critical regime, adding more data can temporarily hurt.

The peak is most pronounced with label noise and little regularisation.

Why the peak at the threshold?#

Near the interpolation threshold there is essentially one way to fit the training data exactly, and that solution must contort itself to pass through every noisy point โ€” huge norm, wild behaviour between points. Past the threshold there are infinitely many interpolating solutions, and the training algorithm can choose a well-behaved one.

Minimum-norm interpolation#

For linear regression with more features than examples ($d > n$), infinitely many $\mathbf{w}$ satisfy $\mathbf{X}\mathbf{w} = \mathbf{y}$. Gradient descent initialised at zero converges to the minimum-norm solution:

$$ \hat{\mathbf{w}} = \mathbf{X}^\top(\mathbf{X}\mathbf{X}^\top)^{-1}\mathbf{y} = \mathbf{X}^+\mathbf{y} $$

As $d$ grows beyond $n$, the minimum norm solution can become smoother and test error can fall โ€” double descent in its simplest form.

python
import numpy as np

rng = np.random.default_rng(0)
n_train, n_test, D = 40, 1000, 400
w_true = rng.normal(size=D) / np.sqrt(D)
X_all = rng.normal(size=(n_train + n_test, D))
y_all = X_all @ w_true + 0.3 * rng.normal(size=n_train + n_test)
Xtr, ytr, Xte, yte = X_all[:n_train], y_all[:n_train], X_all[n_train:], y_all[n_train:]

for p in [5, 10, 20, 30, 38, 40, 42, 50, 80, 150, 400]:
    w = np.linalg.pinv(Xtr[:, :p]) @ ytr          # least squares / minimum-norm solution
    mse = np.mean((Xte[:, :p] @ w - yte) ** 2)
    print(f"features={p:>3}  test MSE={mse:9.3f}")

Test error spikes as the number of features approaches the number of training examples (40), then falls again as features increase further.

Implicit regularisation#

The key idea: the training algorithm itself prefers certain solutions.

  • Gradient descent on linear models finds the minimum-norm interpolant.
  • On separable classification with logistic loss, gradient descent converges in direction to the maximum-margin solution (Soudry et al., 2018) โ€” like an SVM, without explicit regularisation.
  • SGD noise biases training towards flat minima โ€” wide basins where the loss changes little under parameter perturbations โ€” which are associated with better generalisation (though "flatness" depends on parameterisation and is debated).
  • Small initialisation and architecture choices induce simplicity biases: networks tend to learn simple functions (low-frequency, low-complexity) first, a phenomenon called spectral bias.

Benign overfitting#

Bartlett et al. (2020) characterised benign overfitting in linear regression: interpolating noisy data can still give near-optimal test error when the data has many "unimportant" directions that can absorb the noise harmlessly, while the important directions are learned accurately. The noise is fitted, but in a way that barely affects predictions on new data.

Grokking#

Power et al. (2022) observed that small transformers trained on algorithmic tasks (e.g. modular arithmetic) can first memorise the training set, and then โ€” long after training accuracy reaches 100% and with weight decay โ€” suddenly generalise. Mechanistic analyses found the networks eventually form structured algorithms (e.g. Fourier-based representations of modular addition). Grokking illustrates how optimisation dynamics and regularisation interact over long training.

What this means in practice#

Theory is catching up โ€” neural tangent kernels, mean-field analyses, PAC-Bayes and compression bounds, and studies of feature learning โ€” but a complete explanation of deep learning's generalisation remains an active research frontier, and an excellent area for a thesis.

JA
Written by

Janin A Apurba

B.Sc. in CSE, AUST ยท Advanced ICT Officer, CNRS-UNHCR. Teaching AI, ML and Deep Learning to the next generation of engineers and researchers.

Keep learning

Related lectures

๐Ÿ”— Deep Learning

Neural Architecture Search and Automated Machine Learning

Can algorithms design better networks than humans? We review search spaces, reinforcement-learning and evolutionary search, differentiable NAS, weight sharing and hardware-aware search โ€” and the lessons of the NAS era.

Advancedโฑ 5 min#132
๐Ÿ”— Deep Learning

Loss Landscapes, Saddle Points and Flat Minima

What does the surface that SGD descends actually look like? We study critical points in high dimensions, visualise loss landscapes, discuss sharp versus flat minima, mode connectivity and why architecture shapes trainability.

Advancedโฑ 6 min#134
๐Ÿ”— Deep Learning

Model Compression: Pruning and Quantisation

Neural networks are highly redundant. We remove unnecessary weights with pruning, represent the rest with fewer bits via quantisation, and discuss the lottery ticket hypothesis and deployment on edge devices.

Advancedโฑ 6 min#131