Double descent: inspect the interpolation peak
双下降现象
Decompose minimum-norm prediction risk into missing features, projection bias and amplified noise across model widths.
double-descentStart with the problem
More model capacity can first help, then hurt, and then help again after the model becomes able to interpolate training data. Belkin and colleagues use “double descent” for this extension of the familiar U-shaped risk picture. It is a pattern under particular model, data and training choices, not a law that bigger always wins.
The key question is not only whether training error reaches zero, but which interpolating solution is selected and how noise is amplified. A minimum-norm linear model is simple enough to expose both issues. We will compute its conditional expected prediction error exactly for each sampled design, then show how that quantity varies across designs.
Definitions and derivation
Let D independent standard-Gaussian features generate a response, with independent Gaussian response noise. A width-p model sees only the first p features and uses the Moore–Penrose pseudoinverse:
The pseudoinverse selects the smallest Euclidean coefficient norm among least-squares solutions. With full row rank and p at least n, it interpolates the observed responses. That does not make its population error zero. Hastie and colleagues, Section 2.3, decompose minimum-norm risk into projection bias and a covariance-trace variance term.
In our independent-feature model, omitted signal behaves as additional training-response noise. Write oₚ for its variance, use the thin SVD with nonzero singular values, and let Pₚ project onto the visible design’s row space:
Condition on the visible training design. Average over training noise, omitted training features and a fresh input, while predicting the noise-free regression function. The error is:
The first term is signal unavailable to the model. The second is visible signal lost in the design’s null space. The third follows because the estimated noise coefficient is V diag(1/sᵢ) Uᵀ noise; orthonormal columns turn its expected squared norm into τ²Σ1/sᵢ². Cross terms vanish by zero means and independence. Predicting a fresh noisy response would add σ²; it is not included here.
Below interpolation, adding useful features can reduce the first term. Close to a square design, small singular values can make the third term large. Beyond interpolation, extra dimensions can reduce noise amplification while adding projection bias. Their balance, not parameter count alone, determines the curve.
Run the calculation
The complete Python 3.12 / NumPy 1.26.4 program uses n=12, D=48, four signal coefficients equal to 0.5 and σ=0.7. Each declared width gets 128 independent Gaussian designs from seed 17. It computes the risk decomposition, rather than approximating test error with a tiny test set. The final two-row example also fits an actual minimum-norm interpolator.
import numpy as np
def risk_given_design(x, full_beta, sigma):
x, full_beta = np.asarray(x, dtype=float), np.asarray(full_beta, dtype=float)
if x.ndim != 2 or full_beta.ndim != 1 or not all(1 <= d <= 64 for d in x.shape) or len(full_beta) < x.shape[1] or len(full_beta) > 64:
raise ValueError('Use a small design and a coefficient vector covering all visible features.')
if not np.isfinite(x).all() or not np.isfinite(full_beta).all() or not np.isfinite(sigma) or sigma < 0:
raise ValueError('Use finite inputs and nonnegative noise deviation.')
_, singular, vt = np.linalg.svd(x, full_matrices=False)
keep = singular > max(x.shape) * np.finfo(float).eps * (singular[0] if len(singular) else 0)
singular, vt = singular[keep], vt[keep]
p = x.shape[1]
beta = full_beta[:p]
omitted = float(full_beta[p:] @ full_beta[p:])
residual = beta - vt.T @ (vt @ beta)
bias = float(residual @ residual)
variance = float((sigma ** 2 + omitted) * np.sum(1 / singular ** 2))
return omitted, bias, variance, int(keep.sum())
def fit_minimum_norm(x, y):
x, y = np.asarray(x, dtype=float), np.asarray(y, dtype=float)
if x.ndim != 2 or y.shape != (len(x),) or not all(1 <= d <= 64 for d in x.shape) or not np.isfinite(x).all() or not np.isfinite(y).all():
raise ValueError('Use a small finite design and matching response vector.')
return np.linalg.lstsq(x, y, rcond=None)[0]
def experiment(repeats=128):
if type(repeats) is not int or not 1 <= repeats <= 256:
raise ValueError('Use 1 to 256 independent designs per width.')
rng = np.random.default_rng(17)
beta = np.r_[np.full(4, 0.5), np.zeros(44)]
rows = []
for width in (1, 2, 3, 4, 6, 8, 10, 11, 12, 13, 14, 16, 20, 24, 32, 48):
risks, train_expectations = [], []
for _ in range(repeats):
x = rng.normal(size=(12, width))
omitted, bias, variance, rank = risk_given_design(x, beta, 0.7)
risks.append(omitted + bias + variance)
train_expectations.append((0.7 ** 2 + omitted) * (12 - rank) / 12)
rows.append(dict(width=width, quartiles=np.quantile(risks, [.25, .5, .75]).tolist(),
expected_training_mse=float(np.mean(train_expectations))))
return rows
if __name__ == '__main__':
print('12 training rows; 128 Gaussian designs per width; conditional risks, not test-response noise')
for row in experiment():
if row['width'] in (1, 4, 12, 24, 48):
print('width', row['width'], 'risk quartiles', [round(v, 6) for v in row['quartiles']],
'expected training MSE', round(row['expected_training_mse'], 6))
print('zero-predictor excess risk', 1.0)
x = np.array([[1., 0., 1.], [0., 1., 1.]])
fitted = fit_minimum_norm(x, [1., -1.])
print('tiny actual minimum-norm fit', fitted.round(9).tolist(), 'training MSE', round(float(np.mean((x @ fitted - [1., -1.]) ** 2)), 12))
Actual output:
12 training rows; 128 Gaussian designs per width; conditional risks, not test-response noise
width 1 risk quartiles [0.829882, 0.85921, 0.896656] expected training MSE 1.136667
width 4 risk quartiles [0.207411, 0.248436, 0.305447] expected training MSE 0.326667
width 12 risk quartiles [10.477089, 28.43014, 130.400761] expected training MSE 0.0
width 24 risk quartiles [0.946835, 1.060786, 1.157669] expected training MSE 0.0
width 48 risk quartiles [0.864597, 0.94862, 0.99356] expected training MSE 0.0
zero-predictor excess risk 1.0
tiny actual minimum-norm fit [1.0, -1.0, -0.0] training MSE 0.0
The median conditional risk falls from width 1 to 4, rises strongly at width 12, then falls again. At width 24 it remains worse than the zero-predictor risk of 1; a second descent does not imply superiority to every baseline. The reported quartiles describe variation across designs. They are not confidence intervals for a population mean. Near interpolation, heavy tails make a finite average particularly unstable, so we do not present a few sampled designs as a precise mean-risk estimate.
Thin-SVD work is O(np min(n,p)) for a dense n-by-p design. The implementation applies an explicit numerical rank tolerance; theoretically nonzero singular values below that threshold are truncated. This numerical convention is part of the experiment.
When the method fails
Changing feature covariance, signal alignment, noise, regularization or the solution selected by optimization can change or remove the peak. With no noise and no omitted features, the variance term disappears; at sufficient rank a model can recover the signal without an interpolation spike. Correlated features require a covariance-weighted risk expression, not the identity-covariance formula above.
Model-wise double descent varies capacity. Epoch-wise double descent varies training duration and is a different experiment. A plot cannot establish the cause without controlling what changes along its horizontal axis. Our Gaussian linear construction is a scoped mechanism study; it does not forecast the best size of a language model or prove that regularization is unnecessary.
Exercises with answers
- Why can training error be zero while prediction risk is large?
Answer 1: An interpolator can amplify training noise through small singular values and lose signal in its null space.
- What extra term is needed for prediction error against a fresh noisy response?
Answer 2: Add σ², the variance of fresh response noise, to the displayed noise-free-function risk.
- Are the plotted interquartile bands confidence intervals for mean risk?
Answer 3: No. They summarize the middle half of conditional risks across sampled designs.
- Does the second descent guarantee beating the zero predictor?
Answer 4: No. The width-24 median remains above 1 in this experiment.
Sources and next steps
Belkin’s physical pages 2–3 frame the empirical double-descent pattern. Hastie’s physical page 7, Proposition 1 and Lemma 1, supplies minimum-norm selection and conditional bias/variance. The omitted-independent-feature extension and the sampled-design experiment are derived here. Continue with singular value decomposition and ridge regression to understand small singular directions and their regularization.
Make a prediction, then check
What makes the conditional variance term large near interpolation?
Learning objectives
- Derive conditional minimum-norm risk and identify noise amplification.
- Distinguish sampled-design quantiles from universal capacity claims.
Prerequisites & connections
Explore related knowledge →References
- Reconciling modern machine learning practice and the bias-variance trade-off
Mikhail Belkin; Daniel Hsu; Siyuan Ma; Soumik Mandal · 2019 - Surprises in High-Dimensional Ridgeless Least Squares Interpolation — arXiv v1
Trevor Hastie; Andrea Montanari; Saharon Rosset; Ryan J. Tibshirani · 2019
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Codex · 2026-09-06 · Codex single-AI-author technical check: primary-source scope, explicit assumptions, original calculations, independent mathematical references and bilingual tests; not independent human or second-agent review.
- Single-AI-author technical check: bounded primary-source reading, explicit assumptions, original calculations, runnable examples and matching bilingual equations, code and exercises. Not an independent human or second-agent review.
- Four focused CPython 3.12.4 tests passed per chapter, including independent derivatives, integrals, normal equations or exact/literal trajectory references as appropriate. All eight programs use NumPy 1.26.4. Tests include augmentation geometry, exact quadratic certificates, finite differences, spectral solutions, conditional risk decompositions and masked neural-network training. CPU teaching calculations, not framework or GPU benchmarks.
- Promoted the full prose, equations, code and exercises. Tests read formal MDX only; removed temporary fallbacks/draft skips and updated review assertion to checked. Algorithm and independent references are unchanged; final record binds both locale hashes.
- Publication navigation points published topics to complete articles and removes corresponding pending wording, retaining directory entries for unwritten targets. Principles, equations, programs and exercises are unchanged; final article SHA values rebound.
- Bilingual SVGs generated with Matplotlib 3.9.1 from executed article functions: actual pixel replacement, conditional-risk quantiles and absolute/relative loss profiles. Captions distinguish probability from pixels, interquartile ranges from confidence intervals and separate plot scales. Locale figures and sample data are hash-bound.
Source locations checked:
- Reconciling modern machine learning practice and the bias-variance trade-off · New reading of v2 PDF physical pages 2–3, introduction and Figure 1; retains the existing source record unchanged.
- Surprises in High-Dimensional Ridgeless Least Squares Interpolation — arXiv v1 · Physical page 7, Proposition 1 and Section 2.3 Lemma 1: minimum-norm least squares, row/null-space bias and covariance-trace variance.
Related topics