Visual explainer
Learning Curves
Compare training and held-out error as sample size grows, using a checked mean predictor and a visible population-shift limit.
A learning curve compares training and held-out performance as the number of training rows changes. Refit the same model at each size, then score it on data excluded from that fit. The three strips represent 2, 4 and 8 rows; the validation set stays separate. This is a data-size curve, not an epoch-by-epoch training history.
Keep preprocessing inside each training subset. Repeat the procedure across suitable splits to see how sensitive the result is to the sampled rows. The scikit-learn learning-curve reference describes this protocol.
Read Both Axes
Here, horizontal position is training size and vertical position is mean squared error (MSE), so lower is better. Circles identify training error; diamonds identify validation error. At the same size , the expected errors in our synthetic example are 0.75 and 1.25. The vertical guide ties both measurements to the same fit size.
The example has no informative input feature. Each independent target is equally likely to be 0 or 2, and the model predicts its training targets' mean . Every error uses squared target units. These are exact analytical expectations, not measured benchmark results or confidence intervals.
A Realized Plateau
First consider specific balanced subsets: half the targets are 0 and half are 2 at each size. Every fitted mean is 1. Both training MSE and MSE on a fixed balanced validation set equal . Adding more balanced rows changes neither score.
These are realized balanced subsets, unlike the expectations in the preceding scene. A small gap alone does not prove a good model. Error must be judged against the task and available information; a plateau suggests experiments, rather than identifying a guaranteed cure.
One Row Can Overfit
With one training target equal to 0, the fitted mean is 0 and training MSE is zero. On a separate balanced validation set, targets 0 and 2 give squared errors 0 and 4, averaging 2. The dashed line is the model's prediction; the vertical bracket is the residual for target 2. The vertical axis here is target value, not MSE.
A generalization gap can appear even for a one-parameter constant model. It does not require a large network, and it does not by itself prove that buying data is the best intervention.
The Expected Gap Narrows
Return to averaging over every possible training sample. The target mean is 1 and variance is 1, so and . An independent future target gives
For , the training errors are and fresh errors are . The expected gap shrinks from 2 to 0.25. Training error rises because fitting more independent labels removes the one-row model's accidental perfect fit. Straight joins connect checkpoints; they are not extra observations. A finite validation set can deviate from these expectations.
Try An Informative Feature
This controlled experiment changes the data assumption explicitly: now is 0 or 1 and without noise. Both panels show the same two points and target scale. A constant prediction of 1 leaves residuals of magnitude 1 and MSE 1. Giving the model the informative feature lets the predictor hit both points, with MSE 0 on training and fresh examples from this rule.
The original random-target fixture cannot be solved this way: it has no informative feature to recover. A learning curve motivates checks of features, capacity and optimization; it cannot select among them without further evidence.
An Information Floor
Return to the original featureless distribution. Identical observed inputs can lead to either target 0 or target 2. The best fixed prediction is the midpoint 1: for any prediction , fresh expected squared error is , minimized at 1.
The floor of 1 belongs to this distribution and these observed features. It is not a universal percentage of bad labels. More data estimates the midpoint more reliably but cannot reveal an independent future coin flip.
Repeat The Subsets
At , the four equally likely ordered target pairs are 00, 02, 20 and 22. Their fitted means are 0, 1, 1 and 2. On the same balanced validation set, their MSEs are 2, 1, 1 and 2. The dashed line is their average, 1.5.
Repeating subsets exposes variation hidden by a single curve. These four bars enumerate sample outcomes; they are not four sample sizes or a statistical confidence interval. Real splitting must also respect groups or temporal dependence when present.
Smaller Marginal Gains
In the same analytical example, doubling through 2, 4, 8 and 16 reduces expected fresh MSE through 1.5, 1.25, 1.125 and 1.0625. The successive improvements are 0.25, 0.125 and 0.0625. All bars share a zero baseline, and horizontal spacing is proportional to sample size.
This demonstrates diminishing returns in this model. It is not a promised return on a labeling budget. Compare the uncertainty and operational cost of the next experiment with the benefit you need.
Where It Breaks
Keep the model trained on 8 independent targets drawn from 0 or 2, but change future targets to 4 or 6 with equal probability. Their mean is now 5 and variance remains 1. Fresh expected MSE becomes , versus 1.125 on the original population. The bars share a new 0–20 MSE scale so neither is clipped.
A favorable validation curve only measures the population represented by its validation procedure. It cannot guarantee performance after this target shift. The learning-curve guide supports using curves to investigate bias and variance; the numerical shift here is our synthetic counterexample.
The Quick Version
- Refit at each training size and keep validation separate.
- Compare both errors using the same metric and scale.
- A narrow gap alone does not establish a good model.
- Repeat subsets to expose variation at each size.
- Extra data cannot recover information absent from observed inputs.
- Validation curves cannot promise performance after population shift.