Foundations of Machine Learning I: The PAC Learning FrameworkTextbook
Motivation
How many labeled examples does a learning algorithm need to see before its output generalizes well to unseen data? Chapter 2 of Foundations of Machine Learning answers this question for the simplest nontrivial setting — a finite hypothesis set — and in doing so introduces the book's central object, the Probably Approximately Correct (PAC) learning framework: a distribution-free, high-probability guarantee relating a learner's sample size to the accuracy and confidence of its output. Every later chapter's generalization bound (VC-based, Rademacher-based, margin-based) is a variant of the same "probability of a bad event is small" argument this chapter proves in its most elementary form, so getting the chapter's core definitions and its two bracketing theorems (consistent and inconsistent finite-) right is the foundation the rest of the book's guarantees build on.
Setting
A learner sees a sample drawn i.i.d. from a fixed but unknown distribution on an instance space , labeled by an unknown target concept drawn from a concept class ; a hypothesis from a fixed hypothesis set is judged by its generalization error (Definition 2.1) against its empirical error (Definition 2.2) on the observed sample. A concept class is PAC-learnable (Definition 2.3) if some algorithm, given a polynomially-bounded number of samples, returns a hypothesis whose generalization error is at most with probability at least , for every accuracy and confidence and every distribution — the "distribution-free" and "for all target concepts" character of the definition is what makes it a genuine worst-case learning guarantee rather than an average-case one tailored to a particular data-generating process.
Formalization targets
Theorem 2.5 (consistent case, milestone). If is finite and algorithm always returns a hypothesis consistent with the target concept on the training sample (), then whenever .
Corollary 2.11 (single-hypothesis Hoeffding bound, milestone). For a fixed hypothesis and any , with probability at least , .
Theorem 2.13 (inconsistent case, goal). For a finite hypothesis set and any , with probability at least , simultaneously for every ,
Significance
Theorem 2.13 is the chapter's capstone because it removes Theorem 2.5's consistency
requirement — the typical case in practice, where no hypothesis in perfectly fits the
training data — while paying only an additive price inside the square root, via a
union bound over applied to Corollary 2.11's per-hypothesis concentration bound. It is also
the template every later generalization bound in the book refines: Chapter 3 replaces
with the growth function / VC-dimension to handle infinite hypothesis sets, and Chapter 3's
Rademacher-complexity bound is the direct machine-independent generalization of the same
argument. No prior art on the Prove2Me platform is faithful to this chapter's PAC-learning
content (GET /theorems?q=PAC-learnable returns no hits), so all six items are drafted fresh.
Difficulty
Theorem 2.13's own proof is a short combination of two ideas already present in the chapter (Corollary 2.11's Hoeffding bound plus a union bound over hypotheses), but each ingredient carries its own faithfulness burden. Corollary 2.11 needs the sample and the target hypothesis kept in the right relationship — fixed, random — for the bound to be Hoeffding's inequality and not a vacuous statement about a random hypothesis. Theorem 2.13 needs the quantifier placed inside the probability event (a single sample must work for every at once), not outside it (which would only assert each 's bound holds with high probability for a sample chosen depending on ) — the difference between a uniform convergence bound and separate, weaker statements. Definition 2.3's "polynomial function " is a genuine formalization judgment call, addressed below.
Formalization scope
GeneralizationError/EmpiricalError are typed generally over (matching Definition
2.1/2.2's own general statement, ""), since Theorem 2.5 itself is stated for general
, not just ; Corollary 2.11 and Theorem 2.13 specialize to
, matching their own explicit "" (Corollary 2.11) and the
surrounding inconsistent-case section's restriction to binary classification. The i.i.d. sample
is modeled as the identity random variable on the product-measure space
in both Corollary 2.11 and
Theorem 2.13, matching the book's own notation exactly. IsPACLearnable
(Definition 2.3) makes "polynomial function" precise as a function bounded above by
for some constants , , uniform in its (nonnegative)
arguments — the standard reading of "polynomial in its arguments" in the absence of a
ready-made multivariate polynomial-growth predicate in Mathlib; dropping this constraint
entirely (stating only "there is some threshold function") would silently weaken Definition
2.3 to a strictly easier notion of learnability, since virtually any finite or well-behaved
concept class admits some (possibly super-polynomial) sample-complexity threshold — this is
exactly the distinction Example 2.7 (the universal concept class) uses to demonstrate a class
that is not PAC-learnable despite admitting a consistent hypothesis set. No numerical
constant in Theorem 2.5, Corollary 2.11 or Theorem 2.13 is altered from the book's own; no
upper bound on is added anywhere the book itself leaves it unrestricted (the theorems
remain true, if vacuous, for ). Not formalized: the "efficiently PAC-learnable"
running-time clause of Definition 2.3 (a second, independent polynomial-time condition on
not needed by either milestone or the goal); Corollary 2.10 (the raw two-sided Hoeffding
statement Corollary 2.11 is immediately derived from by solving for , making it
redundant with Corollary 2.11 as a formalization target); the axis-aligned-rectangles worked
example (Example 2.4–2.9), which illustrates the framework rather than proving a new general
result, and the trivializing formalization this chapter invites — reusing Mathlib's rectangle
machinery to encode only the specific two-dimensional geometric argument rather than the
general finite- theorems — is exactly what this mission avoids by drafting Theorems 2.5 and
2.13 in their general, hypothesis-set-agnostic form.
Selected references
- M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT Press, 2018, Chapter 2.
- W. Hoeffding, "Probability inequalities for sums of bounded random variables," Journal of the American Statistical Association 58(301), 1963, 13-30.