Suppose you use a train/validation/test split to choose among candidate models (with 0–1 loss) on a validation set of size . Using Hoeffding's inequality and the union bound, how large must be so that simultaneously all validation errors are within of their true errors with probability at least , why do large datasets not need 20\% validation splits, and should you retrain on train+validation before testing?
Foundations, Model selection
Level L4 Advanced. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you can size a validation set quantitatively from Hoeffding + union bound and design train/validation/test splits properly across dataset scales.
Key idea
Validation accuracy depends on the *absolute* validation count (growing only as ) rather than a fixed percentage of , and once is locked in, retraining on train+validation uses more data without touching the test set.
Steps
- Apply Hoeffding's inequality and the union bound over the fixed trained models: for each model , is an average of i.i.d. Bernoulli indicators in , so . By the union bound over models,
- Solve for with , and : so examples suffice (notice grows only logarithmically in , though choosing adaptively on the validation set repeatedly still erodes the independence of later candidates).
- Explain split sizing across dataset scales: for , a 20\% validation split wastes training points when validation examples () already achieve standard error , so splits like 98/1/1 are sensible at massive . Conversely, for small (say ), a single 20\% validation set ( points) is too noisy, motivating -fold CV.
- Address retraining: once you pick the single best hyperparameter on the validation set, yes — retrain the model from scratch on the combined train+validation data with fixed, and evaluate that final model once on the untouched test set (provided does not depend directly on sample size, or is scaled appropriately, e.g., regularisation strength in an averaged-loss objective, and early-stopping epochs are handled carefully since no separate early-stopping set remains).
Common mistakes
- Keeping a rigid 60/20/20 rule on datasets with millions of rows, starving training or wasting compute.
- Retraining on train+validation when early stopping was the main regulariser without adjusting the stopping rule (because you no longer have a held-out validation set to decide when to stop).
- Re-using the test set across many iterative model tweaks, which makes the test set an adaptive validation set and invalidates the union bound.
How long your answer should be
Half a page; 5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Foundations: Suppose you evaluate hyperparameter settings using a single 5-fold cross-validation loop and report the minimum CV error as your model's expected generalisation error. Why is this estimate optimistically biased, how does nested cross-validation eliminate this selection bias, and how many model fits does a -outer, -inner nested CV over hyperparameter candidates require for , and (including refitting)?
Next in Foundations: A binary classification population has positive-class proportion , and a fixed classifier has true error rates on positives and on negatives. How do the bias and variance of the validation error estimate compare between i.i.d. validation draws (simple random sampling) and stratified validation draws ( positives and negatives, assumed integers), and when does stratification reduce variance the most?