Empirical Risk Minimisation and Uniform Convergence
Why minimising training error can work, why it needs a uniform bound, and the finite-class and PAC guarantees that follow.
The setup
Data on , a hypothesis class , a loss . Define
Empirical risk minimisation returns .
Let and let
be the uniform deviation. Then
and therefore
Key idea
This three-line argument is the reason the whole subject is about . It also displays the fundamental tension: enlarging decreases the approximation error and increases . That is the honest statement of the bias–variance trade for ERM — and note that it is a statement about this bound, not about the true risk, which is exactly the loophole the double-descent phenomenon exploits.
Finite classes
Let and . With probability at least over the sample,
and consequently .
Assumptions
Bounded loss, i.i.d. sample, and a hypothesis class fixed before seeing the data. The last is the one most easily violated in practice: any hyperparameter chosen by looking at the test set effectively enlarges , and the bound must be inflated accordingly.
Suppose some has and the loss is the zero-one loss. Then with probability at least , any ERM solution (which necessarily has ) satisfies
Key idea
instead of — a genuinely different rate, obtained by replacing Hoeffding's two-sided bound with the exact one-sided multiplicative bound available when the variance is small. This is the simplest instance of a fast rate under a low-noise condition, and it is the reason interpolating classifiers are not automatically suspect: when the problem is realizable, fitting the training data exactly is the right thing to do.
PAC learnability and the necessity of inductive bias
is agnostically PAC learnable if there is a function , polynomial in and , and an algorithm , such that for every distribution and every ,
Let be a domain of size and consider the zero-one loss with and the class of all functions . For every algorithm using samples there is a distribution on which
while some has .
Key idea
Inductive bias is not a regrettable practical compromise; it is a mathematical necessity. Learning is impossible over the class of all functions, so every working learning algorithm encodes assumptions about which functions are plausible — through the hypothesis class, the regulariser, the architecture, or the optimiser's implicit preferences. "This model has no assumptions built in" is always false. The interesting question is never whether there is an inductive bias but what it is, which is why the implicit-bias results on the deep learning theory page matter so much.
From finite to infinite classes
The finite-class bound is useless for infinite — every interesting class, including all linear classifiers. Two routes out, both developed on the next page:
- Combinatorial. Replace by the number of distinct labellings the class can produce on points, the growth function . Sauer's lemma bounds this by where is the VC dimension, so takes the place of .
- Analytic. Bound directly by the Rademacher complexity of the class, which is a scale-sensitive measure that does not require finiteness at all.
The bridge to both is symmetrisation, which replaces the unknown population risk by a second independent sample:
Let be a class of functions . Then
where are independent Rademacher signs.
What uniform convergence cannot do
Empirical observation — a regularity seen in experiments. No theorem on this page establishes it in general.
There are settings — including realistic overparameterised networks — where the trained model generalises well while the uniform deviation over any hypothesis class containing it is close to its maximum possible value, making every uniform-convergence bound vacuous.
What this does not say
Nagarajan and Kolter construct explicit examples where the generalisation gap of the learned predictor is small but any bound derived by uniform convergence over a class containing the algorithm's possible outputs is near-trivial — even when the class is restricted to exactly the hypotheses the algorithm can return on samples of that size. The obstruction is not looseness of the union bound; it is that the two-sided uniform deviation is genuinely large.
What follows and what does not:
- Uniform convergence remains sufficient: when the bound is non-vacuous, it is a real guarantee, and for classical model classes it is the right tool.
- It is not necessary, so the failure of a uniform bound is not evidence that a model will generalise badly.
- Explaining generalisation in the overparameterised regime therefore requires algorithm-dependent analysis — stability, PAC-Bayes with a data-dependent prior, margin-based bounds, or implicit-bias characterisations — not a better bound on .
This is an active research area, and there is no settled answer.
Problems
The excess risk decomposition for ERMProof · Beginner · 15 min Generalisation for a finite classProof · Beginner · 30 min The fast rate in the realizable caseProof · Intermediate · 30 min The no-free-lunch theoremProof · Advanced · 1 hour The symmetrisation lemmaProof · Graduate · 1 hourReferences
- BookShai Shalev-Shwartz and Shai Ben-David (2014). Understanding Machine Learning: From Theory to AlgorithmsThe standard modern textbook for this material; the exposition here is written independently.
- BookMehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar (2018). Foundations of Machine Learning
- BookVladimir N. Vapnik (1998). Statistical Learning Theory
- PaperVaishnavh Nagarajan and J. Zico Kolter (2019). Uniform convergence may be unable to explain generalization in deep learning
These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.
Results stated on this page
- PropositionExcess risk decomposition for ERMproof includedThe excess risk of ERM is bounded by twice the uniform deviation plus the approximation error of the class.
- TheoremGeneralisation bound for a finite hypothesis classproof includedFor a class of size N the uniform deviation is of order the square root of log N over n.
- TheoremFaster rate in the realizable caseproof includedWhen some hypothesis has zero risk the rate improves from 1/sqrt n to log N over n.
- DefinitionPAC learnabilityA class is PAC learnable if a polynomial sample suffices to get low risk with high confidence.
- TheoremNo free lunchproof includedWithout restricting the hypothesis class no algorithm can generalise, so some inductive bias is mathematically necessary.
- Empirical observationUniform convergence is not necessary for generalisationOverparameterised models can generalise while the uniform deviation over their hypothesis class is vacuous.