Foundations of Machine Learning II: Rademacher Complexity and VC-DimensionTextbook
Motivation
Chapter 2's finite-hypothesis-set learning bound is uninformative the moment is infinite — diverges — yet most hypothesis sets used in practice (linear separators, neural networks, decision trees) are infinite. Chapter 3 answers the question the previous chapter's own worked example (axis-aligned rectangles, Example 2.4) leaves open: is efficient learning from a finite sample still possible for an infinite hypothesis set, and can this be shown in general rather than case by case? The chapter's answer runs through two complementary notions of complexity — Rademacher complexity, a data-dependent measure of how well a function family correlates with random noise, and the VC-dimension, a purely combinatorial measure of the number of distinct labelings a hypothesis set can realize on a finite point set — connected by Massart's lemma and Sauer's lemma, and culminating in a generalization bound that replaces with the VC-dimension .
Setting
For a family of functions and a sample , the empirical Rademacher complexity (Definition 3.1) measures how well fits random sign noise on ; the Rademacher complexity (Definition 3.2) averages this over samples. Theorem 3.3 converts a Rademacher-complexity bound directly into a generalization bound via McDiarmid's inequality. For binary hypothesis sets , the growth function (Definition 3.6) counts the maximum number of distinct dichotomies realizes on points, and the VC-dimension (Definition 3.10) is the largest for which (i.e. shatters some set of points). Massart's lemma (Theorem 3.7) is the purely combinatorial tool bounding the expected maximum of a sum of signed vector components by , and Sauer's lemma (Theorem 3.17) bounds the growth function itself, by induction on , whenever the VC-dimension is finite.
Formalization targets
Theorem 3.3 (Rademacher generalization bound, milestone). For and any , with probability at least over an i.i.d. sample of size , for all : .
Theorem 3.7 (Massart's lemma, milestone). For a finite with : .
Theorem 3.17 (Sauer's lemma, milestone). For with , for all : .
Corollary 3.19 — the mission's goal. For with and any , with probability at least , for all :
Significance
Corollary 3.19 is the chapter's answer to the question chapter 2 leaves open: it is Theorem
2.13's direct infinite-hypothesis-set generalization, replacing (undefined for
infinite ) with the VC-dimension (finite even for many infinite hypothesis sets, such
as halfspaces in , which have VC-dimension ). It is also the template every
later margin bound in the book specializes (Chapters 5, 9, 10's SVM, multi-class and ranking
margin bounds all replace this bound's uniform /VC-dimension term with a
scale-sensitive complexity measure derived from the same Rademacher-complexity machinery), and
Sauer's lemma is independently one of the most cited results in learning theory and extremal
combinatorics. No prior art on the Prove2Me platform is faithful to any of this chapter's
content: RademacherSymmetrization.radS_chernoff (Aether Catalog) proves a different,
Massart-optimized Chernoff bound for the empirical Rademacher complexity of a finite class —
a different object (empirical vs. population) with a different bound form from Theorem 3.3/3.5
— and sauerShelah_full proves only the trivial identity sauerShelahBound k k = 2^k, not
Sauer's lemma itself. A further hit, sauer_shelah (Aether Catalog, Algebra/SauerShelah.lean),
does state the Sauer-Shelah bound itself (F.card ≤ ∑_{i≤d} C(n,i) for a family F of subsets
of Fin n shattering no set larger than d) — checked and not reused: it is a different idiom
from Theorem 3.17 as this chunk needs it, a fixed finite ambient domain Fin n with F a
Finset of its subsets directly, rather than the book's own growth function Π_H(m) (a
supremum over point-tuples drawn from an arbitrary, possibly infinite X, Definition 3.6) that
this chunk's other items and the goal (Corollary 3.19) are built on; reusing it would require
either abandoning GrowthFunction/HasVCDim (needed faithfully by the goal itself) or a
nontrivial reduction lemma this mission's budget does not include, so sauer_lemma is drafted
fresh against this chunk's own GrowthFunction/HasVCDim. All ten items are drafted fresh.
Difficulty
Sauer's lemma's proof is a genuine two-parameter induction (on ) with a real combinatorial
construction: restricting to a sample of size , then splitting the restricted
family into (its restriction to the first points) and (the concepts whose
membership in changes with the addition of the -th point), with and
— a genuinely combinatorial argument, not a
statement that unfolds by simp; a weaker restatement using only the trivial bound
would be true but is explicitly not what Theorem 3.17 states (BRIEF.md's
named trivializing formalization for this chapter). Massart's lemma needs the expectation of a
supremum over a finite set of -many sign patterns kept as an honest average, not silently
replaced by a looser union bound. Corollary 3.19's own term inside the logarithm needs
the side condition carried through explicitly — Corollary 3.18's own domain restricts
to , and the bound is false, not merely unproved, without it (at , can be
smaller than , making the logarithm negative).
Formalization scope
GeneralizationError/EmpiricalError are restated locally in this chunk's RademacherVC
namespace (byte-identical in content to chunk 02-pac's own copies), since a draft item cannot
import another chunk's draft module; this duplication is expected and will collapse once
02-pac is moderated, uploaded and listed as reusable in missions/README.md's "Published
definitions" table. EmpiricalRademacherComplexity/Massart's lemma model the Rademacher signs
σ as ranging over the finite type Fin m → Bool rather than a measure-theoretic i.i.d.
process, so the "expectation over σ" in both is the exact finite uniform average over its
2^m outcomes — faithful and simpler than a MeasureTheory construction, since σ's
distribution really is uniform on a finite set of outcomes for every finite m. GrowthFunction
takes a tuple of m points (Fin m → X) rather than a size-m subset of X, a harmless
generalization (repeated points never increase the dichotomy count) documented in the item's own
docstring. HasVCDim is a Prop parametrized by the candidate dimension rather than a total
ℕ/ℕ∞-valued function, so it does not cover the book's VCdim(H)=+\infty case (Examples
3.15-3.16); every theorem using it takes HasVCDim H d as an explicit hypothesis, matching the
book's own "let H... with VCdim(H)=d." Theorem 3.3 adds an explicit measurability
hypothesis on G (hGm) beyond the book's own displayed statement, needed to keep the Bochner
integral ∫ z, g z ∂D from silently evaluating to 0 for a non-measurable g — this is the
book's own standing assumption (footnote 3, p. 30) made an explicit hypothesis rather than an
implicit one. No numerical constant in any of the four theorems is altered from the book's own;
Corollary 3.19's side condition d ≤ m is kept explicit, per BRIEF.md's pitfall note.
Not formalized: Lemma 3.4 and Theorem 3.5 (the binary-classification specialization of Theorem
3.3 via the zero-one-loss identity ), Corollary 3.8 and
Corollary 3.9 (the intermediate Rademacher-to-growth-function and growth-function
generalization bounds), and Corollary 3.18 (the VC-dimension bound on the growth function,
for ) — five intermediate results in the proof chain
Theorem 3.3 → Theorem 3.5 → Corollary 3.8/3.9 → Sauer's lemma → Corollary 3.18 → Corollary 3.19
that are not independently drafted as milestones, per the budget guidance to keep a chunk to a
goal plus its most load-bearing 3-8 milestones rather than every numbered result on the page;
the three drafted milestones (Theorem 3.3, Massart's lemma, Sauer's lemma) are the chain's three
genuinely distinct proof techniques (McDiarmid's inequality, a probabilistic-maximum bound, and
a combinatorial induction), and the goal theorem's own statement is Corollary 3.19 exactly as
displayed, not a restatement of any intermediate corollary. Radon's theorem (Theorem 3.13,
background for the hyperplane VC-dimension example) and the worked VC-dimension examples
(intervals, hyperplanes, rectangles, convex polygons, sine functions) are illustrations, not
general results, and are not formalized — drafting only the example computations (e.g.
VCdim(hyperplanes) = d+1) instead of the general finite-H machinery is exactly the
trivializing formalization this mission avoids.
Selected references
- M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT Press, 2018, Chapter 3.
- V. Vapnik, A. Chervonenkis, "On the uniform convergence of relative frequencies of events to their probabilities," Theory of Probability and its Applications 16(2), 1971, 264-280.
- N. Sauer, "On the density of families of sets," Journal of Combinatorial Theory, Series A 13(1), 1972, 145-147.