Generalization
Working on data you've never seen — the only thing that matters, and nobody can explain why deep learning does it.
When not to use it
- (Reasoning about generalisation that misleads.)*
- Classical capacity bounds on deep networks. They're vacuous — "test error below 500%" is true and useless.
- "Smaller to avoid overfitting," without knowing which side of the peak you're on. Past the interpolation threshold, bigger is better.
- Training accuracy as evidence of anything. It'll fit random labels perfectly.
- A held-out set you've looked at repeatedly. You've been training on it slowly.
Reach for something else instead
- (Ways to know whether you generalise.)*
- A clean held-out set — the only real answer, and only if you don't touch it.
- Cross-validation — when data is scarce.
- Out-of-distribution testing — the question you actually care about.
- Conformal prediction — coverage guarantees without a theory of why.
This entry is part of a longer guide: What is machine learning?
Read more on the blog
- I spent a month writing down what every AI concept depends on256 concepts, 350 prerequisite links, one rule. I wrote down my predictions first so I could not quietly retrofit the results. Two of them were wrong, and those are the interesting part.
- Why neural networks generalize when theory says they can'tA network with more parameters than training examples can memorize random labels perfectly. The same network, on real data, generalizes. Classical learning theory has no account of why, and the reason it fails is more precise than "it was wrong."
- Why does deep learning work? The generalization mysteryThe most important technology of the decade rests on a foundation we do not fully understand. By the textbook, deep networks are so oversized they should memorize their training data and fail on everything else. Instead they generalize beautifully, and nobody can fully explain why. This is the generalization mystery, and it is one of the deepest open problems in AI.
- AI in science: 380,000 predicted, 736 actually madeAlphaFold won a Nobel Prize and did not reduce the rate of experimental structure determination. A materials model predicted 380,000 stable compounds and 736 have been synthesised.
Further reading
- Zhang et al. (2017), Understanding deep learning requires rethinking generalization — networks fit random labels perfectly. The experiment that broke the theory.
- Belkin et al. (2019), Reconciling modern machine-learning practice and the classical bias–variance trade-off — double descent; bigger past the threshold is better.
- Nakkiran et al. (2021), Deep Double Descent: Where Bigger Models and More Data Hurt — it happens in model size, data size and training time.
Primary sources, listed so you can check the claims on this page rather than take them on trust.
Where people go wrong
- Believing the capacity story. Zhang et al.: it can memorise anything, so capacity isn't what stops it.
- Not knowing double descent exists, then shrinking a model that was about to get better.
- Treating flat minima as the settled explanation. Flatness isn't reparameterisation-invariant.
- Assuming the theory exists somewhere and you just haven't read it. It doesn't.
At a glance
Often compared with
Where this sits
3 concepts come first. Understanding it opens up 14 more.
Computed from the prerequisite graph, not assigned. How this works