VC Dimension, Sauer's Lemma and Rademacher Complexity
The two standard measures of a hypothesis class's capacity, with complete proofs of Sauer's lemma and the Rademacher generalisation bound.
VC dimension
Let . For write
shatters if . The growth function is , and the VC dimension is
If then for every ,
Key idea
Sauer's lemma is a phase transition: the growth function is exactly up to and then switches to polynomial forever after. There is no intermediate behaviour. This is what makes VC theory work: substituting for in the finite-class bound gives a useful result, whereas would give nothing at all.
Let and let be the zero-one loss. With probability at least ,
The derivation combines symmetrisation, Sauer's lemma applied to the (at most ) labellings on the doubled sample, and Massart's lemma below; it is carried out in the references and the structure is exactly the one reproduced for the Rademacher bound in the next section.
Let be the homogeneous halfspaces. Then . With a bias term, .
Rademacher complexity
For a class of functions and a sample , the empirical Rademacher complexity is
with i.i.d. Rademacher, and the Rademacher complexity is .
Let be a class of functions . With probability at least over the sample, simultaneously for all ,
Key idea
Two ingredients, each from an earlier page: McDiarmid to concentrate the uniform deviation around its mean, and symmetrisation to bound that mean. The decomposition is worth remembering because it localises the difficulty: the concentration step is universal and cheap, and all the class-specific work is in bounding .
Let be finite with for all . Then
Applying Massart with , so and , gives
which recovers the VC bound. So the Rademacher route subsumes the combinatorial one.
Let and suppose . Then
The bound does not depend on the dimension of .
Key idea
This is the single most important capacity bound in the subject, and the reason margin-based methods work in high dimension. The complexity is controlled by , not by the dimension. So a linear classifier in with small norm is a low-capacity object, while the VC dimension of the unconstrained class is . The SVM margin bound is this proposition plus the contraction lemma, and the same mechanism is what norm-based bounds for neural networks attempt to exploit.
If is -Lipschitz then .
Quoted from Ledoux–Talagrand via the references. It is the tool that converts a bound on the complexity of the predictor class into a bound on the complexity of the loss class: the hinge loss is -Lipschitz, the logistic loss is -Lipschitz, and a ramp surrogate for the zero-one loss at margin is -Lipschitz — whence the in every margin bound.
Two other routes to generalisation
An algorithm is -uniformly stable if for every pair of samples differing in one point, and every ,
Bousquet and Elisseeff show that such an algorithm satisfies , and that regularised ERM with a -strongly convex regulariser is -stable.
For a prior over hypotheses fixed before seeing the data and any posterior (possibly data-dependent), with probability at least ,
Both are algorithm-dependent, which is what makes them candidates for explaining deep learning where uniform convergence fails: stability speaks about what the optimiser does, and PAC-Bayes charges only for the information the posterior adds to the prior. Neither has yet produced a non-vacuous bound for a state-of-the-art network trained on a standard benchmark, which is the honest state of the art.
Problems
Prove the Sauer–Shelah lemmaProof · Graduate · 3 hours VC dimension of halfspacesProof · Intermediate · 30 min A one-parameter class with infinite VC dimensionProof · Advanced · 1 hour Massart's finite maximal inequalityProof · Advanced · 30 min Rademacher complexity of a norm-bounded linear classProof · Advanced · 30 min Derive the margin generalisation boundProof · Graduate · 1 hourReferences
- BookShai Shalev-Shwartz and Shai Ben-David (2014). Understanding Machine Learning: From Theory to Algorithms
- BookMehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar (2018). Foundations of Machine Learning
- PaperPeter L. Bartlett and Shahar Mendelson (2002). Rademacher and Gaussian Complexities: Risk Bounds and Structural Results
- PaperDavid A. McAllester (1999). Some PAC-Bayesian Theorems
- PaperOlivier Bousquet and André Elisseeff (2002). Stability and Generalization
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
- DefinitionShattering, growth function and VC dimensionThe combinatorial capacity of a binary hypothesis class.
- TheoremSauer–Shelah lemmaproof includedA class of VC dimension d produces at most order n^d labellings on n points — polynomial, not exponential.
- TheoremVC generalisation boundThe uniform deviation is of order the square root of (d log n) over n for a class of VC dimension d.
- PropositionVC dimension of linear classifiersproof includedHomogeneous halfspaces in d dimensions have VC dimension exactly d.
- DefinitionRademacher complexityThe expected best correlation of the class with random signs.
- TheoremRademacher generalisation boundproof includedThe uniform deviation is bounded by twice the Rademacher complexity plus a concentration term.
- LemmaMassart's finite lemmaproof includedThe Rademacher complexity of a finite set grows like the square root of log cardinality.
- PropositionRademacher complexity of a norm-bounded linear classproof includedBounded linear predictors have Rademacher complexity BR over the square root of n, with no dimension dependence.
- LemmaTalagrand contractionComposing a class with a Lipschitz function multiplies its Rademacher complexity by the Lipschitz constant.
Problems (6)
All problems- VC dimension of halfspacesProofIntermediate⏱ 30 min
- Rademacher complexity of a norm-bounded linear classProofAdvanced⏱ 30 min
- Derive the margin generalisation boundProofGraduate⏱ 1 hour
- Massart's finite maximal inequalityProofAdvanced⏱ 30 min
- Prove the Sauer–Shelah lemmaProofGraduate⏱ 3 hours
- A one-parameter class with infinite VC dimensionProofAdvanced⏱ 1 hour