Why Memorising Fails
A model can always score perfectly on data it has already seen — memorise it. The test is data it has never seen. That gap is where all the interesting failure lives.
The three failures
Underfitting — the model is too simple to capture the pattern. It does badly everywhere. Overfitting — the model has memorised noise as if it were signal. It does beautifully on training data and poorly on new data. The goal is the middle: the simplest model that still explains the data.
The discipline of holding data back
You split your data into three parts. A training set the model learns from. A validation set you use to make the choices — how big, how long, which regulariser. And a test set you touch once, at the end. The test score is the only honest one. Tune against it instead and it quietly becomes a second training set. It stops telling you the truth.
Regularisation is any pressure against memorisation: weight decay, dropout, early stopping, or using less capacity. All of them deliberately make the model worse on training data in the hope of making it better on the truth.
When the world moves
Holding data back assumes the held-back data looks like the training data. It usually does, because both were drawn from the same pile. Deployment breaks that assumption. The world you ship into is not the world you sampled from: the users are new, the language drifts, the camera sits in a different room, the sensor ages. Distribution shift is the name for that gap. It is the difference between a model that scores well and one that keeps working. A classifier can be near-perfect on an in-distribution test set, then collapse on a slightly blurred or noisier copy of the same pictures. That is why robustness to corruptions and shifts is benchmarked separately from accuracy.
Grokking is the stranger phenomenon. Train a small network on a tiny algorithmic task and test accuracy can sit at chance for thousands of steps after the training loss has already hit zero — the model is memorising. Then, with no change but more training, it suddenly generalises almost perfectly. The transition is real and repeatable. Why it happens is still argued about. It is a useful correction to the picture of learning as one smooth descent: generalisation can arrive late, all at once, after a long stretch that looks like failure.
The bias-variance tradeoff
Bias is error from a model too rigid to see the pattern. Variance is error from a model so flexible it chases noise. You cannot usually reduce one without raising the other — you balance them.