Where We Are
Train/validation/test splits introduced a crucial idea: learning and judging must use different evidence. Now we can see why.
1. A student can memorize without understanding
Give a student 20 questions plus their answers. Tomorrow ask the same 20 questions. A perfect score proves memory, not mastery.
A model can do the same thing.
training examples → model → training accuracy = 100%
new examples → model → accuracy = 62%
The first number answers, “Did the model fit what it saw?” The second asks, “Did it learn a reusable rule?”
2. Training error is optimized directly
Learning algorithms choose parameters to reduce training loss:
So low training loss is partly guaranteed by the procedure. It is not independent evidence of generalization.
A sufficiently flexible model can even memorize random labels.
3. The generalization gap
Define
A large positive gap is a warning that the model behaves much better on familiar data than unseen data.
But the gap alone is not enough. High train and validation loss means the model may be underfitting.
4. Learning curves tell a story
Track train and validation performance as training proceeds.
loss
↑ validation \__/
| training \____
+--------------------→ epochs
If training loss keeps improving while validation loss worsens, the model is learning details that do not transfer.
5. The deeper lesson
The purpose of ML is not to minimize yesterday’s error. It is to make good predictions on data drawn from the future task distribution.
That is why every serious experiment reports held-out performance and why the test set must remain untouched until final evaluation.
Break It
Give a large decision tree a tiny dataset with random labels. It may reach nearly perfect training accuracy. That success is exactly the failure we wanted to expose.
What to Remember
- Training performance measures fit, not generalization.
- A flexible model can memorize.
- Validation performance supplies evidence on unseen data.
- Learning curves expose divergence between fitting and generalizing.
Next → Overfitting and Underfitting: what are the two fundamentally different ways a model can fail to learn the right pattern?