Design a Double Descent Experiment
AnthropicMachine Learning Engineer · HR ScreenLast updated
Tests your ability to design a controlled synthetic experiment demonstrating double descent, explain the mathematical causes of test error divergence near the interpolation threshold, and analyze the interplay between noise, conditioning, and regularization.
Scenario
Modern deep learning often violates classical learning theory: increasing model capacity or decreasing training sample size beyond the point of zero training error can actually improve test performance. This phenomenon is known as double descent.
You are asked to design a clean, reproducible synthetic experiment demonstrating sample-wise double descent using linear regression, and explain the underlying theoretical mechanics.
Experimental Specification
Describe the experimental setup to observe the risk peak as a function of sample size n relative to a fixed feature dimension d:
- Data Generating Process (DGP): Define the distribution of features
x, the ground-truth parameter vectorw_star, and the target generation processy = x^T w_star + epsilonwith additive noise variancesigma^2. - Model Formulation: Specify the estimator across both regimes:
- Underparameterized regime (
n > d): Standard Ordinary Least Squares (OLS). - Overparameterized regime (
n < d): Minimum L2-norm interpolating estimator via the Moore-Penrose pseudoinverse.
- Underparameterized regime (
- Evaluation Protocol: Define the test risk calculation, how many independent trials per sample size
nshould be averaged to isolate variance from monte-carlo noise, and the specific range ofnto evaluate aroundn = d.
Analytical Questions
In your proposal, provide direct technical answers to the following:
- Matrix Conditioning: Explain mathematically why the expected generalization error peaks when
nis approximately equal tod. How do the singular values of the empirical design matrixXbehave asnapproachesd? - Bias-Variance Decomposition: Break down the behavior of the bias and variance terms as
ncrosses the interpolation threshold fromn d. - Effect of Noise: What happens to the double descent peak if the label noise
sigma^2is set to exactly 0? Does the peak still exist? Explain why or why not.
Hints
Hint 1
Consider how the Moore-Penrose pseudoinverse behaves when computing `w_hat = pinv(X) y` and how its smallest non-zero singular value approaches zero as `n` approaches `d`.
Hint 2
Decompose the test error into estimation error (variance) and approximation error (bias), paying attention to which term explodes near the boundary.
Hint 3
Remember that the interpolation peak is driven by the estimator fitting label noise into near-null directions of the data distribution.
Follow-up questions
- How does adding an explicit L2 regularization term (ridge regression with penalty lambda > 0) alter the shape of the test error curve around n = d?
- How does the double descent curve change if the features have an anisotropic (e.g., power-law decaying) covariance spectrum rather than an isotropic identity covariance?
- How does epoch-wise double descent observed in deep neural networks relate to the sample-wise double descent analyzed in linear models?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.