generalization
/ JEN-ur-uh-lih-ZAY-shun /
Generalization is a model's ability to do well on data it has never seen — not just on the examples it studied. It is the entire point of machine learning. A child who has met a few dogs can recognize a breed they have never encountered; that leap from specific examples to a working rule is generalization. A model that can only repeat the answers to its practice questions has learned nothing useful, the way memorizing one exam paper teaches you nothing for a different exam.
We measure it honestly by hiding some data from the model during training and then testing on that held-out set. Strong performance on the training examples but weak performance on the held-out ones means the model has overfit — it memorized quirks and noise instead of the real pattern. The reverse problem, doing poorly even on the training data, is underfitting: the model is too simple to capture the pattern at all. Good generalization threads between the two.
Crucially, generalization is never guaranteed and never unconditional. A model generalizes only to data that resembles what it was trained on. Train a model on sunny-day photos and it may fail in the rain; train it on one hospital's patients and it may stumble at another. This breakdown when the world shifts — distribution shift — is one of the most common and underappreciated ways real systems fail. Generalization is a hopeful bet, supported by careful testing, not a promise.
A model scores 99% on the 10,000 photos it trained on but only 71% on a fresh batch it has never seen. The 71% is the number that matters — it is the honest estimate of how the model will behave in the wild. The gap between 99% and 71% is the price of overfitting.
Only the score on unseen data tells you whether a model truly learned.
A model can only generalize to data drawn from the same kind of distribution it was trained on. When the real world drifts away from the training data, even an excellent model quietly degrades — so monitoring after deployment matters as much as testing before it.