Project 3 of 9, for Paul
Paper Reproduction
Paul's question about what big models really learn: double descent, from a 2019 paper, reproduced in NumPy at a size that runs in seconds. The pieces, the curve, one experiment of your own, and an honest account of what didn't match.
Act 9 needs a free account, so your work is saved as you go. Act 1 is open to everyone.
The brief
- PaulThis is a paper from 2019 saying the overfitting U from the Model Room is only half right, the first half.
- PaulPast the point where a model fits every example, the test error comes down again, allegedly.
- YahyaSo degree eleven was right all along?
- PaulNo. Well, possibly not. We reproduce it before anybody says anything.
- PaulMake it small enough to run twice, and then actually run it twice.
Belkin, Hsu, Ma and Mandal, "Reconciling modern machine-learning practice and the classical bias-variance trade-off", Proceedings of the National Academy of Sciences 116 (32), 2019.
The claim: as a model gets more parameters, its test error first follows the classical U, falling and then rising to a peak where the model can only just fit every training example. Past that point, if the fit with the smallest norm is chosen, the error falls again, often below the bottom of the U. They called it double descent.
Reproduce it at a size that runs in seconds:
- data made from a known answer: ten random inputs per example, the answer
tanhof their scaled sum, plus noise; 40 training examples and 400 test examples - random features, the paper's first model, but with ReLU in place of its sines and cosines: fixed random weights that are never trained, then the smallest-norm least-squares fit on top
- widths from 1 to 2000 features, ten seeds each, and the median test error at each width
- The pieces:
descent.py, checked. - The curve:
reproduce.py, checked, with your own tests intest_descent.py. - The claim in your words, and what would count as reproducing it.
- The main figure.
- One thing the paper didn't try.
- The write-up, with an honest account of what didn't match.
features test error
1 0.612
2 0.603
5 0.498
10 0.435
15 0.399
20 0.572
30 1.141
35 1.476
40 46.300
45 2.147
50 1.002
...
2000 0.312What you learn
What's in it
- The claim
- The smallest fit
- Make the pieces
- The same numbers, twice
- Make the curve
- Milestone 1: the claim, in your words
- Milestone 2: the main figure
- Milestone 3: one thing the paper didn't try
- Milestone 4: the write-up
- Ship it