Skip to content
nonconvexcard

Reproduce double descent

CodingAdvanced⏱ 3 hoursLearning Theorydouble descentsimulationrandom featuresminimum norm

Problem

Reproduce the double-descent risk curve for random-feature regression.

  1. Generate data from a linear model in Rd\R^{d}, map through NN random ReLU features, and fit the minimum-norm least-squares solution as NN varies through nn.
  2. Plot test risk against N/nN/n and identify the peak.
  3. Show that adding ridge regularisation with a well-chosen λ\lambda removes the peak entirely.
  4. Show that the peak grows with label noise and vanishes as noise →0\to0.

Implement it, then check the implementation against something you can verify independently.

Write it

Solve it here9 tests · Python runs in your browser
⌘/Ctrl + ↵ to run · limit 90s · draft saved in this browser
9 tests will run against your code. The first run downloads the Python runtime — several megabytes, once per browser.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Simulate distance contrast runClassical MLCodingBeginner30 min
The bias–variance decomposition is an identityLearning TheoryProofBeginner15 min
Balls into bins, with one choice and with two runAI SystemsCodingIntermediate1 hour
Cache hit rates under Zipf popularity runAI SystemsCodingIntermediate1 hour
Gradient descent finds the minimum-norm interpolatorLearning TheoryProofIntermediate30 min