Introduction to Online Convex Optimization IX: From Online Convex Optimization to PAC LearningTextbook
Motivation
Every algorithm in Chapters I–VIII minimizes regret, an online, adversarial performance measure with no reference to a data-generating distribution. Chapter 9 asks what regret minimization buys in the classical statistical learning setting, where examples are drawn i.i.d. from a fixed distribution and the goal is a hypothesis that generalizes well to unseen data. The chapter's answer is a black-box reduction: run any OCO algorithm on the sequence of losses induced by i.i.d. training examples, average its iterates, and the sublinear-regret guarantee converts directly into a PAC generalization bound — with no algorithm-specific analysis required.
Setting
A hypothesis predicts labels from examples ; its generalization error against a distribution over labeled pairs is for a loss function . Section 9.1's Theorem 9.1 (No Free Lunch) shows this goal is hopeless without restricting to a hypothesis class : for any learning algorithm and any sample size , there is a domain, a zero-error concept, and a distribution against which the algorithm's learned hypothesis is wrong at least of the time with probability at least . Definitions 9.2–9.3 (PAC and agnostic PAC learnability) and Theorem 9.4 (finite classes are agnostically PAC learnable) set up the target the chapter's reduction achieves for a much broader class of hypothesis sets.
Section 9.2's reduction (Algorithm 29) takes any OCO algorithm and a convex hypothesis class : draw i.i.d. labeled examples, feed the loss function at each round, and output the running average of 's iterates.
Formalization targets
Theorem 9.1 (No Free Lunch, milestone)
For any domain with and any algorithm , there is a concept and a distribution with and .
Theorem 9.5 — the mission's goal
For any , with probability at least ,
Significance
Theorem 9.5 is a genuine reduction theorem, in the strongest sense the book uses that phrase in
this manuscript: it needs no property of beyond a regret bound, so every sublinear-regret
algorithm in Chapters III–VIII (online gradient descent, RFTL, the bandit and projection-free
algorithms) is, via this one theorem, automatically also an agnostic PAC learning algorithm for
its hypothesis class — with an explicit, finite-sample generalization bound, not merely an
asymptotic guarantee. This is also the book's only chapter connecting OCO to classical statistical
learning theory, making Theorem 9.5 the bridge result the rest of the manuscript's machinery feeds
into. No prior art was found on the platform for PAC learning, no-free-lunch, or generalization
bounds in this sense (planning search: q=PAC, q=no+free+lunch, q=generalization — the one
"no free lunch" hit found, PRNGCompression.prng_no_free_lunch, is an unrelated
Kolmogorov-complexity result, not a substitute); this mission drafts both results fresh.
Difficulty
Theorem 9.1's proof (the probabilistic method) computes an expectation over a uniformly random concept and a uniformly random sample simultaneously, shows this joint expectation of the learned hypothesis's error is at least , and only then extracts (i) the existence of a single bad concept via linearity of expectation, and (ii) a probability bound via Markov's inequality on the error as a random variable over samples for that fixed concept — a genuinely two-stage probabilistic argument, not a direct combinatorial construction. Theorem 9.5's proof (not included in the excerpted milestone pages, continuing past PDF p. 180 into §9.2.1's Azuma's inequality machinery) builds a martingale from the sequence of per-round loss deviations and applies a concentration inequality to convert the algorithm's regret bound (a statement about the sum of realized losses) into a high-probability statement about 's expected loss under — the gap between "regret is small" and "generalization error is small" is exactly what the martingale/concentration argument closes.
Formalization scope
GeneralizationError/GeneralizationErrorZeroOne give the two loss regimes the chapter uses:
a general parametrized real-valued hypothesis (matching the linear-hypothesis convention of §9.1.3, generalized via an explicit pred evaluation map since the book's own
notation "" for implicitly identifies a parameter vector with
its induced predictor) and the zero-one loss for Bool-labeled concepts (Theorem 9.1's own
setting). IsAgnosticReductionRun formalizes Algorithm 29's construction directly, including its
round-0 convention (h_1 ← A(∅), matching the series' standing convention for an empty history)
and the i.i.d. sampling assumption made explicit via ProbabilityTheory.iIndepFun and identical
marginal law D. Theorem 9.5's own regret hypothesis (hA) states "an OCO algorithm whose regret
is guaranteed to be bounded by RegretT(A)" as a genuine property of A — holding for every cost
sequence and horizon — matching the book's phrasing exactly, not a one-off fact about the single
realized (random) cost sequence this particular run produces. The loss ℓ is assumed bounded in
[0,1], the chapter's implicit standing assumption (matching the zero-one loss and bounded
hinge-loss examples of §9.1.3) needed for the concentration argument behind the
√(8log(2/δ)/T) term; see MODERATION_NOTES.md.
Not formalized: Definitions 9.2–9.3 (PAC/agnostic-PAC learnability) and Theorem 9.4 (finite-class
PAC learnability), per BRIEF.md's explicit guidance that Theorem 9.4's proof is not
self-contained on these pages but spread across the whole chapter, culminating in Theorem 9.5
itself — treating it as background context rather than a separate formalization target avoids
either reconstructing that proof or drafting a numbered result whose "proof" would just be a
forward reference to this mission's own goal. Theorem 9.5's optional corollary form (the sample
complexity bound T = O((1/ε²)log(1/δ) + T_ε(A))) is likewise not drafted, per BRIEF.md's
"otherwise keep the milestone to the displayed inequality." §9.2.1's Azuma's inequality survey
(background probability theory, available in Mathlib's Probability/Martingale/) is not itself a
formalization target.
Selected references
- E. Hazan, Introduction to Online Convex Optimization, 2nd ed., arXiv:1909.05207v3, Chapter 9.
- 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.