The Sauer-Shelah Lemma
A combinatorial result that caps how many distinct ways a family of classifiers can label a set of points, and shows why that cap is exactly what makes VC dimension a useful measure of model complexity.
Suppose you have a family of classifiers — say, all possible single vertical cutoffs on a number line — and labelled points. How many genuinely different ways can that family label those points as positive or negative? Naively, there are possible labelings, but most classifier families can't produce anywhere near all of them: a single cutoff can only ever split the points into "everything left is negative, everything right is positive," which is just distinct labelings, not . The Sauer-Shelah lemma pins down exactly how slowly the number of achievable labelings can grow as increases, in terms of a single number describing the family's complexity.
That single number is the family's VC dimension, : the size of the largest set of points the family can label in every possible way. The lemma says that once exceeds , the number of distinct labelings the family can produce on any points is at most , which for large grows only polynomially, like , rather than exponentially like . In plain terms: a family that can only "shatter" small sets of points close together is stuck growing slowly forever after, no matter how large the dataset gets.
For the single-cutoff example, (one point can always be labeled either way, but no two points can be split all four possible ways with a single cutoff). Plugging in, the bound gives at most labelings for points — which matches the exact count.
This gap between and a polynomial in is the mathematical reason learning theory can bound how much a model can overfit: a hypothesis family with bounded VC dimension can't fit an ever-larger fraction of all possible label patterns as data grows, so agreement with the training labels starts to mean something about the underlying pattern rather than sheer flexibility.
The Sauer-Shelah lemma shows that a hypothesis family with VC dimension can produce at most a polynomial number of distinct labelings of any points (roughly ), never the full exponential — the mathematical basis for why bounded model complexity limits overfitting.
Related concepts
Practice in interviews
Further reading
- Sauer, 'On the density of families of sets', 1972
- Shelah, 'A combinatorial problem', 1972