Foundations

Double Descent: When More Parameters Reduce Test Error Again

Understand why test error can peak as a model starts to fit its training data exactly and then fall again, with code to see it.

Key takeaways

  • The interpolation threshold is the model size at which training error first reaches about zero.
  • Near that threshold, the fitting solution is often forced and unstable, so noise gets amplified.
  • Far beyond it, many solutions fit the data, and the training procedure tends to pick comparatively well-behaved ones.
  • Similar shapes can appear along training time and even sample size, though not in every setup.
  • Well-tuned regularization often flattens the peak, so double descent is no reason to skip validation.

Double descent is a pattern in which test error falls, rises to a peak, and then falls again as a model gets larger. The peak tends to sit near the point where the model first becomes able to fit every training example exactly. Beyond it, adding parameters can make predictions on new data better.

This looks like a contradiction of the textbook U-shaped curve. It is better read as an extension: the U describes one region, and there is more to the right of it.

The classical picture and its extension

The familiar account of bias and variance goes like this. A very small model underfits: it has high bias, meaning systematic error. As capacity grows, bias falls and variance, the sensitivity to the particular sample, rises. Test error traces a U, and you want the bottom.

Now keep going. At some size the model can drive training error to zero. This is interpolation: the fitted function passes through every training point, noise included. The classical intuition says test error should be terrible from here on.

In many experiments with linear models on random features, with neural networks and with some tree ensembles, test error does spike around the interpolation point and then comes back down. Sometimes the second descent ends below the best point of the first.

The regions along a double descent curve
1 Too small Underfits; error falls with size 2 Classical sweet spot Balance of bias and variance 3 Interpolation threshold Barely fits the data; error peaks 4 Overparameterized Many fits exist; error falls again Too small Underfits; error falls with size 1 Classical sweet spot Balance of bias and variance 2 Interpolation threshold Barely fits the data; error peaks 3 Overparameterized Many fits exist; error falls again 4

Researchers had seen versions of this in statistics and statistical physics for some time. The name and the unified picture became widely known in the late 2010s, notably through work by Mikhail Belkin and coauthors.

Why a peak appears at the threshold

Linear regression shows the mechanism most clearly. Let Φ be the training matrix with n rows (examples) and p columns (features), and suppose you solve for weights w that make Φw close to y.

  • When p is much smaller than n, there are many more equations than unknowns. Noise averages out.
  • When p is about equal to n, there is usually exactly one solution that fits everything. If Φ has directions with very small singular values, fitting the noise along them requires huge weights.
  • When p is much larger than n, infinitely many weight vectors fit exactly. You can choose among them.

The standard choice in the third case is the minimum-norm solution: of all w with Φw = y, take the one with the smallest ∑wⱼ². Gradient descent on squared loss, started at zero, converges to exactly this solution for linear models, assuming a suitable step size.

As p grows past n, there are more ways to spread the fit across features, so the smallest norm needed to interpolate tends to shrink. Smaller weights usually mean a function that swings less between training points.

A tiny example of choosing among fits

Take one training example with a single equation, w₁ + w₂ = 2. With only w₁ available, the fit is w₁ = 2, with squared norm 4. With both weights, any pair summing to 2 works, and the minimum-norm one is w₁ = w₂ = 1, with squared norm 2.

With four equally useful features and w₁ + w₂ + w₃ + w₄ = 2, the minimum-norm solution is 0.5 each, with squared norm 1. More parameters let each one do less. This toy case does not prove anything about test error, but it shows why a larger model need not mean a wilder solution.

See it yourself

This script draws inputs with 20 features, builds p random ReLU features from them, fits those by least squares, and measures test error as p passes the number of training examples, n = 40. NumPy's lstsq returns the minimum-norm solution when the system is underdetermined.

import numpy as np

rng = np.random.default_rng(0)
n, d = 40, 20
beta = rng.normal(size=d)
beta /= np.linalg.norm(beta)                 # true linear signal

def features(X, W):                          # returns (rows, p)
    return np.maximum(0, X @ W.T) / np.sqrt(len(W))

X_test = rng.normal(size=(1000, d))
y_test = X_test @ beta
for p in [5, 10, 20, 30, 40, 50, 80, 200, 1000]:
    errors = []
    for trial in range(50):
        X = rng.normal(size=(n, d))          # shape (40, 20)
        y = X @ beta + rng.normal(0, 0.3, n)
        W = rng.normal(size=(p, d))
        coef = np.linalg.lstsq(features(X, W), y, rcond=None)[0]
        pred = features(X_test, W) @ coef
        errors.append(np.mean((pred - y_test) ** 2))
    print(p, round(float(np.median(errors)), 3))

You should see a sharp spike at p = 40 and much lower error at p = 1,000 than at any small size. The median is used because individual trials near the threshold can be wild. The exact shape depends on the input distribution, the noise and the type of features; with a one-dimensional input, for instance, the picture can be far messier. Try replacing least squares with a small ridge penalty and compare.

Three directions in which it can appear

Axis you vary What can happen
Model size The classic double peak-and-fall near interpolation
Training time Test error rises and later falls again during long training
Number of examples Adding data can temporarily raise error for a fixed model

The third is the most surprising. More data moves the interpolation threshold. A model that was comfortably overparameterized can find itself near the threshold once n grows to match its effective capacity. Further data then takes it past the troublesome region.

Note that "number of parameters" is only a proxy. What matters is how much the training procedure can effectively fit, which depends on the optimizer, the training length, augmentation and label noise.

When the peak is faint or absent

Several things soften it.

  • Regularization. A suitably chosen ridge penalty prevents the enormous weights that cause the spike. In some linear settings, tuning it well removes the non-monotonic shape.
  • Low noise. Label noise and model misspecification make the peak more pronounced.
  • Early stopping. Halting before interpolation keeps the model out of the unstable region.
  • Coarse sweeps. If you only test a few sizes, you may step over the peak.

See regularization and capacity for the general tool.

Reading the peak through conditioning

A little more linear algebra explains the instability. Write the training matrix in terms of its singular values s₁, s₂, and so on, which measure how strongly the data vary along independent directions. A least squares solution divides the component of y along each direction by the matching singular value.

Noise in y has a component along every direction. Where s is large, dividing by it is harmless. Where s is tiny, say 0.001, a noise component of 0.1 turns into a weight contribution of 100. Random square matrices, and nearly square ones, tend to have at least one very small singular value. Tall and wide matrices tend to keep their smallest singular value further from zero.

That is the peak in one sentence: near p = n, the fit is forced to explain noise through directions the data barely constrain.

A ridge penalty λ replaces the factor 1/s with s/(s² + λ). For s = 0.001 and λ = 0.01, the factor drops from 1,000 to about 0.1. Directions with large s are hardly affected. This is why even a small penalty can cut the spike dramatically.

What it does and does not overturn

The bias-variance decomposition for squared error is an identity, and it still holds. What fails is the assumption that variance must keep rising with parameter count. In the overparameterized region, variance can fall as size increases.

Classical capacity measures such as the VC dimension give bounds that hold for every model in a class. They do not say the bound is tight for the particular solution your optimizer finds. Understanding which solutions optimizers prefer, often called implicit regularization, is clearer for linear models than for deep networks, where research continues.

Bigger is also not automatically better. Larger models cost more memory, time and energy, and the second descent may level off above what a smaller tuned model achieves.

What to do in practice

  1. If error rises as you enlarge a model, check whether you are near zero training error. Try going both smaller and considerably larger.
  2. Tune regularization at each size instead of fixing one value.
  3. Repeat runs with several seeds, since variance peaks near the threshold.
  4. Plot test or validation error against size, epochs and data amount if results look odd.
  5. Pick the model on validation data and include cost in the decision.

Common questions

Does double descent mean overfitting does not exist?

No. Models still overfit, and the peak is a vivid case of it. The point is that fitting the training data exactly does not by itself guarantee poor predictions.

Is it only a deep learning effect?

No. It appears in plain linear regression with random features, which is why that setting is so useful for studying it.

Does averaging models help near the peak?

Often, yes. Much of the extra error there is variance that depends on the random features or the initialization. Averaging several independently built models cancels part of it. Averaging cannot remove error that all the models share, such as the effect of a particular noisy training label that each one fits in a similar way.

Can fitting noise ever be harmless?

In some high-dimensional problems, theory shows that an interpolating model can spread the noise so thinly across many directions that it barely affects predictions. This is often called benign overfitting, and it requires particular properties of the data.

Written for 4MachineLearning with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 42 articles in Foundations →

Latest news on this topic