The Principles of Deep Learning Theory I: Wick's Theorem for Gaussian IntegralsTextbook
Motivation
The book The Principles of Deep Learning Theory by D. A. Roberts and S. Yaida (arXiv:2106.10165) develops a perturbative, physics-style theory of wide deep neural networks. Every later computation in the book, from the statistics of preactivations at initialization to the neural tangent kernel, reduces to Gaussian expectations of polynomials. The single tool that evaluates these expectations is Wick's theorem (eq. 1.45), which the authors ask the reader to "put a box around". This mission formalizes Chapter 1, §1.1 (Gaussian Integrals), culminating in that theorem. It is the first mission of a series formalizing the book, all in the Lean namespace DeepLearningTheory.
Setting
Fix N≥0 and a symmetric positive-definite real N×N matrix K=(Kμν), the covariance. Write Kμν=(K−1)μν for its inverse. The zero-mean multivariable Gaussian distribution with covariance K (eq. 1.31) has density on RN
and the expectation of an observable F is E[F(z)]=∫dNzp(z)F(z) (eqs. 1.36, 1.46), an integral against Lebesgue measure. A pairing of the labels 1,…,2m is a partition into m unordered pairs; equivalently, a fixed-point-free involution σ of {1,…,2m} pairing a with σ(a). There are (2m−1)!! pairings.
Formalization targets
Goal: Wick's theorem (eq. 1.45)
For all indices μ1,…,μ2m∈{1,…,N} (repetitions allowed),
E[zμ1⋯zμ2m]=pairings σ∑a<σ(a)∏Kμaμσ(a).
Milestones
Eq. (1.30) — the normalization ∫dNze−21z⊤K−1z=∣2πK∣.
Eq. (1.41) — the generating function ∫dNze−21z⊤K−1z+J⋅z=∣2πK∣e21J⊤KJ for every source J∈RN.
Odd moments vanish (p. 22, discussion after eq. 1.42).
Wick's theorem (also known as Isserlis' theorem, 1918) is used throughout the book: the Gaussianity of the first layer (Chapter 4), the four-point correlators of deep linear networks (Chapter 3), and all perturbative expansions around the infinite-width limit are evaluated by Wick contractions. A machine-checked version stated in the book's own density-based conventions gives later missions of this series a dependable foundation. The result is classical; the work remaining is its formalization in exactly this form. A related statement for general (possibly degenerate) Gaussian measures already exists on the platform as FeynmanWick.wick_theorem_gaussian; the present mission keeps the book's formulation via the explicit density and a positive-definite covariance.
Difficulty
The book's derivation differentiates the generating function (1.41) 2m times at J=0, which requires justifying differentiation under the integral sign and organizing the combinatorics of the product rule into pairings. Both the analytic step (dominated convergence for Gaussian tails, in N dimensions) and the combinatorial step (a bijection between surviving terms and pairings, with the 1/(2mm!) normalization) are routine on paper but need care in Lean. Computing the normalization (1.30) itself requires diagonalizing K and a linear change of variables.
Formalization scope
Vectors are functions Fin N → ℝ with Lebesgue measure; K is a Matrix (Fin N) (Fin N) ℝ with K.PosDef (which includes symmetry). The inverse is Mathlib's K⁻¹.
gaussianDensity K z and gaussExpect K F are exactly the book's p(z) and E[F]; gaussQuadForm K z is ∑zμKμνzν.
pairings (2m) is the finite set of fixed-point-free involutions of Fin (2m); the product is over labels a with a<σ(a), so each pair contributes once.
Positive definiteness is assumed exactly as in the book; no statement is vacuous since, e.g., K=I satisfies every hypothesis.
Selected references
D. A. Roberts, S. Yaida (with B. Hanin), The Principles of Deep Learning Theory, Cambridge University Press, 2022. arXiv:2106.10165
L. Isserlis, On a formula for the product-moment coefficient of any order of a normal frequency distribution in any number of variables, Biometrika 12 (1918). doi:10.1093/biomet/12.1-2.134
An Introduction to Computational Learning Theory III: The Vapnik-Chervonenkis Dimension, ε-Nets and Sample ComplexityTextbook
Motivation
Chapter 3 of Kearns and Vazirani, An Introduction to Computational Learning Theory (MIT Press, 1994, doi:10.7551/mitpress/3897.001.0001), asks how many random examples suffice to learn a concept from an infinite class. The cardinality bound of Occam's Razor is useless there, yet the rectangle game of Chapter 1 shows that some infinite classes are learnable from a finite sample. The answer is the Vapnik–Chervonenkis dimension: the size of the largest set on which the class realizes every labeling. Sauer's lemma says that a class of VC dimension d realizes only Φd(m)=∑i≤d(im)≤(em/d)d labelings on any m points, polynomially many rather than 2m, and the ε-net theorem of Blumer, Ehrenfeucht, Haussler and Warmuth turns this into a sample bound: a consistent hypothesis from a class of VC dimension d is probably approximately correct once m is of order (1/ϵ)(log(1/δ)+dlog(1/ϵ)). A matching lower bound shows that Ω(d/ϵ) examples are necessary. The chapter thus gives a single combinatorial parameter that characterizes, up to a logarithmic factor, the sample complexity of learning any class in the distribution-free model.
Setting
For a class C of concepts X→{0,1} and a finite S⊆X, ΠC(S) is the set of dichotomies of S realized by C; S is shattered if all 2∣S∣ are realized; VCD(C) is the supremum of the sizes of shattered sets, possibly ∞; ΠC(m) is the largest ∣ΠC(S)∣ over ∣S∣=m; and Φd(m) is defined by Φd(m)=Φd(m−1)+Φd−1(m−1), Φd(0)=Φ0(m)=1. For a target c the error regions are cΔh for h in the hypothesis class, and a set of points is an ε-net if it meets every error region of weight at least ϵ under the target distribution D. Samples, their product law, consistency and the error of a hypothesis are those of Mission I.
Formalization targets
Goal: Theorems 3.3 and 3.4
Let H be a class of VC dimension at most d, well-behaved for the target c (the double-sample event of the proof is null-measurable), and m≥8/ϵ. The points of a random sample of m examples of a target c fail to be an ε-net for the error regions {cΔh:h∈H} with probability at most
2Φd(2m)2−ϵm/2,
so any algorithm that outputs a hypothesis in H consistent with its sample has error greater than ϵ with at most that probability; with m≥(4/ϵ)log2(2/δ) and m≥(8d/ϵ)log2(13/ϵ) the probability is at most δ; and, if H is nonempty, every class contained in H for whose targets H is well-behaved is PAC learnable using H.
Milestones
Lemma 3.1 (Sauer's lemma, ΠC(m)≤Φd(m)); Lemma 3.2 (Φd(m)=∑i≤d(im)); the polynomial bound Φd(m)≤(em/d)d of p. 57; Theorem 3.5 (the Ω(d/ϵ) lower bound, in the two explicit forms of its proof).
Significance
Theorem 3.3 is the fundamental theorem of PAC learning: it replaces log∣H∣ in Occam's Razor by the VC dimension and thereby covers rectangles, halfspaces, polygons, neural networks with a fixed architecture, and every class whose dichotomies grow polynomially. Its proof, the double sample and random partition argument, is the origin of symmetrization in empirical process theory. Sauer's lemma is a cornerstone of extremal combinatorics with independent proofs by Sauer, Shelah and Vapnik–Chervonenkis, and the lower bound of Theorem 3.5 shows that the upper bound is tight to within log(1/ϵ), so the VC dimension genuinely characterizes sample complexity. None of these is machine-checked. Formalizing them puts on the platform the VC dimension, the growth function and the ε-net theorem with explicit constants, stated on the same sample law as the rest of this series, and the first information-theoretic lower bound for learning.
Difficulty
Sauer's lemma is a double induction on d and m through the auxiliary class C′ of dichotomies whose two extensions to a distinguished point are both realized, which needs care with the identification of dichotomies of S and of S∖{x}. The ε-net theorem needs: the reduction Pr[A]≤2Pr[B] from a failed ε-net on the first half to a region hit at least ϵm/2 times by the second half, which is a Chebyshev bound on a binomial variable and is where m≥8/ϵ enters; the exchangeability of the 2m draws with a random partition into two halves; the counting bound (ℓm)/(ℓ2m)≤2−ℓ; and Sauer's lemma applied to the error regions, whose growth function equals that of H. The explicit constants require the numerical inequality 2(2em/d)d2−ϵm/2≤δ under the two stated conditions. The lower bound is a probabilistic argument with a random target: conditional on the sample, the labels of unseen points are fair coins, so the number of errors on them is binomial and exceeds half its range with probability at least 1/2; the refined bound scales this construction to a region of weight 16ϵ and uses Markov's inequality to bound the number of draws landing in it. Measurability of the failure sets is avoided by stating outer-measure bounds, except for the double-sample event, which the proof integrates: it is assumed null-measurable (the well-behavedness of Blumer et al., without which the theorem is false for a class of VC dimension 1 on ω1). For the lower bound it is avoided by working over a finitely supported distribution on a space with measurable singletons.
Formalization scope
The VC dimension is a supremum in N∪{∞}, the growth function a supremum in N (bounded by 2m), and Φd the book's recurrence, with its closed form and polynomial bound stated as separate theorems. The goal is stated for a hypothesis class H (Theorem 3.4), Theorem 3.3 being the case C=H; it carries the exact bound of the proof, the explicit constants of Blumer et al. in place of the book's c0, the requirement m≥8/ϵ of the proof's Chebyshev step, measurability of the hypotheses and the target, well-behavedness of H for the target, and 0<ϵ,δ<1. PAC learnability of the subclasses of H needs H nonempty, since no algorithm outputs hypotheses in the empty class. The lower bound is stated for every deterministic learning function, on an instance space with measurable singletons, for a class shattering some set of d≥1 points, with the explicit constants derived in the proof sketch (m≤d/2: error ≥1/8 with probability ≥1/2; ϵ≤1/16 and m≤(d−1)/(64ϵ): error >ϵ with probability ≥1/4). Running time is not modelled. The composition bound for layered networks (Theorems 3.6 and 3.7) is not stated.
Trivializing readings are excluded: the ε-net event ranges over every hypothesis of H, the failure bounds are uniform over all consistent learners, and the lower bound holds for every learning function. Welcome contributions: Sauer's lemma, the closed form and the (em/d)d bound, the random-partition counting lemma, and the binomial median inequality used in the lower bound.
Selected references
M. J. Kearns, U. V. Vazirani, An Introduction to Computational Learning Theory, MIT Press, 1994, Chapter 3. doi:10.7551/mitpress/3897.001.0001
A. Blumer, A. Ehrenfeucht, D. Haussler, M. K. Warmuth, Learnability and the Vapnik–Chervonenkis dimension, Journal of the ACM 36(4), 1989. doi:10.1145/76359.76371
V. N. Vapnik, A. Ya. Chervonenkis, On the uniform convergence of relative frequencies of events to their probabilities, Theory of Probability and its Applications 16(2), 1971. doi:10.1137/1116025
N. Sauer, On the density of families of sets, Journal of Combinatorial Theory, Series A 13(1), 1972. doi:10.1016/0097-3165(72)90019-2
A. Ehrenfeucht, D. Haussler, M. Kearns, L. Valiant, A general lower bound on the number of examples needed for learning, Information and Computation 82(3), 1989. doi:10.1016/0890-5401(89)90002-3
Multi-armed Bandit Allocation Indices I: The Gittins Index, Optimal Stopping and MonotonicityTextbook
Motivation
A decision-maker has n projects, each a Markov reward process, and at every decision time may advance exactly one of them; the others stay frozen. Which project to advance so as to maximize the expected total discounted reward? Posed as a dynamic program the problem has a state space that is the product of the n state spaces, and the size of that product defeats every general method. The index theorem of Gittins and Jones (1974) says the dynamic program is solved exactly by an index policy: there is a real number ν(B,x), computable for each bandit process B from its own data and its own current state x, such that always advancing a process of greatest index is optimal. Chapter 2 of Gittins, Glazebrook and Weber, Multi-armed Bandit Allocation Indices (2nd ed., doi:10.1002/9780470980033), introduces the index, proves the theorem three times, and works out the properties of the index that the rest of the book, from jobs and superprocesses to restless bandits, is built on: which stopping time attains it, how it is computed, how it moves with the discount factor, and when it collapses to the myopic rule.
The index theorem itself is already on the platform, proved, as BanditAlgorithm.gittins_index_theorem in the Bandit Algorithms series (Lattimore and Szepesvári, Theorem 35.9). This mission cites it and formalizes what Chapter 2 establishes around it.
Setting
A bandit processB (§2.3–2.4) is a Markov reward process on a countable state space E: transition probabilities P(y∣x), a bounded reward r(x) received each time the continuation control is applied in state x, and a discount factor a∈(0,1); the freeze control leaves the state unchanged and yields nothing. The law of the process started at x is Px and x(t) is its state at process time t=0,1,2,…. A stopping timeτ is a past-measurable rule for switching from continuation to freezing, taking values in {1,2,…}∪{∞}. For such τ, Rτ(B,x)=Ex[∑t<τatr(x(t))] is the expected discounted reward and Wτ(B,x)=Ex[∑t<τat] the expected discounted time; their ratio ντ(B,x) (2.7) is the equivalent constant reward rate of that portion of B. The Gittins index is
ν(B,x)=τ>0supWτ(B,x)Rτ(B,x)(2.6)
and, equivalently, the fair charge (2.5): the greatest rent λ per period for which continuing B for one or more periods, paying λ each period, can be done without expected loss. A simple family of alternative bandit processes (SFABP) is n such processes with a common discount factor, one of which is continued at each decision time; an index policy continues a process of greatest index. In the Lean development the single-arm model is the platform's (GittinsIndex): the chain law is built by the Ionescu–Tulcea construction, stopping times are adapted N∪{∞}-valued maps on trajectories, and gittinsIndex P r a x is (2.6).
Formalization targets
Goal: Lemma 2.2, the optimal stopping set
The supremum in (2.6) is attained. For the initial state ξ, the attaining stopping rule may be taken to be "stop at the first time t≥1 at which the state lies in Σ0" for any set Σ0 with
{x:ν(B,x)<ν(B,ξ)}⊆Σ0⊆{x:ν(B,x)≤ν(B,ξ)},
and every such rule has ντ(B,ξ)=ν(B,ξ).
Milestones
Theorem 2.1 as a reference to the proved platform theorem; Eq. (2.5), the fair-charge characterization of the index; the restart-in-state formulation of §2.6.4 as the convergence of the Katehakis–Veinott value iteration; Theorem 2.3, monotonicity in the discount factor; Lemma 2.4, the interchange of two bandit portions; Propositions 2.5–2.8, the monotone-index cases in which the index is the immediate reward, or is attained only after the first step, or only at τ=∞.
Significance
Lemma 2.2 is the working form of the index: it turns the supremum over all stopping times into a specific rule, the first time the index falls below its starting value, and it is what the interchange proof of §2.7, the modified-forwards-induction policies of §2.6.6, the monotone-index propositions of §2.11 and the treatment of jobs in Chapter 3 all use. The fair-charge form (2.5) is the prevailing-charge proof of the theorem (Weber 1992) and the interpretation that carries over to superprocesses and restless bandits. The restart formulation is how indices are computed in practice (Katehakis and Veinott 1987), and Theorem 2.3 is the first of the comparative statics used throughout Chapters 7 and 8. Lemma 2.4 is the elementary inequality behind the original proof of Gittins and Jones.
Of these, only the index theorem has a machine-checked proof today. Formalizing the rest gives the platform the index as a usable object: a characterization of the optimal stopping rule, a convergent algorithm for it, and the monotonicity facts, all stated against the existing model so that every later mission of this series and every future use of the L&S model can build on them.
Difficulty
The obvious first move for Lemma 2.2, "take the stopping time that achieves the supremum", is what has to be proved: the supremum is over an uncountable family, and attainment comes from the optimal stopping problem with charge λ=ν(B,ξ), whose value function satisfies φ(x)=max{0,r(x)−λ+aE[φ(x(1))∣x(0)=x]}, together with the fact that its optimal stopping set is characterized by the strict and non-strict inequalities λ>ν(B,x) and λ≥ν(B,x). That last step is the content: it identifies the local decision "stop or continue" with a comparison of indices, which is why any set between the two level sets works. On the platform's model this requires the dynamic-programming theory of discounted optimal stopping on a countable space (Theorem 2.10 of the book), the identification of fairChargeProfit with that value function, and the strong Markov property of markovChainMeasure at a trajectory stopping time. Theorem 2.3 needs randomized stopping times (a geometric kill) and the fact that they do not enlarge the supremum. The restart iteration is monotone and bounded but its operator is not a contraction in the restart value, so its limit has to be identified with the restart problem's value directly; that value is max(0,ν/(1−a)), not ν/(1−a), because restarting forever is free.
Formalization scope
The state space is a countable type with measurable singletons, so every subset is measurable; rewards are bounded; a∈(0,1). The chain law, stopping times, the discounted stopped sums and the index are the platform's, unchanged. Expectations are Bochner integrals; with bounded rewards they are finite and no total-function default value enters. IsPositiveStoppingTime fixes τ≥1 everywhere, so Wτ≥1 and the ratio (2.7) is a genuine quotient. The stopping rule of Lemma 2.2 is the hitting time from time 1 of a set, with ∞ when the set is never hit. The fair-charge profit is a real supremum over the nonempty bounded family of positive stopping times, and (2.5) is stated with the outer supremum over {λ:profit(λ)≥0}, a nonempty set bounded above. The restart iteration is stated as a limit, with the value max(0,ν(B,ξ)/(1−a)): for a nonnegative index this is the book's ν/(1−a), and the maximum is forced by a one-state example with negative reward. The propositions' hypotheses are almost-sure events under Px, written as events of measure one.
Two trivializing readings are excluded: the index is never taken over all N∪{∞}-valued maps but over adapted stopping times, and the stopping set of the goal is not restricted to the two extreme level sets. Contributions welcome: the optimal-stopping dynamic program on markovChainMeasure (value iteration, the strong Markov property at a stopping time), the equivalence of randomized and non-randomized stopping times for the supremum, and the monotone convergence of the restart iteration.
Selected references
J. Gittins, K. Glazebrook, R. Weber, Multi-armed Bandit Allocation Indices, 2nd ed., Wiley, 2011, Chapter 2. doi:10.1002/9780470980033
J. C. Gittins, D. M. Jones, A dynamic allocation index for the sequential design of experiments, in Progress in Statistics (Gani, ed.), North-Holland, 1974.
R. Weber, On the Gittins index for multiarmed bandits, Annals of Applied Probability 2(4), 1992. doi:10.1214/aoap/1177005588
M. N. Katehakis, A. F. Veinott, The multi-armed bandit problem: decomposition and computation, Mathematics of Operations Research 12(2), 1987. doi:10.1287/moor.12.2.262
T. Lattimore, C. Szepesvári, Bandit Algorithms, Cambridge University Press, 2020, Chapter 35. doi:10.1017/9781108571401
Markov Processes: Characterization and Convergence 15: Diffusions in smooth bounded regionsTextbook
Why smooth-region boundary diffusions matter
Diffusion models in a bounded region need a rule for what happens when a path reaches the boundary. Two standard mechanisms are absorption, where the boundary kills the generator contribution, and oblique reflection, where a prescribed vector field pushes the process back into the region. Ethier and Kurtz treat these mechanisms as neighboring variants of the same uniformly elliptic model in Chapter 8, Section 1 of Markov Processes: Characterization and Convergence. The distinction is structural: the interior differential operator is shared, but its admissible generator graph changes with the boundary condition. This mission formalizes Theorems 1.4 and 1.5, retaining oblique reflection as the capstone and absorbed diffusion as the required related result.
The setting
Let Ω⊂Rd be bounded, open, and connected, with d≥2. Its boundary is locally represented in orthogonal coordinates as the graph of a scalar function. The formal predicate C²,μ boundary regularity requires one positive chart radius valid at every boundary point, a connected local boundary patch, and a graphing function whose second partial derivatives satisfy the source's componentwise Hölder oscillation condition. The exponent obeys 0<μ≤1.
The diffusion coefficients are a symmetric positive-semidefinite matrix field a(x) and a drift field b(x). Their entries satisfy the same local componentwise Hölder convention. Uniform ellipticity means that one ε>0 satisfies
ε≤i,j∑θiaij(x)θj
for every x∈Ω and every unit vector θ. For smooth f, the interior operator is
Gf(x)=21i,j∑aij(x)∂ijf(x)+Df(x)[b(x)].
Functions live on the compact closure Ω as bounded continuous functions. Their ambient extensions are differentiated only at interior points. The second coordinate of each graph is itself continuous on the closure, so it records the boundary trace of Gf rather than assigning an arbitrary value after differentiation.
Formalization targets
Goal: obliquely reflected diffusion generation
Theorem 1.5 adds a reflection field c whose components have C¹,μ boundary regularity. An outward unit normal n(x) is oriented by a local defining function that is negative precisely inside Ω. Uniform obliqueness is the global lower bound
ε≤c(x)⋅n(x),x∈∂Ω,
for one positive ε. The reflected graph requires a continuous derivative trace J that agrees with Df in the interior and satisfies
Jx(c(x))=0,x∈∂Ω.
The target asserts that the uniform closure of this graph is single-valued and is exactly the full generator of a positive strongly continuous contraction semigroup preserving the constant function one. The generator condition is a biconditional derivative limit, so it identifies the complete domain rather than only a convenient operator restriction.
Related target: absorbed diffusion generation
Theorem 1.4 keeps the same smooth-region and ellipticity assumptions but uses the absorbed graph. Its continuous operator trace satisfies Gf=0 on the boundary. It has the same full generation conclusion: graph single-valuedness, a positive strongly continuous contraction semigroup, preservation of one, and exact identification of the generator. The absorbed zero trace is not imported into the reflected theorem, and the oblique derivative condition is not imposed on the absorbed graph.
Significance
These results connect a local elliptic expression and a geometric boundary condition to a global Markov evolution on continuous functions over the closed region. The conclusions contain more than existence of a semigroup: they determine the whole infinitesimal generator, ensure positivity and contraction, and retain the conservative convention used by Ethier and Kurtz. The paired statements make the effect of the boundary mechanism explicit while holding the interior model fixed.
The formal contribution is a machine-checkable statement layer, not a proof of the source theorems. It records the componentwise Hölder convention, uniform boundary charts, ellipticity, normal orientation, continuous derivative trace, the two distinct generator graphs, and every semigroup clause. These definitions can support later work on reflected processes, elliptic boundary problems, and martingale formulations without rebuilding the geometric conventions.
Where the difficulty lies
The main difficulty is simultaneous control of interior regularity, boundary geometry, and the closed generator domain. Pointwise obliqueness is insufficient: the source requires a uniform positive lower bound over the whole compact boundary. Likewise, merely writing Df(c)=0 for an arbitrary ambient extension would not supply a well-defined boundary derivative. The graph therefore carries a continuous derivative trace agreeing with the interior derivative. Replacing the biconditional generator equality by a one-way inclusion, or silently imposing the absorbed zero trace on the reflected graph, would weaken or change the source result.
Formalization scope and conventions
The state space is EuclideanSpace ℝ (Fin (n + 1)) with 2 ≤ n + 1. Connectedness supplies nonemptiness. Matrix positive semidefiniteness supplies symmetry and nonnegative quadratic forms; a separate hypothesis gives strict uniform ellipticity. Local oscillation bounds apply within connected components of small intersections and do not compare different components.
The absorbed and reflected graphs use bounded continuous functions on closure Ω. The arbitrary zero extension outside the closure is never differentiated at a boundary point. The reflected boundary equation uses a continuous field of linear derivative maps, while the absorbed equation uses the continuous second graph coordinate. No vacuous region, pointwise-only ellipticity or obliqueness, weakened generator inclusion, proof-only theorem dependency, or synthetic theorem combining the two boundary mechanisms is admitted.
Selected references
Stewart N. Ethier and Thomas G. Kurtz, Markov Processes: Characterization and Convergence, Wiley, 1986, Chapter 8, Section 1, Theorems 1.4–1.5 and equations (1.13)–(1.20). Wiley DOI
Stewart N. Ethier and Thomas G. Kurtz, same volume, Chapter 1 for strongly continuous contraction semigroups and generators, and Chapter 4 for the conservative Feller convention. Wiley DOI
Wasserstein Distributionally Robust Optimization IV: Regularization by Robustification in Classification and RegressionTextbook
Motivation
Regularization — adding a penalty on model complexity to an empirical risk minimization
objective — is one of the oldest and most reliably effective tools in statistical learning: ridge
regression, LASSO, and margin-based support vector machines all fit this template. For decades the
regularization weight and penalty function were chosen heuristically or by cross-validation, with
only asymptotic or worst-case generalization bounds explaining why they help. Kuhn, Mohajerin
Esfahani, Nguyen & Shafieezadeh-Abadeh's 2019 INFORMS TutORials chapter on Wasserstein
distributionally robust optimization (DRO) gives regularization a different, non-asymptotic
justification: a decision rule that is robust to adversarial perturbations of its training data,
measured in Wasserstein distance, is exactly a regularized empirical risk minimizer — no
approximation, no asymptotics. This mission formalizes the general form of that equivalence,
Theorem 10 (p. 14), which underlies every regularization-by-robustification result the chapter
derives for classification and regression alike.
Setting
Fix a normed space Ξ=Rm, a convex loss function ℓ:Ξ→R, a
radius ε≥0, and N training samples ξ^1,…,ξ^N∈Ξ (N≥1). The empirical distribution is P^N=N1∑i=1Nδξ^i. The
worst-case risk of ℓ at radius ε (eq. (6), p. 6) is
Rε,p(P^N,ℓ)=Q∈Bε,p(P^N)supEQ[ℓ(ξ)],
where Bε,p(P^N) is the type-p Wasserstein ball of radius ε around
P^N (Definition 1, p. 3) — the set of probability measures on Ξ within Wasserstein
distance ε of the empirical distribution, under a norm ∥⋅∥ on Ξ and its
transportation exponent p. The Lipschitz modulusLip(ℓ)=supξ=ξ′∥ξ−ξ′∥∣ℓ(ξ)−ℓ(ξ′)∣ (possibly +∞) measures how fast ℓ can grow.
Formalization targets
Goal (Theorem 10, convex loss and p=1). If ℓ is convex and p=1, then the worst-case
risk of ℓ over the type-1 Wasserstein ball around the empirical distribution coincides with
the Lipschitz-regularized empirical loss:
Rε,1(P^N,ℓ)=R(P^N,ℓ)+ε⋅Lip(ℓ),
where R(P^N,ℓ)=N1∑i=1Nℓ(ξ^i) is the ordinary empirical risk.
The left side is the worst-case expected loss under adversarial perturbations of the training data
of bounded aggregate Wasserstein cost; the right side is the ordinary empirical risk plus a
regularization term proportional to the perturbation radius ε and the loss's own
Lipschitz modulus — no approximation, an exact equality for every convex ℓ.
Significance
This is the single result underlying every specific regularization-by-robustification corollary
the chapter derives — the ℓ2-regularized SVM and its ℓ1/ℓ∞ variants,
regularized logistic regression, and the regression analogue with a Lipschitz loss (Proposition 3)
— because each of those is obtained by substituting a specific convex, Lipschitz loss (hinge,
logloss, a linear-model margin loss) for the general ℓ here and reading off
Lip(ℓ) in closed form. Theorem 10 is exact (p=1, Ξ = R^m) precisely because a
type-1 transportation cost is dual to the Lipschitz modulus (a consequence of the Kantorovich-
Rubinstein duality this book's earlier duality theorems establish), whereas the corresponding
statement for p≥2 (Theorem 11 elsewhere in the chapter) needs a strictly stronger hypothesis
on ℓ. Formalizing Theorem 10 fixes, machine-checkably, the exact scope of the equivalence —
which losses qualify (convex, no boundedness or smoothness needed), which transportation exponent
is required (p=1, not any p≥1), and that the equality is exact, not an upper or lower bound —
the single fact every classification- and regression-specific robustification corollary in the
chapter cites without re-deriving.
Difficulty
The natural first attempt treats the worst-case risk as an instance of the general finite convex
reduction (Theorem 8, which needs ℓ or a related concave/convex-conjugate structure and
applies for a general norm exponent p,q with 1/p+1/q=1) and specializes it to p=1. This is
not the paper's own route for Theorem 10: at p=1 the dual exponent q=∞, and the general
finite-convex-program reduction (11) degenerates in a way that is more naturally derived directly
from the type-1 Wasserstein distance's own dual (Kantorovich-Rubinstein) representation — a
Lipschitz test function pairs exactly with a type-1 transportation cost, which is why the answer is
Lipschitz-regularization and not some other penalty. The Lean statement records only the final
equality (the proof itself, via Theorem 8 or the direct Kantorovich-Rubinstein route, is left as
sorry, as required for a draft item), but the choice of which milestones would support that proof
is exactly this: the type-1/Lipschitz-modulus duality is a structurally different argument from the
finite-convex-program machinery Theorem 8 needs for other p, which is why this chapter's earlier
draft mistakenly tried to reach a specialization of Theorem 10 (Proposition 2, restated for a
labeled, κ=∞ ambiguity set) through a finite-atom shortcut that does not actually
capture the general type-1 ball Theorem 10's own proof needs — see Formalization scope.
Formalization scope
Ξ is EuclideanSpace ℝ (Fin m) (fixed to Set.univ, matching the theorem's own "Ξ = R^m"
hypothesis) with an arbitrary fixed norm as a type-class parameter, not specialized to Euclidean.
The worst-case risk, Wasserstein distance, ambiguity set, nominal risk, empirical distribution and
Lipschitz modulus are all redefined locally in this chapter's own namespace, verbatim restatements
of 01-duality's own drafts of the same objects (identical EReal/ENNReal/Integrable
conventions), because 01-duality is not yet a published mission
(CAPTAIN_ADDENDUM_WAVE2.md rule 5); a later upload can retire the duplication once it is live.
hN : 0 < N excludes the empty-sample case the paper's own "N training samples" presupposes;
hℓ : Integrable ℓ (empiricalDistribution ξhat) guards the empirical risk's Bochner integral
(automatically satisfied under any real-valued ℓ since the empirical distribution is a finite
convex combination of Dirac masses, but stated explicitly rather than assumed silently). No
constant is pinned to a numeral. This mission originally targeted Proposition 2 (regularization
by robustification for classification, p. 25), a specialization of Theorem 10 to a labeled,
κ=∞ input-output ambiguity set — but that draft's κ=∞ ambiguity set restricted admissible
perturbations to a finite family of exactly N atoms, each sample's entire mass moving as one
indivisible unit, which is a strict, non-faithful subset of the true κ=∞ Wasserstein ball
(splitting a sample's mass across several destinations is a legitimate, and for a convex loss
strictly more powerful, perturbation by Jensen's inequality). This made the goal theorem false for
at least one of the three loss functions (Table 1) the mission itself certified as covered
(logloss), not merely narrower than the paper's claim — moderation caught this and required either
a faithful general-ambiguity-set reformulation or retargeting the goal. This mission takes the
latter: Theorem 10 itself, already correctly and generally stated using the unrestricted
Wasserstein ball throughout, is now the goal, with no further milestone (no other numbered result
in this chunk's scope is needed for Theorem 10's own statement beyond the shared definitions
above). A future mission in this series can revisit Proposition 2/3 with a properly general
labeled ambiguity set once that construction (label-pinned marginal plus an aggregate coupling
condition on the input coordinate, rather than a finite atom family) is built.
Selected references
Kuhn, D., Mohajerin Esfahani, P., Nguyen, V. A., & Shafieezadeh-Abadeh, S. (2019). Wasserstein
Distributionally Robust Optimization: Theory and Applications in Machine Learning. INFORMS
TutORials in Operations Research. https://doi.org/10.1287/educ.2019.0198
Shafieezadeh-Abadeh, S., Esfahani, P. M., & Kuhn, D. (2015). Distributionally robust logistic
regression. Advances in Neural Information Processing Systems, 28.
Blanchet, J., Kang, Y., & Murthy, K. (2019). Robust Wasserstein profile inference and
applications to machine learning. Journal of Applied Probability, 56(3), 830–857.
Wasserstein Distributionally Robust Optimization III: Finite-Sample and Asymptotic Performance GuaranteesTextbook
Motivation
A decision maker who solves a distributionally robust optimization (DRO) problem over a
Wasserstein ball chooses a radius ε by hand, and it is natural to ask what guarantee
that choice actually buys: how large must ε be, as a function of the sample size N
and a desired confidence level, before the resulting worst-case risk is provably not an
underestimate of the true (unknown-distribution) risk? Kuhn, Mohajerin Esfahani, Nguyen &
Shafieezadeh-Abadeh's 2019 INFORMS TutORials chapter answers this for the mean-covariance
relaxation of Wasserstein DRO introduced via the Gelbrich hull (Section 2.3): Theorem 21 gives a
concentration inequality for how fast the sample mean and covariance approach the true mean and
covariance, and Theorem 22 turns that concentration bound into a finite-sample statistical
guarantee for the Gelbrich risk itself. This mission formalizes both.
Setting
Fix m∈N. Let P be the unknown true distribution on Rm with mean
vector μ and covariance matrix Σ∈S+m, and suppose P is light-tailed: there
exist α>2 and A>0 with EP[exp(∥ξ∥2α)]≤A. Let ξ^1,…,ξ^N be N independent, identically distributed samples from P; write PN for their joint
law (the N-fold product measure) and μ^,Σ^ for the resulting sample mean and
sample covariance, i.e. the mean and covariance of the empirical distribution P^N=N1∑iδξ^i. Recall from the Gelbrich construction the
mean-covariance uncertainty setUε(μ^,Σ^)={(μ,Σ)∈Rm×S+m:∥μ^−μ∥22+Tr[Σ^+Σ−2(Σ^1/2ΣΣ^1/2)1/2]≤ε2}, and the Gelbrich riskRε(μ^,Σ^,ℓ)=supQ∈Gε(μ^,Σ^)EQ[ℓ(ξ)] of a loss function ℓ over the Gelbrich hull Gε(μ^,Σ^).
Formalization targets
Milestone (Theorem 21, concentration inequalities II). There is c>1, depending on P
only through μ,Σ,α,A,m (not on any finer feature of P), such that for every
η∈(0,1],
Goal (Theorem 22(a), finite sample guarantees II). Under the same hypotheses, for every
η∈(0,1) and ε≥εN(η),
PN{R(P,ℓ)≤Rε(μ^,Σ^,ℓ)∀ℓ∈L}≥1−η.
With probability at least 1−η over the draw of the training sample, the Gelbrich risk
computed from that sample upper-bounds the true risk of every admissible loss function
simultaneously — not just of one fixed ℓ chosen in advance. (The paper's part (b), the
analogous guarantee $P^N\{R(P,\ell^\star) \le R_\varepsilon(\hat\mu,\hat\Sigma,\ell^\star)\} \ge 1-\eta$ for the specific optimizer ℓ⋆ of the Gelbrich risk minimization problem, is not
formalized in this mission — see Formalization scope.)
Significance
Theorem 22 is what makes the Gelbrich-risk relaxation of Wasserstein DRO more than a
computational convenience: it certifies that solving the tractable Gelbrich risk minimization
problem gives a decision whose true out-of-sample risk is, with high probability, no worse than
the value the solver reports — a genuine confidence guarantee, not merely an approximation of the
Wasserstein worst-case risk. Theorem 21's rate, εN(η)=O(N−1/2), is also of
independent interest: it is dimension-free (no curse of dimensionality), in contrast to the
paper's earlier general-distribution concentration result (Theorem 18, out of scope for this
mission) whose rate degrades with m. Formalizing Theorem 21 fixes, machine-checkably, the exact
functional form of εN(η) and the precise sense in which c is "distribution-free"
given (μ,Σ,α,A,m) — a subtlety easy to state informally but easy to get wrong
formally (see Difficulty).
Difficulty
The central formalization difficulty is not proving the theorems (both are left as sorry in this
draft) but stating the existential constant c correctly. The paper says c "depends on P only
through μ,Σ,α,A,m" — informally, a promise that c is uniform across every
distribution P sharing those five parameters, not merely that some c exists for each P
separately (a vacuously true, much weaker statement obtained by naively quantifying c after P).
The correct encoding places ∃cbefore the universal quantifier over P: for fixed
(μ,Σ,α,A,m), one c must work for every P with that mean, covariance, and tail
bound. Getting this quantifier order backwards silently converts a genuine finite-sample guarantee
into a triviality (FAITHFULNESS_TRAPS.md trap 8).
Formalization scope
Distributions live on EuclideanSpace ℝ (Fin m); PN, the law of N iid samples, is the
N-fold product measure MeasureTheory.Measure.pi (fun _ => P) on Fin N → EuclideanSpace ℝ (Fin m) — an event about the random sample sequence is a set of such tuples, and "PN[event]≥1−η" is that product measure's mass on the event set. All risk and uncertainty-set
definitions (meanVector, covarianceMatrix, meanCovarianceUncertaintySet, gelbrichHull,
gelbrichRisk, nominalRisk, empiricalDistribution) are redefined locally in this chapter's own
namespace, matching 02-gelbrich's conventions exactly, since neither 01-duality nor
02-gelbrich is yet a published mission (CAPTAIN_ADDENDUM_WAVE2.md rule 5); a later upload can
retire the duplication once those missions are live. The existential constant c is placed before
the universal quantifier over P in both theorems, exactly capturing "depends on P only through
µ,Σ,α,A,m" — see Difficulty. Only Theorem 22's part (a) (the uniform bound over a loss class
L) is formalized; part (b) — the bound for the specific optimizer ℓ* of the Gelbrich risk
minimization problem (19) — is left out, because it requires first formalizing "ℓ* is an
optimizer of problem (19)" as an object (an infimum-attaining selection over a data-dependent
optimization problem), which is additional infrastructure this mission's time budget did not
cover; formalizing it as an unconditional bound over an arbitrary data-dependent ℓ* (dropping the
optimality hypothesis) would be unfaithful — the guarantee genuinely depends on ℓ* being an
optimizer, not an arbitrary measurable function of the sample. The goal theorem also carries
hΞ, stating Ξ contains the support of P (the paper's own standing assumption, p. 6, for
every later use of Ξ), and hLInt, an Integrable ℓ P guard for every ℓ ∈ L, matching
Assumption 1 (p. 9); both were added after moderation found the goal's original statement,
without them, admitted a counter-instance (Ξ = ∅ collapses the Gelbrich hull to empty and the
risk supremum to ⊥, making the guarantee provably false rather than merely undisclosed). Theorem 18 (the general, dimension-
dependent concentration inequality with its piecewise ε_N(η) formula) and Theorems 19/20/23 (its
downstream guarantees and the asymptotic-consistency results) are out of scope for this mission,
which targets the Gelbrich-risk branch (Theorems 21/22) specifically.
Selected references
Kuhn, D., Mohajerin Esfahani, P., Nguyen, V. A., & Shafieezadeh-Abadeh, S. (2019). Wasserstein
Distributionally Robust Optimization: Theory and Applications in Machine Learning. INFORMS
TutORials in Operations Research. https://doi.org/10.1287/educ.2019.0198
Fournier, N., & Guillin, A. (2015). On the rate of convergence in Wasserstein distance of the
empirical measure. Probability Theory and Related Fields, 162(3), 707–738.
Gao, R., & Kleywegt, A. J. (2023). Distributionally robust stochastic optimization with
Wasserstein distance. Mathematics of Operations Research, 48(2), 603–655.
Foundations of Machine Learning XII: Algorithmic StabilityTextbook
Motivation
Every generalization bound in Chapters 2-11 depends only on the complexity of a fixed
hypothesis set H — Rademacher complexity, VC-dimension, growth function — and holds
regardless of which algorithm within H actually returns the hypothesis. This is both a
strength (broad applicability) and a limitation: it throws away everything specific to how an
algorithm searches H, and can be uninformative when H itself is large or unbounded (e.g. a
regularized objective that implicitly restricts the search without shrinking H as a set).
Chapter 14 introduces a fundamentally different route to a generalization bound — a property of
the algorithm rather than the hypothesis class — first used by Devroye, Rogers and Wagner
for k-nearest-neighbor rules and given its modern general form by Bousquet and Elisseeff
(2002), whose treatment this chapter follows and (for non-differentiable convex losses)
extends.
Setting
A labeled example is z=(x,y)∈X×Y; for a loss function L:Y′×Y→R+
(where Y′ may differ from Y, e.g. Y={−1,+1} but Y′=R for a real-valued
hypothesis), the loss of a hypothesis h at z is Lz(h)=L(h(x),y). Given a learning
algorithm A that maps a sample S of size m to a hypothesis hS∈H, the empirical
error and generalization error are R^S(h)=m1∑iLzi(h) and
R(h)=Ez∼D[Lz(h)]. Uniform β-stability (Definition 14.1) says: for
any two samples S, S′ differing by a single point, the algorithm's returned hypotheses
satisfy ∣Lz(hS)−Lz(hS′)∣≤β for every z — replacing one training point can change
the algorithm's loss on any point by at most β. For the regularized algorithms studied
in §14.3, a kernel-based regularization algorithm minimizes FS(h)=R^S(h)+λ∥h∥K2 over the RKHS H of a positive-definite kernel K, and a loss L is
σ-admissible (Definition 14.3) if ∣L(h′(x),y)−L(h(x),y)∣≤σ∣h′(x)−h(x)∣ for
all hypotheses h,h′ — a Lipschitz-like smoothness condition satisfied by the standard
regression and classification losses.
Formalization targets
Proposition 14.4 (milestone). For a PDS kernel K with K(x,x)≤r2 and a convex,
σ-admissible loss L, the kernel-based regularization algorithm is β-stable with
β≤mλσ2r2.
Corollary 14.5 (milestone). For SVR (the ϵ-insensitive loss Lϵ, bounded
by M), with probability at least 1−δ:
R(hS)≤R^S(hS)+mλr2+(λ2r2+M)2mlog(1/δ).
Theorem 14.2 — the mission's goal. For a loss bounded by M and a β-stable algorithm
A, with probability at least 1−δ over a sample S of size m:
R(hS)≤R^S(hS)+β+(2mβ+M)2mlog(1/δ).
Significance
Theorem 14.2 is the book's demonstration that algorithm-dependent analysis is not merely a
special-case curiosity: it is broad enough to cover an entire family (every kernel-based
regularization algorithm — KRR, SVR, SVMs, and beyond) uniformly, via a single stability
coefficient computation (Proposition 14.4) that is then specialized per algorithm just by
plugging in that loss's admissibility constant σ. Corollary 14.5's SVR bound is the
concrete payoff: a fully explicit, dimension-free generalization guarantee for a widely used
regression algorithm, with every constant (r, λ, m) traceable to the algorithm's own
hyperparameters, no VC-dimension or Rademacher-complexity computation required. Unlike Chapters
3-11, whose bounds are oblivious to howH is searched, algorithmic stability is the first
tool in the book that can, in principle, certify generalization for a hypothesis class too large
or poorly understood for a complexity-based bound to be informative, provided the algorithm
itself is stable. No prior art on the Prove2Me platform is faithful: GET /theorems?q=algorithmic+stability, q=uniform+stability return no hits; q=McDiarmid returns
only bounded_diff_martingale_two_sided (Boucheron-Lugosi-Massart's own two-sided
bounded-differences martingale inequality), which is McDiarmid's inequality's own proof engine
(the background result Theorem 14.2's proof applies), not any result of this chapter — a
different mathematical object entirely, not reused. All eleven items are drafted fresh.
Not formalized here: Corollary 14.6 (KRR bound), Lemma 14.7 (boundedness of kernel-regularization
hypotheses) and Corollary 14.8 (SVM bound). Corollary 14.6 is structurally identical to Corollary
14.5 (a different loss function's admissibility constant plugged into the same Proposition
14.4 + Theorem 14.2 chain) and adds no new formalization content beyond Corollary 14.5, already
drafted; Lemma 14.7 and Corollary 14.8 are omitted together, since 14.8's own statement needs
14.7's bound on ∣hS(x)∣ to compute its explicit M (unlike Corollary 14.5, which is given M
as a hypothesis) — a genuine additional formalization layer (the reproducing-kernel norm bound
∣hS(x)∣≤rB/λ) disproportionate to a single further corollary within this
mission's budget.
Difficulty
The chapter's central technical step is recognizing that β-stability plus the loss bound
M together give exactly the bounded-difference property McDiarmid's inequality needs, applied
to Φ(S)=R(hS)−R^S(hS) as a function of the sample: replacing one point of S changes
R(hS) by at most β (stability applied to the population loss, an expectation over z)
and changes R^S(hS) by at most β+M/m (stability on the m−1 shared points, plus
the full loss bound M/m on the one point that actually changed) — two different, asymmetric
arguments that must be combined correctly to get ∣Φ(S)−Φ(S′)∣≤2β+M/m, not merely
"stability implies boundedness" asserted directly. Proposition 14.4's own proof (not formalized
here beyond its statement) needs a generalized Bregman divergence to handle a possibly
non-differentiable convex loss — an extension of Bousquet-Elisseeff's original argument the book
credits to itself as novel — via the reproducing-kernel property and Cauchy-Schwarz to convert a
divergence bound into a bound on ∥h−h′∥K, then back into a pointwise loss bound.
Formalization scope
IsRKHSOf/IsMinimizer are restated locally in Stability, byte-identical to chunk
06-kernels's own copies (a draft item cannot import another chunk's draft module); H is an
abstract real inner-product space with an evaluation map ev : H → X → ℝ standing for "elements
of H are functions on X", the same device chunk 06's own RKHS formalization uses, since
Mathlib's abstract Hilbert spaces are not themselves spaces of functions. UniformlyStable fixes
the sample size m as part of the algorithm's type (A : (Fin m → X × Y) → (X → Y')), matching
the book's own standing convention of a fixed sample size m throughout the chapter.
Proposition 14.4 is stated pairwise — for any two samples differing by one point and any
minimizers of their respective regularized objectives, the pointwise loss bound holds — rather
than fixing a global choice-function algorithm A, since the book's own proof picks an arbitrary
minimizer of each objective without asserting uniqueness; Corollary 14.5 does fix a choice
function A (one minimizer per sample), since Theorem 14.2's own statement needs a single
algorithm evaluated across the whole product-measure sample space. No numerical constant in any
of the three theorems is altered from the book's own displayed form. A trivializing
formalization this mission avoids: stating Theorem 14.2 only for the strict per-hypothesis loss
bound (∀ h ∈ H, ∀ z, L_z(h) ≤ M) rather than the book's own weaker, algorithm-specific
condition (hbound, ∀ S, ∀ z, L_z(A S) ≤ M) — the weaker hypothesis is kept, exactly matching
the book's explicit statement that "a weaker condition suffices."
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 14.
O. Bousquet, A. Elisseeff, "Stability and generalization," Journal of Machine Learning
Research 2, 2002, 499-526.
M. Kearns, D. Ron, "Algorithmic stability and sanity-check bounds for leave-one-out
cross-validation," Neural Computation 11(6), 1999, 1427-1453.
Estimating a d×d covariance matrix Σ from n samples is a canonical
high-dimensional problem: the natural estimator, the sample covariance Σ^, is
consistent in operator norm only when n≳d, which fails outright in the regime
d≫n common to modern applications. When Σ is additionally known to be sparse —
few nonzero entries per row — a simple fix restores consistency even when d≫n: threshold
every entry of Σ^ below a data-dependent level to zero. This mission formalizes the
matrix concentration machinery behind that fix and the resulting guarantee, following
Wainwright, High-Dimensional Statistics: A Non-Asymptotic Viewpoint (Cambridge University
Press, 2019), Chapter 6.
Setting
For a random matrix Q, the matrix variance is var(Q):=E[Q2]−(E[Q])2, and the Loewner orderA⪯B on symmetric matrices means B−A is positive
semidefinite. A zero-mean symmetric random matrix Q satisfies Bernstein's condition
(Definition 6.10) with parameter b>0 if E[Qj]⪯21j!bj−2var(Q)
for j=3,4,… — the matrix analogue of the scalar Bernstein condition of Chapter 2. The
operator (spectral) norm∣∣∣M∣∣∣2 is M's largest singular value.
Given a threshold λ>0, the hard-thresholding operator is Tλ(u):=u⋅1[∣u∣>λ], extended entrywise to matrices (Eq. (6.52)). A covariance matrix
Σ's sparsity pattern is captured by its adjacency matrixAjℓ:=1[Σjℓ=0] (p. 181); ∣∣∣A∣∣∣2≤d always, with equality only when
Σ has no zero entries, and ∣∣∣A∣∣∣2≤s whenever Σ has at most s
nonzero entries per row.
Let {xi}i=1n be i.i.d. zero-mean random vectors with covariance Σ, each
coordinate sub-Gaussian with parameter at most σ. If n>logd, then for any δ>0,
the thresholded sample covariance Tλn(Σ^) with λn/σ2=8logd/n+δ satisfies
The error scales with the graph sparsity ∣∣∣A∣∣∣2, not with d directly — the
whole point of thresholding when the ambient dimension is much larger than the sample size.
Milestone — Theorem 6.17 (the matrix Bernstein bound)
For independent, zero-mean, symmetric random matrices {Qi} satisfying Bernstein's
condition with parameter b,
This is the general matrix concentration tool the whole chapter builds toward; Theorem 6.23 is
one of its corollaries.
Milestone — Eq. (6.54) (the deterministic thresholding bound)
For any λn with ∥Σ^−Σ∥max≤λn,
∣∣∣Tλn(Σ^)−Σ∣∣∣2≤2∣∣∣A∣∣∣2λn — a purely
deterministic fact, with no probability involved, that reduces Theorem 6.23's proof to a single
probabilistic input: controlling ∥Σ^−Σ∥max.
Significance
Theorem 6.17 is the workhorse of the whole chapter: besides Theorem 6.23, it also underlies
Corollary 6.20's operator-norm bound for the unstructured sample covariance matrix (used in
turn for the two example ensembles in Section 6.4.5), by taking Qi:=xixiT−Σ. Theorem
6.23 itself is the standard justification for thresholding-based covariance estimators used
throughout high-dimensional statistics whenever the sparsity pattern of Σ, though
unknown, is believed to be structured.
Formalizing it. No faithful prior art exists on the platform for the matrix Bernstein bound
or covariance thresholding (a fresh search for "matrix Bernstein," "Bernstein condition
matrix," "thresholding covariance," and "sparse covariance" returned no hits). The existing
RademacherWigner.* items formalize spectral-edge and empirical-spectral-distribution bounds
for the Wigner ensemble specifically (a symmetric matrix with i.i.d. entries) — a narrower,
different random-matrix model from the general Bernstein-condition matrices this chapter treats,
and not reused here. All three theorems are drafted as open goals (:= by sorry).
Difficulty
The naive approach to a matrix tail bound — apply the scalar Chernoff/Bernstein technique
directly to the operator norm — fails because the operator norm is not a linear functional of
Q, so the scalar moment generating function bound does not translate directly. The resolution
(Lemma 6.13, not itself part of this mission) instead bounds the trace of the matrix
exponential of the sum, which is linear-algebraically tractable via the Golden–Thompson-type
inequality and the union bound over the (at most rank(Vˉ)) nonzero eigenvalue
directions of the aggregate variance Vˉ=∑ivar(Qi) — this is exactly why the
bound's prefactor is rank(Vˉ), not the ambient dimension d: a low-rank
aggregate variance (e.g. from a highly structured collection of matrices) yields a much
tighter bound than a naive union bound over all d eigen-directions would. Theorem 6.23's own
difficulty is entirely in the reduction to Theorem 6.17 plus Eq. (6.54): checking that
Qi:=xixiT−Σ satisfies the Bernstein condition with the stated parameters, and that
∥Σ^−Σ∥max concentrates at the stated rate via a union bound over the
O(d2) matrix entries.
Formalization scope
"Symmetric" is realized via Mathlib's Matrix.IsSymm; the Loewner order via
(B-A).PosSemidef. The matrix moment generating function itself (ΨQ(λ):=E[e^{λQ}]) is not
formalized, since none of this mission's three theorem statements need it directly — Bernstein's
condition (Definition 6.10) is stated purely in terms of polynomial moments E[Qj],
avoiding the substantial extra machinery (Mathlib's NormedSpace.exp for matrices) that a
faithful matrix-exponential definition would require, at no cost to faithfulness for the three
statements actually drafted.
Independence of {Qi}/{xi} is realized via Mathlib's iIndepFun; this required adding
a local MeasurableSpace (Matrix (Fin d) (Fin d) ℝ) instance in the workspace, since Matrix is
a def, not an abbrev, over the underlying Pi type, so Lean's instance search does not
automatically find the Pi-type MeasurableSpace instance for it. "Identically distributed" is
realized via Mathlib's IdentDistrib against a fixed reference index. "Each component
sub-Gaussian" is restated locally as an explicit MGF bound at the reference index, per this
book's cross-chapter rule against importing another chapter's draft definitions.
If a statement admits a trivializing formalization: the rank(...) prefactor of Theorem 6.17
is kept exactly, not replaced by the ambient dimension d (which would be a strictly weaker,
non-trivializing but unfaithful simplification, since the bound's whole point is that
rank(...) ≤ d can be much smaller). ‖·‖_max and opNorm at d=0 return Mathlib's junk
value 0 (harmless: no matrix entries or singular values exist at that degenerate size either).
Out of scope for this mission: Theorem 6.15 (the sub-Gaussian-tail matrix concentration result
that precedes Theorem 6.17 in the same section) and Corollary 6.20 (the unstructured
covariance-estimation corollary) — both natural follow-on work, cut for this chunk's time
budget; see STATUS.md.
Selected references
M. J. Wainwright, High-Dimensional Statistics: A Non-Asymptotic Viewpoint, Cambridge
University Press, 2019. DOI: 10.1017/9781108627771.
Chapter 6.
J. A. Tropp, "User-friendly tail bounds for sums of random matrices," Foundations of
Computational Mathematics, 12(4):389–434, 2012.
Foundations of Machine Learning XI: Maximum Entropy Models and DualityTextbook
Motivation
Maximum entropy (Maxent) models are a widely used family of density-estimation algorithms:
given a sample and a set of features, they select the distribution that matches the empirical
feature averages while being otherwise as "agnostic" (close to a prior, usually uniform) as
possible — a principle that, notably, never requires specifying a parametric family of
distributions to search over. This mission formalizes the theorem that explains why this works
in practice: Maxent's primal optimization (over distributions, subject to feature-matching
constraints) is exactly dual to an unconstrained maximum-likelihood problem over a specific,
rich parametric family — the Gibbs distributions — even though the Maxent principle never
mentions that family at all.
Setting
For a sample S=(x1,…,xm) drawn i.i.d. from D over a finite set X, and a feature map
Φ:X→RN with ∥Φ∥∞≤r, the Maxent principle seeks
p∈Δ (the simplex of distributions over X) minimizing the relative entropy D(p∥p0)
to a prior p0, subject to ∥Ex∼p[Φ(x)]−Ex∼D^[Φ(x)]∥∞≤λ
(problem 12.7). Introducing the indicator function IK (0 on K, +∞ elsewhere) turns
this into the unconstrained primal objective F(p)=D~(p∥p0)+IC(Ep[Φ]) (Eq. 12.8),
with C the feature-constraint set. A Gibbs distribution with parameter w∈RN
is pw(x)=p0(x)ew⋅Φ(x)/Z(w), Z(w) the partition function (Eq. 12.9); its
associated dual objective is G(w)=m1∑ilogp0(xi)pw(xi)−λ∥w∥1
(Eq. 12.10) — note −m1∑ilogpw(xi) is exactly the empirical log-loss LS(w), so
maximizing G is minimizing an L1-regularized log-loss over the Gibbs family.
Formalization targets
Theorem 12.2 — the mission's goal (Maxent duality).supw∈RNG(w)=minpF(p).
Furthermore, letting p∗=argminpF(p) and d∗=supwG(w): for any ϵ>0 and any w
with ∣G(w)−d∗∣<ϵ, D(p∗∥pw)≤ϵ.
Theorem 12.3 (Maxent L1-regularization generalization bound, milestone). Fix δ>0.
Let w^ solve the L1-regularized dual (12.12) with
λ=2Rm(H)+rlog(2/δ)/(2m). Then, with probability at least 1−δ,
Theorem 12.2 is one of the most striking dualities in the book: the Maxent principle, phrased
purely in terms of closeness to a prior distribution, turns out to always produce a solution in
the Gibbs family — not because that family was ever specified, but because relative entropy is
the specific measure of closeness whose Fenchel conjugate is the log-partition function. This
explains a whole zoo of models (log-linear models, exponential families, Gaussian and bimodal
Gibbs distributions from quadratic features) as instances of a single duality theorem, and gives
a computationally friendlier route to the (constrained, infinite-if-X-is-large) primal problem
via the (unconstrained, N-dimensional) dual. The theorem's proof is a genuine application of
conditional (Fenchel) strong duality, not an unconditional fact — this is, per the chapter's own
brief, the sharpest trivialization risk in the entire mission series, since "strong duality
always holds for convex problems" is false in general, and a formalization skipping the book's
own qualification condition (λ>0, placing u0 in the interior of the constraint set)
would prove a different, potentially-false statement. No prior art on the platform is faithful:
GET /theorems?q=maximum+entropy returns no hits, and Mathlib's generic Fenchel-conjugate
machinery (Analysis/Convex/Conjugate) does not package the book's own specific qualification
conditions as a single reusable theorem matching Theorem B.39 — reusing it inside a proof
(not the audited statement) remains available to whoever proves this theorem later.
Not formalized here: Theorem 12.4 (a Bregman-divergence generalization of Theorem 12.2) and
Theorem 12.5 (its L2-regularized concrete special case). BRIEF.md itself flags Theorem 12.4
as possibly too heavy and offers Theorem 12.5 as an easier alternative; this mission omits both,
since even Theorem 12.5 requires a second, structurally parallel dual-objective-and-minimizer
formalization (for L2 rather than L1 regularization) — disproportionate to this mission's budget
once Theorem 12.2's own qualification-condition bookkeeping (the heaviest single item in this
mission series) is accounted for. §12.1 (density estimation without features: ML/MAP), §12.7
(coordinate descent), and §12.8-12.9 (Bregman-divergence extensions, L2-regularization in
general) are likewise out of scope, per BRIEF.md's own page-range restriction.
Difficulty
Theorem 12.2's proof is the book's own explicit application of the Fenchel duality theorem
(Theorem B.39, Appendix B) to the specific triple f(p)=D~(p∥p0), g(u)=IC(u),
Ap=∑xp(x)Φ(x) — every qualification condition (A a bounded linear map, u_0\in A(\mathrm{dom}f)\cap\mathrm{cont}(g), needing \lambda>0 to place u_0 in int(C)) must be
checked for this triple, not assumed generically; the conjugate computations themselves
(f^*(q)=\log\sum_xp_0(x)e^{q(x)}$ via Lemma B.37, g^(w)=E_{\hat D}[w\cdot\Phi]+\lambda|w|_1 via the dual-norm identity) are specific algebraic derivations, not immediate from abstract duality alone. The second clause's proof needs a further, non-obvious algebraic identity (G(w)-D(p^|p_0)+D(p^|p_w)expanding, via Hölder's inequality applied to the primal feasibility ofp^, to something \le0) that is not a restatement of the first clause but a separate argument built on top of it. Theorem 12.3's proof structurally mirrors chunk 04's SRM bound (bounding L_D(\hat w)-L_S(\hat w)via Hölder's inequality and the Rademacher-complexity feature-concentration bound of Eq. 12.5, then using\hat w`'s optimality twice), but is applied
to the log-loss of a Gibbs distribution rather than a generic bounded loss.
Formalization scope
MaxEntPrimalObjective uses EReal (the extended reals) so that the book's own +\infty
values (from I_K, \tilde D) are represented exactly, matching the chapter's own explicit use
of an extended-real-valued indicator function rather than a soft penalty — a trivializing
formalization this mission avoids is silently replacing +\infty with a large real sentinel,
which would misstate a convex-analysis object whose entire role in the proof is its infinite
value outside the feasible/simplex set. hlam : 0 < lam is a genuine load-bearing hypothesis in
the goal theorem, matching the book's own use of \lambda>0 to invoke Theorem B.39's
qualification condition — not a free convexity assumption; this is the mission's central
faithfulness guard against the chapter's own named trivialization risk. EmpiricalRademacherComplexity/
RademacherComplexity are restated locally, byte-identical to chunks 05-svm/07-boosting's
own copies (a draft item cannot import another chunk's draft module). p^* in the goal theorem
and \hat w in Theorem 12.3 are both quantified via explicit hypotheses (IsLeast, a
minimizer inequality) rather than assumed to exist unconditionally, matching the book's own "let
p^*=..."/"let \hat w be a solution of..." phrasing without asserting existence or uniqueness
beyond what the book itself asserts. No numerical constant in either theorem is altered from
the book's own displayed form.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 12, §12.1-12.6.
E. T. Jaynes, "Information theory and statistical mechanics," Physical Review 106(4), 1957,
620-630.
S. Della Pietra, V. Della Pietra, J. Lafferty, "Inducing features of random fields," IEEE
Transactions on Pattern Analysis and Machine Intelligence 19(4), 1997, 380-393.
Foundations of Machine Learning VIII: Multi-Class Classification and the Margin BoundTextbook
Motivation
Every generalization bound in chapters 2-5 is for binary classification. Most real-world
classification problems have more than two classes, and the number of classes can itself be
in the hundreds or thousands (topic classification, speech recognition). Chapter 9 extends the
margin-based generalization theory of chapter 5 (SVMs) to this multi-class, mono-label setting,
using the same Rademacher-complexity machinery as chunk 03-rademacher-vc, but with a new
combinatorial ingredient — bounding the Rademacher complexity of a family built by taking a
pointwise maximum over several hypothesis sets — needed because a multi-class prediction is
itself an argmax over per-class scores.
Setting
A multi-class hypothesis is a scoring function h:X×Y→R with Y={1,…,k}
(mono-label case); the predicted label is argmaxyh(x,y), and the margin
ρh(x,y)=h(x,y)−maxy′=yh(x,y′) (p. 215) is negative exactly when h misclassifies
(x,y). The empirical margin loss R^S,ρ(h) (Eq. 9.5) uses the same margin-loss
function Φρ (Definition 5.5) as chunk 05-svm, restated locally here. Π1(H)={x↦h(x,y):y∈Y,h∈H} (p. 217) projects a multi-class hypothesis set onto ordinary
real-valued functions on X — the object the chapter's Rademacher-complexity bound actually
controls, since H⊆RX×Y has no norm of its own without such a
projection. Lemma 9.1 is a purely combinatorial tool: the empirical Rademacher complexity of a
family built by taking the pointwise max over l hypothesis sets is bounded by the sum of
their individual empirical Rademacher complexities — used to control the argmax structure of a
multi-class prediction. Theorem 9.2 combines this with chunk 03's Rademacher-complexity
generalization machinery (Theorem 3.3) to give the chapter's margin bound. Proposition 9.3 and
Corollary 9.4 specialize this to kernel-based hypotheses, where each class has its own weight
vector in a reproducing kernel Hilbert space and the k weight vectors are jointly constrained
by an Lp-type group norm ∥W∥H,p≤Λ.
Formalization targets
Lemma 9.1 (milestone). For F1,…,Fl hypothesis sets in RX, l≥1, and
G={max{h1,…,hl}:hi∈Fi}: R^S(G)≤∑j=1lR^S(Fj).
Theorem 9.2 — the mission's goal. For H⊆RX×Y, Y={1,…,k},
fix ρ>0. For any δ>0, with probability at least 1−δ, for all h∈H:
R(h)≤R^S,ρ(h)+ρ4kRm(Π1(H))+2mlog(1/δ).
Proposition 9.3 (milestone). For a PDS kernel K with feature map Φ and
K(x,x)≤r2: Rm(Π1(HK,p))≤r2Λ2/m.
Corollary 9.4 (milestone). Under Proposition 9.3's hypotheses, fix ρ>0. For any
δ>0, with probability at least 1−δ, for all h∈HK,p: R(h)≤R^S,ρ(h)+4kr2Λ2/ρ2/m+log(1/δ)/(2m).
Significance
Theorem 9.2 is the multi-class generalization of chunk 05-svm's Theorem 5.8, and its proof is
the chapter's genuine new technique rather than a restatement: it needs a k-way application of
Lemma 9.1 (once for the argmax structure of the margin, once summing over the k possible
labels), which is exactly where the 4k factor comes from. Corollary 9.4 is the direct
theoretical basis for the multi-class SVM algorithm the chapter derives next (§9.3.1): the
displayed dual optimization problem literally minimizes the right-hand side of the corollary's
bound. No prior art exists on the platform: GET /theorems?q=multi-class%20classification
returns zero hits, and chunk 03's Rademacher-complexity machinery (needed by the proof route)
is a draft, not reusable, per the "drafts cannot import drafts" rule.
Difficulty
Lemma 9.1's proof is a genuine two-function argument (max as 21(h1+h2+∣h1−h2∣),
Talagrand's lemma applied to ∣⋅∣) generalized to l functions by induction, not a
one-line consequence of chunk 03's single-hypothesis-set bound. Theorem 9.2's own proof
(PDF pp. 234-236) is the chapter's most involved: it introduces an auxiliary margin function
ρθ,h with a free parameter θ later fixed to 2ρ, splits the resulting
Rademacher complexity into a "diagonal" term (bounded via a further one-hot decomposition
across the k classes, giving the first factor of k) and a "off-diagonal" term bounded via
Lemma 9.1 (giving the second factor, folded into the same 4k constant). A formalization that
stated Theorem 9.2 for H itself rather than Π1(H), or that treated k as an unrelated
free constant rather than the actual number of classes, would misstate the theorem — precisely
the pitfall BRIEF.md names for this chapter. Proposition 9.3's proof is a clean
Cauchy-Schwarz/Jensen argument in the RKHS but needs the Lp-group-norm hypothesis class
HK,p stated with its exact footnote definition (PDF p. 236), not a simplified p=2
special case.
Formalization scope
GeneralizationError, EmpiricalRademacherComplexity and RademacherComplexity are restated
locally in this chunk's MultiClass namespace (the last two identical in content to chunk
03-rademacher-vc's own copies); MarginLossFunction restates chunk 05-svm's Definition 5.5
(the same function, needed here for this chapter's own EmpiricalMarginLoss); IsPDS
restates chunk 06-kernels's PDS-kernel definition. All are duplicated rather than imported
since a draft item cannot import another chunk's draft module, and none of 03, 05, 06 is
listed as reusable in missions/README.md's "Published definitions" table at the time of this
session. GeneralizationError is formalized via the book's own established equivalence "h
misclassifies (x,y) iff ρh(x,y)≤0" (the form Theorem 9.2's own proof displays and
works with), rather than via an explicit argmax classifier construction — checked as
faithful, not a weakening, since it is exactly the quantity the chapter's proof bounds.
MarginFunction's ⨆_{y'≠y} is a real supremum rather than a Finset.sup', avoiding a
nonempty-finset side proof at definition time; every consuming theorem supplies 2 ≤ k
(Y = Fin k) to guard it against trap 5. MaxFamily's index type is Fintype+Nonempty
rather than a Finset-cardinality parameter l, a harmless generalization matching "l ≥ 1
hypothesis sets" via Nonempty. IsPDS's feature map Φ and its defining property
K(x,y) = ⟪Φ(x),Φ(y)⟫ are supplied as hypotheses to the two kernel theorems rather than as a
separate "feature mapping associated to a kernel" definition — the book itself treats this as
a given correspondence, not a construction. No numerical constant is altered: 4k/ρ and
log(1/δ) in Theorem 9.2, r²Λ²/m in Proposition 9.3, and 4k and r²Λ²/ρ²/m in Corollary
9.4 are exactly as displayed.
Not formalized: §9.1's discussion of the multi-label case (Eq. 9.2/9.3, the Hamming-distance
risk) and Eq. 9.4 (empirical Hamming error) — background for a case this chapter's own
generalization-bound section (§9.2) does not cover (the mono-label case only); the multi-class
SVM primal/dual optimization problems (§9.3.1, an algorithm derived from Corollary 9.4, not a
generalization-theoretic theorem); AdaBoost.MH (§9.3.2, a boosting algorithm, analyzed via a
convex-surrogate argument rather than the Rademacher-complexity route this mission formalizes);
and the uniform-over-ρ extension mentioned at the end of the Theorem 9.2 proof (an
unnumbered remark referencing Theorem 5.9's technique from a different chapter, not restated
here). Drafting only the algorithmic consequences (the multi-class SVM's optimization problem)
in place of the generalization bounds themselves would be this chapter's trivializing
formalization.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 9.
V. Koltchinskii, D. Panchenko, "Empirical margin distributions and bounding the generalization
error of combined classifiers," Annals of Statistics 30(1), 2002 (Lemma 9.1's technique).
K. Crammer, Y. Singer, "On the algorithmic implementation of multiclass kernel-based vector
machines," JMLR 2, 2001 (the multi-class SVM algorithm §9.3.1 derives).
Foundations of Machine Learning VII: On-Line Learning and On-Line-to-Batch ConversionTextbook
Motivation
Every guarantee in the preceding chapters assumes a fixed distribution and i.i.d. sampling.
On-line learning drops both assumptions: an algorithm processes one example at a time, in an
adversarial (worst-case) sequence, and is judged by regret against the best fixed comparator
in hindsight rather than by generalization error. This chapter develops the theory for this
setting — mistake bounds and regret bounds for prediction with expert advice, a margin-based
mistake bound for the Perceptron — and then closes a conceptual gap: since on-line algorithms
need no distributional assumption, can their guarantees be converted into ordinary
distributional (batch) generalization guarantees when the data does happen to be i.i.d.? The
on-line-to-batch conversion theorem answers yes, using nothing but an Azuma's-inequality
martingale argument on the sequence of hypotheses the algorithm actually produces.
Setting
At round t, an on-line algorithm receives x_t, predicts ŷ_t, receives the true label
y_t, and incurs loss L(ŷ_t,y_t); its regret R_T (Eq. 8.1) compares its cumulative loss to
the best fixed action's in hindsight. §8.2 develops this for prediction with expert advice: the
Halving algorithm (realizable case), Weighted Majority and its randomized version RWM
(zero-one loss, Theorem 8.4's L_T ≤ log(N)/(1-β) + (2-β)L_T^min, proved by the chapter's
recurring potential-function technique applied to W_t = ∑_i w_{t,i}), and the Exponential
Weighted Average algorithm (convex losses). §8.3.1 analyzes the Perceptron, a linear
classification algorithm whose margin-based mistake bound (Theorem 8.8, separable case; the
non-separable Theorem 8.11, restated here, in terms of an arbitrary comparator v's hinge
losses) depends only on the normalized margin, not the ambient dimension. §8.4 shows that
averaging the hypotheses h_1,…,h_T an on-line algorithm produces while processing an i.i.d.
sample S yields a hypothesis with controlled true risk: Lemma 8.14 bounds the average of
the per-round risks R(h_t) by the average on-line loss via a martingale argument on
V_t = R(h_t) - L(h_t(x_t),y_t), and Theorem 8.15 upgrades this, via the loss's convexity, to
a bound on the risk of the averaged hypothesis (1/T)∑h_t.
Formalization targets
Theorem 8.4 (milestone). Fix β∈[1/2,1). For any T≥1: L_T ≤ log(N)/(1-β) + (2-β)L_T^min; for β=max{1/2,1-√(log(N)/T)}: L_T ≤ L_T^min + 2√(T log N).
Theorem 8.11 (milestone).M ≤ inf_{ρ>0,‖v‖₂≤1}[(r/ρ+√(r²/ρ²+4‖l_ρ‖₁))/2]², where
l_ρ=(l_t)_{t∈I}, l_t=max{0,1-y_t(v·x_t)/ρ}.
Lemma 8.14 (milestone). For any δ>0, with probability at least 1-δ:
(1/T)∑_tR(h_t) ≤ (1/T)∑_tL(h_t(x_t),y_t) + M√(2log(1/δ)/T).
Theorem 8.15 — the mission's goal (first inequality). Under Lemma 8.14's hypotheses, with
L additionally convex in its first argument: for any δ>0, with probability at least
1-δ: R((1/T)∑_th_t) ≤ (1/T)∑_tL(h_t(x_t),y_t) + M√(2log(1/δ)/T).
Significance
Theorem 8.15 is the chapter's conceptual capstone: it is the only bridge in the whole book
between the adversarial on-line-learning framework and the distributional PAC/statistical
framework every other chapter develops, and its proof needs nothing beyond Lemma 8.14 plus
convexity — no new machinery, just the right observation about the loss's structure. Theorem
8.4 is the chapter's cleanest instance of its recurring potential-function proof technique
(reused, with variations, for Theorems 8.3, 8.6 and 8.7), and — checked against the platform's
existing OnlineConvexOpt.Introduction.randomized_weighted_majority_mistake_bound (Hazan
series) — a genuinely different result from what is already on the platform: that lemma
bounds a mistake count with a (1+ε) multiplier, this bounds the RWM algorithm's own
weighted-mixture loss with a 1/(1-β) term and a distinct optimal-β substitution,
confirming BRIEF.md's assessment that the two are close but not interchangeable. Theorem
8.11 is the non-realizable generalization of the separable-case Perceptron bound (Theorem 8.8)
that motivates soft-margin algorithms generally, expressed via an arbitrary comparator's hinge
loss rather than assuming perfect separability. No prior art exists for the chapter's other
content: GET /theorems?q=online%20to%20batch returns zero hits, and GET /theorems?q=perceptron returns only an unrelated neural-network topology result.
Difficulty
Theorem 8.4's proof (mirrored by Theorem 8.3's WM analogue) derives matching upper and lower
bounds on the potential W_t, combines them via a logarithm, and substitutes a specific
optimal β found by differentiating the resulting bound — a genuine two-step optimization
argument, not a direct algebraic identity. Theorem 8.11's proof solves a quadratic inequality
in √M after summing the hinge-loss-defining inequalities over the update set I and
invoking the Cauchy-Schwarz step already used in Theorem 8.8's proof; keeping the inf over
both ρ and v in the statement (not fixing them, per BRIEF.md's pitfall note) is what
makes this a genuine bound rather than a bound for one arbitrary choice. Lemma 8.14's proof is
an application of Azuma's inequality (the book's own Theorem D.7) to the martingale difference
sequence V_t = R(h_t) - L(h_t(x_t),y_t), which requires h_t to be measurable with respect
to the history strictly before round t — the on-line algorithm's hypothesis at round t
must not depend on the pair drawn at that same round, per BRIEF.md's pitfall note. Theorem
8.15's step beyond Lemma 8.14 is the passage from the average of T individual risks to the
risk of the averaged hypothesis, licensed by Jensen's inequality under the loss's convexity in
its first argument — dropping convexity breaks exactly this step, not merely weakening a
constant.
Formalization scope
GeneralizationError restates chunk 11-regression's Eq. (11.1) convention locally (Y := ℝ,
consistent with that chunk's own harmless simplification), needed here since Theorem 8.15
requires averaging hypotheses into a single real-valued function. OnlineHypothesis A S t is
formalized so that its type signature itself enforces history-adaptedness: the on-line
algorithm A : (n:ℕ) → (Fin n → X × ℝ) → (X → ℝ) is a function of the prefix of the sample
seen so far, and OnlineHypothesis A S t applies it only to S's first t pairs — this is
what licenses Azuma's inequality's martingale-difference argument (the conditional-mean-zero
property of V_t), per BRIEF.md's pitfall note. Revision (2026-09-19), correcting an
earlier claim in this section: history-adaptedness does not by itself guard against
GeneralizationError's Bochner integral silently junking to 0 for a non-measurable
hypothesis (a distinct property — whether h_t, as a function of x, is Measurable — from
whether h_t depends on round t's own draw). Moderation found this a live gap in both Lemma
8.14 and Theorem 8.15's drafted statements; both now carry an explicit hAmeas/hLmeas
hypothesis in addition to the history-adapted type signature.
RWM's w_{t,i}, W_t, p_{t,i}, L_t, L_T, L_{T,i}, L_T^min are modeled as their own
recursively-defined algorithm state (mirroring, but never substituting into, chunk
07-boosting's AdaBoost pattern), matching this chapter's own loss-based (not mistake-count)
quantities, per BRIEF.md's pitfall note distinguishing them from AdaBoost's and RWM-mistake
variants. The Perceptron's w_t, update-index set I, and M = |I| are modeled the same way,
using Eq. (8.23)'s equivalent sign-agreement update rule (the book's own reformulation of
Figure 8.6's sgn-based rule). Theorem 8.11's inf_{ρ>0,‖v‖₂≤1} is a genuine nested restricted
infimum (⨅ ρ ∈ Set.Ioi 0, ⨅ v ∈ Metric.closedBall 0 1, …), not a bound instantiated at fixed
ρ, v, per BRIEF.md's explicit pitfall note. No numerical constant is altered from the
book in any of the four theorems.
Not formalized: Theorems 8.1-8.3 (Halving and WM mistake bounds — the chapter's warm-up
results, superseded in content by the more general RWM/EWA theorems that follow), Theorem 8.5
(a matching lower bound, a distinct impossibility result rather than an algorithm's guarantee),
Theorems 8.6-8.7 (Exponential Weighted Average regret bounds — a third algorithm with its own
potential-function proof, out of scope per BRIEF.md's restriction to §8.2's Halving/WM/RWM),
Theorems 8.8-8.10 (the Perceptron's separable-case bound and its leave-one-out-based expected
generalization bounds, both superseded in generality by Theorem 8.11 for this mission's
purposes), Theorem 8.12 (Perceptron's L²-norm hinge-loss bound, the book's own note that it is
implied by, and looser than, Theorem 8.11's L¹-norm bound), the dual/kernel Perceptron (an
equivalent reformulation, not new generalization content), and Theorem 8.15's second displayed
inequality (a regret-form corollary depending on the regret decomposition of the surrounding
discussion, not drafted per BRIEF.md's own recommendation to commit to the first inequality
as the goal). §8.3.2 (Winnow) and §8.5 (the game-theoretic connection) are out of scope per
BRIEF.md's chapter restriction.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 8 (§8.2, §8.3.1, §8.4).
N. Littlestone, M. K. Warmuth, "The weighted majority algorithm," Information and
Computation 108(2), 1994 (WM/RWM's origin).
F. Rosenblatt, "The perceptron: a probabilistic model for information storage and
organization in the brain," Psychological Review 65(6), 1958 (the Perceptron algorithm).
Y. Freund, R. E. Schapire, "Large margin classification using the perceptron algorithm,"
Machine Learning 37(3), 1999 (Theorem 8.11's hinge-loss mistake bound).
Support Vector Machines VI: An Oracle Inequality for Classifying with Support Vector MachinesTextbook
Motivation
A support vector machine for classification is trained by minimizing a regularized hinge-loss
objective — never the classification loss itself, which is non-convex and computationally
intractable to minimize. Every earlier mission in this series supplies one piece of the argument
that this substitution is nonetheless justified: 01-loss-functions shows the excess hinge risk
controls the excess classification risk (Zhang's inequality); 05-concentration supplies a
Hilbert-space concentration inequality; and Chapter 6 of the book (not itself a mission in this
series, but cited here) combines concentration with a stability argument to bound how far the
empirical SVM solution's regularized hinge risk can be from its population minimum. Steinwart &
Christmann, Support Vector Machines (Springer 2008, Information Science and Statistics), Chapter
8, assembles exactly these three pieces into Theorem 8.1: an explicit, finite-sample,
non-asymptotic bound on how close an SVM classifier's classification risk gets to the Bayes
risk — the payoff result the whole apparatus of Chapters 2, 5 and 6 was built to deliver.
Setting
Fix a measurable space X and Y:={−1,1}. A lossL:X×Y×R→[0,∞), a distribution P on X×Y, the L-riskRL,P(f):=∫L(x,y,f(x))dP(x,y), and the Bayes riskRL,P∗:=inffRL,P(f) are exactly as in
01-loss-functions, restated locally here. The hinge loss is Lhinge(y,t):=max{0,1−yt} and the classification loss is Lclass(y,t):=1(−∞,0](y⋅sgnt).
Let H be a reproducing kernel Hilbert space (RKHS) of a kernel k over X, i.e. a Hilbert
space of functions X→R in which point evaluation is represented by an inner product
against a feature map x↦kx∈H with k(x,x′)=⟨kx,kx′⟩H. Write
∥k∥∞:=supxk(x,x) for the kernel's sup-bound. For a sample D:=((x1,y1),…,(xn,yn))∈(X×Y)n, the empirical risk is RL,D(f):=n1∑iL(xi,yi,f(xi)), and the SVM decision functionfD,λ is the minimizer over
H of g↦λ∥g∥H2+RL,D(g) — the regularized empirical risk minimizer a
practical SVM solver computes. The restricted Bayes risk on H is RL,P,H∗:=inff∈HRL,P(f), and the approximation error function is A2(λ):=inff∈Hλ∥f∥H2+RL,P(f)−RL,P,H∗: the price, in excess risk, of restricting attention
to H at regularization strength λ.
Formalization targets
Goal: Theorem 8.1 — oracle inequality for classifying with SVMs
with Pn-probability at least 1−e−τ, for the hinge loss, H a separable RKHS with
∥k∥∞≤1, and P such that H is dense in L1(PX). The bound is finite-sample
(valid for every fixed n, not just asymptotically) and fully explicit: no unspecified constants
beyond A2(λ) itself, which is a genuine, computable-in-principle quantity depending on
H, P and λ, not a placeholder. Making the right-hand side small — e.g. letting
λ→0 slowly as n→∞ — is exactly what proves an SVM classifier consistent for
the classification risk, even though it never optimizes that risk directly.
Three milestones, each the specific instance of an earlier chapter's result that this proof
invokes (attack order):
Theorem 6.24 instance (hinge loss): λ∥fD,λ∥H2+RL,P(fD,λ)−RL,P,H∗<A2(λ)+λ−1(8τ/n+4/n+8τ/(3n)) with
Pn-probability at least 1−e−τ — the general oracle inequality for regularized SVMs
(Chapter 6, not itself a mission of this series), specialized to the hinge loss, whose global
Lipschitz constant 1 collapses the general theorem's Lipschitz-constant factor away.
Theorem 5.31 instance: RLhinge,P,H∗=RLhinge,P∗ — the
RKHS's restricted Bayes hinge risk equals the unrestricted one, using H's density in
L1(PX) and the fact (Lemma 2.25 v)) that the hinge loss is automatically a P-integrable
Nemitski loss.
Theorem 2.31 instance (Zhang's inequality, second clause): RLclass,P(f)−RLclass,P∗≤RLhinge,P(f)−RLhinge,P∗ for
every measurable f with finite hinge and classification risk — this series' own
01-loss-functions mission's zhang_inequality, second assertion, restated locally.
Chaining these three (with milestone 2 used to rewrite milestone 1's RL,P,H∗ as RL,P∗,
then milestone 3 applied to f=fD,λ) is exactly the book's four-line proof of Theorem
8.1.
Significance
Theorem 8.1 is this series' capstone: every other chapter's result (loss calibration, RKHS theory,
representer theorem, Hilbert-space concentration, the general SVM oracle inequality) is a
prerequisite this theorem consumes, and nothing later in the book depends on formalizing it
further to be meaningful in its own right — it is already a complete, citable, explicit
consistency-and-rate statement for SVM classification. It is also the first result in this series
whose statement combines three distinct chapters' machinery into a single inequality, making the
"restate the specific instance, not the general machinery" discipline (Hard Rule 9) most visibly
load-bearing here: none of Theorem 6.24, Theorem 5.31 or Theorem 2.31 in their full generality is
needed, only the narrow slice each contributes to this one proof.
No machine-checked formalization of an SVM classification oracle inequality of this kind is known
to exist in a public Lean/Mathlib development (see prior-art search below): statistical learning
theory results of this shape (finite-sample high-probability bounds combining regularization,
approximation error and concentration) are largely unformalized outside isolated concentration
inequalities.
Difficulty
The difficulty here is compositional rather than computational: each of the three milestones is,
in its own chapter, a short consequence of substantial earlier machinery (Theorem 6.24 rests on a
stability argument plus Hilbert-space Hoeffding; Theorem 5.31 rests on continuity of the risk
functional on Lp; Theorem 2.31 rests on a pointwise case analysis), but none of that earlier
machinery is re-derived here — only the specific numerical instance each milestone hands to
Theorem 8.1's proof. Getting the three instances to compose correctly (in particular, making sure
milestone 1's restrictedBayesRisk and milestone 2's equality target the identical quantity, so
the substitution the book's proof performs is literally available) is the main formalization
risk, not any single proof step.
The probabilistic statement itself is genuinely over the product measure Pn on samples of size
n, not an expectation or almost-sure claim, and the bounded-kernel hypothesis ∥k∥∞≤1
is load-bearing (it is what fixes the "8" and "4" constants exactly, not just up to a
normalization).
Formalization scope
X is an arbitrary measurable space; H is a general real Hilbert space (NormedAddCommGroup H,
InnerProductSpace ℝ H, CompleteSpace H), not specialized to a concrete function space, matching
the book's own generality. IsRKHSOfKernel, risk/bayesRisk, classLoss/hingeLoss and
empiricalRisk are restated locally in this mission's own Classification sub-namespace — per
Hard Rule 9, a draft mission cannot import another draft's definitions, so these duplicate (with
identical mathematical content) definitions already drafted in 01-loss-functions and
04-representer. IsSVMSolution encodes "fD,λ minimizes the regularized empirical
risk over H" directly as a hypothesis rather than re-deriving existence and uniqueness
(04-representer's territory). DenseInL1 renders "H dense in L1(PX)" as an
ε-approximation property in the L1 seminorm rather than via the Lp subtype, to
keep the statement self-contained without importing Chapter 5's own Lp-space apparatus.
∥k∥∞≤1 is ∀ x, k x x ≤ 1 (since ∥k∥∞:=supxk(x,x), Eq. (4.15)).
"With Pn-probability at least 1−e−τ" is stated as a lower bound on
(Measure.pi (fun _ : Fin n => P)).real {D | ...}, the n-fold product measure of the event.
Theorem 8.2 (Classification with benign kernels), the polynomially-decaying-entropy-number
specialization of Theorem 8.1 stated immediately after it in the book, is deliberately out of
scope for this mission: it requires entropy-number and covering-number machinery (dyadic entropy
numbers ei(id:H→C(X)), Lemma 6.21's covering-number bound) that none of this
mission's three milestones need, and formalizing it faithfully would roughly double the
mission's scope for a result that is a refinement, not a prerequisite, of Theorem 8.1. A
trivializing formalization of the goal would state the conclusion for an unconstrained
fSVM : (Fin n → X × ℝ) → H with no connection to L, D or λ (making the bound a tautology
about whatever function is supplied, independent of what an SVM actually computes); this is ruled
out here by requiring hfSVM : ∀ D, IsSVMSolution H toFun hingeLoss lam n D (fSVM D), which pins
fSVM D to be an actual minimizer of the regularized empirical hinge risk for that specific
sample D.
Selected references
I. Steinwart & A. Christmann, Support Vector Machines, Springer, Information Science and
Statistics, 2008. https://doi.org/10.1007/978-0-387-77242-4 (Chapter 8, §8.1, pp. 287-291;
Chapter 6, §6.4, pp. 223-225; Chapter 5, §5.4-5.5, pp. 179, 190-191; Chapter 2, §2.3, p. 37).
T. Zhang, "Statistical behavior and consistency of classification methods based on convex risk
minimization," Annals of Statistics 32(1), 2004, pp. 56-85.
https://doi.org/10.1214/aos/1079120130
This series' 01-loss-functions mission (Theorem 2.31, full statement and proof) and
04-representer mission (Chapter 5's RKHS and SVM-solution machinery, in full generality).
Foundations of Machine Learning VI: AdaBoost and Margin TheoryTextbook
Motivation
Weak learning — a base classifier only slightly better than random guessing — is easy to come
by; strong learning, in the PAC sense of Chapter 2, is not. Boosting is the technique that
turns the first into the second: combine many weak classifiers, each trained on a reweighted
version of the sample that emphasizes previously misclassified points, into a single strong
ensemble. AdaBoost, the algorithm this chapter studies, does this with a specific, closed-form
weighting rule, and comes with two distinct theoretical guarantees: its training error
decreases exponentially fast in the number of rounds (Theorem 7.2), and — more surprisingly —
its test error can keep improving even after the training error has already reached zero, an
empirical phenomenon that Chapter 3's VC-dimension bound cannot explain at all (it predicts
overfitting for large numbers of rounds) but that a margin-based analysis, structurally
identical to Chapter 5's SVM theory, does (Theorem 7.7). This mission formalizes both routes.
Setting
AdaBoost (Figure 7.1) takes a labeled sample S=((x1,y1),…,(xm,ym)) with
yi∈{−1,+1} and a base classifier set H⊆{−1,+1}X, and runs for T rounds.
It maintains a distribution Dt over the sample indices, starting uniform (D1(i)=1/m); at
round t it selects a base classifier ht with small Dt-weighted error
εt=Pri∼Dt[ht(xi)=yi], sets αt=21logεt1−εt and Zt=2εt(1−εt), and reweights:
Dt+1(i)=Dt(i)exp(−αtyiht(xi))/Zt. After T rounds it returns
f=∑t=1Tαtht; its normalized version is fˉ=f/∑tαt. Since
εt<1/2 makes αt>0, fˉ is a genuine convex combination of base
classifiers, i.e. a member of the convex hullconv(H)={∑kμkhk:μk≥0,hk∈H,∑kμk≤1} (Eq. 7.12). The chapter reuses Chapter 5's confidence-margin
apparatus (empirical margin loss R^S,ρ, Rademacher complexity R^S/Rm) to
analyze fˉ's generalization.
Formalization targets
Theorem 7.2 (AdaBoost empirical error bound, milestone). The empirical (zero-one) error of
f satisfies R^S(f)≤exp(−2∑t=1T(1/2−εt)2), and, if
γ≤1/2−εt for all t, R^S(f)≤exp(−2γ2T): training error
decays exponentially in T whenever every round beats random guessing by a fixed margin
(the "edge" γ).
Lemma 7.4 (milestone).R^S(conv(H))=R^S(H): the convex hull of a
hypothesis set, though generally much larger, has exactly the same empirical Rademacher
complexity as the set itself.
Corollary 7.5 (Ensemble Rademacher margin bound, milestone). For H a set of real-valued
functions and ρ>0, with probability at least 1−δ, every h∈conv(H)
satisfies R(h)≤R^S,ρ(h)+ρ2Rm(H)+log(1/δ)/(2m) (and the
empirical-complexity analogue with an extra additive 3log(2/δ)/(2m) term) — this
is Theorem 5.8's margin bound applied to conv(H), then rewritten via Lemma 7.4 so its
complexity term is H's own, not the (much larger) convex hull's.
Theorem 7.7 — the mission's goal. Assume εt<1/2 for every t∈[T] (so
αt>0). Then for any ρ>0,
R^S,ρ(fˉ)≤2Tt=1∏Tεt1−ρ(1−εt)1+ρ.
Significance
Theorem 7.7's bound is what makes margin theory a genuine explanation of AdaBoost's empirical
behavior: combined with Corollary 7.5 (applied to fˉ∈conv(H)), it shows that if
AdaBoost's edge stays bounded away from zero, the empirical margin loss at a fixed ρ
decreases exponentially in T while the generalization bound's complexity term does not depend
on T at all — so continuing to boost past zero training error can still shrink the true risk,
by growing the margin on the training points that are already correctly classified. This
resolves the puzzle that opens §7.3.1: AdaBoost's test error is empirically observed to keep
decreasing well after its training error hits zero, which the chapter's own earlier
VC-dimension bound on FT (Eq. 7.9, growing as O(dTlogT)) predicts should
eventually overfit, not improve. No prior art on the Prove2Me platform is faithful:
GET /theorems?q=boosting and q=AdaBoost return no hits; this chunk's Rademacher-complexity
apparatus is restated locally (a draft item cannot import chunk 05-svm's or 03-rademacher-vc's
own draft copies) rather than reused, matching the precedent those chunks' own STATUS.md
records recommend for every later chunk needing the same machinery.
Not formalized here: Theorem 7.6 (the VC-dimension-based ensemble margin bound, a direct
corollary of Corollary 7.5 via chunk 03's VC-dimension apparatus) — restating 03's own
machinery a second time for a single further corollary is disproportionate within this
mission's budget, and the chapter's actual capstone targets the sharper, dimension-free
Rademacher-complexity route (Theorem 7.7) instead. Also out of scope: §7.2.2's coordinate-
descent equivalence, §7.2.3's practical (decision-stump) use, and §7.3.4-7.3.5's margin-
maximization LP and game-theoretic interpretation — discussion sections with no numbered result
feeding the goal's proof.
Difficulty
Theorem 7.2's proof needs the telescoping identity DT+1(i)=e−yif(xi)/(m∏tZt)
(Eq. 7.2), obtained by repeatedly unfolding the recursive weight update — a genuine induction on
t, not a one-line algebraic manipulation — before the elementary inequality 1u≤0≤e−u turns the empirical error into a telescoping product of the Zt's, each of which is
then re-expressed in closed form via a case split on yiht(xi)=±1. Theorem 7.7's proof
reuses the same identity but with an added margin-shift term ρ∥α∥1 inside the
exponential, requiring the same telescoping machinery plus a separate accounting of
eρ∑tαt against the product of [(1−εt)/εt]ρ
factors coming from each αt's own closed form — a proof that shares its main structural
step with Theorem 7.2 but is not a trivial corollary of it. Corollary 7.5's proof is Lemma 7.4
(itself a careful supremum-exchange argument using the dual-norm characterization of ℓ1,
not a routine calculation) composed with Theorem 5.8, applied to the specific set
conv(H) rather than a generic hypothesis class — a formalization that stated the
corollary only for a "sufficiently nice" abstract class, without deriving it from Lemma 7.4's
convex-hull identity, would be proving a different, weaker-provenance statement.
Formalization scope
WeightedError, AdaBoostAlpha, AdaBoostNormalizer, AdaBoostDist, AdaBoostEpsilon,
AdaBoostEnsemble, AdaBoostNormalizedEnsemble, EmpiricalError and ConvHull are new,
capturing AdaBoost as an actual algorithm (a genuine recursion on the round index, closed under
Definitions.Def_FoundationsML_Boosting_AdaBoostDist's own recursive equation) rather than an
unspecified "boosting procedure" — the trivialization trap BRIEF.md names for this chapter.
AdaBoostDist takes the sequence of base classifiers actually selected at each round,
h : ℕ → X → ℝ, as external data rather than deriving it via an argmin over H; this is
checked in SELF_REVIEW.md to drop no content either milestone or the goal theorem's statement
actually needs, since neither invokes h_t's optimality, only the weighted error ε_t it
produces under AdaBoost's own distribution D_t. PhiRho, EmpiricalMarginLoss,
MarginGeneralizationError, EmpiricalRademacherComplexity and RademacherComplexity are
restated locally, byte-identical to chunk 05-svm's own copies of Definitions 5.5, 5.6, 2.1
(specialized), 3.1, 3.2 (a draft item cannot import another chunk's draft module); this
duplication collapses once 05-svm and 03-rademacher-vc are uploaded and listed in
missions/README.md's "Published definitions" table. No numerical constant in any of the four
theorems is altered from the book's own displayed form. A trivializing formalization this
mission avoids: stating Theorem 7.2/7.7 for an arbitrary sequence of error rates
ε1,…,εT satisfying εt<1/2, disconnected from any actual
algorithm — AdaBoostEpsilon instead ties every ε_t to the weighted error AdaBoost's own
recursively defined D_t assigns to its own selected h_t, so the bound is provably about
this algorithm's error trajectory, not an arbitrary one.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 7.
Y. Freund, R. E. Schapire, "A decision-theoretic generalization of on-line learning and an
application to boosting," Journal of Computer and System Sciences 55(1), 1997, 119-139.
R. E. Schapire, Y. Freund, P. Bartlett, W. S. Lee, "Boosting the margin: a new explanation for
the effectiveness of voting methods," The Annals of Statistics 26(5), 1998, 1651-1686.
High-Dimensional Statistics VI: The Lasso's l2-Error Bound under Restricted EigenvalueTextbook
Motivation
Modern regression problems routinely have far more candidate predictors than
observations: genomics with tens of thousands of genes and a few hundred patients,
signal recovery from far fewer measurements than the signal's ambient dimension, image
reconstruction from an undersampled set of linear projections. In every such setting
the classical least-squares estimator is either undetermined or hopelessly noisy, and
the ordinary theory of linear regression, built for n≫d, has nothing to say.
The Lasso — ℓ1-penalized least squares, introduced by Tibshirani (1996) — is
the workhorse response: penalize the least-squares objective by the ℓ1-norm of
the coefficient vector, which both drives many coordinates exactly to zero and remains
a convex, tractable program. What is far from obvious a priori is that this convex
relaxation is not just computationally convenient but statistically correct: under a
condition on the design matrix, its estimation error is controlled at a rate matching
what one could hope for even knowing the true support in advance. Wainwright's
High-Dimensional Statistics: A Non-Asymptotic Viewpoint (Cambridge University Press,
2019), Chapter 7, gives the deterministic backbone of this guarantee — the part of the
argument that holds for any noise vector and any design matrix satisfying a single
geometric condition, before any probability is introduced.
Setting
Consider the linear model y=Xθ∗+w, where X∈Rn×d is a
known design matrix, θ∗∈Rd is an unknown coefficient vector, and
w∈Rn is a noise vector, observed together with the response
y∈Rn. Write ∥θ∥1:=∑j=1d∣θj∣ and
∥v∥∞:=maxj∣vj∣. The Lagrangian Lasso is the convex program
θ^∈θ∈Rdargmin{2n1∥y−Xθ∥22+λn∥θ∥1},
with regularization parameter λn>0 chosen by the user.
Say θ∗ is supported onS⊆{1,…,d} if θj∗=0 for
every j∈/S, and write ∣S∣=s for its sparsity. For a subset S and a
constant α≥1, the cone
Cα(S):={Δ∈Rd∣∥ΔSc∥1≤α∥ΔS∥1}
collects the directions in which an estimation error concentrated near the true
support can plausibly point. The matrix X satisfies the restricted eigenvalue
(RE) condition over S with parameters (κ,α) if
n1∥XΔ∥22≥κ∥Δ∥22for all Δ∈Cα(S).
Ordinarily, when d>n, the quadratic cost's Hessian XTX/n is rank-deficient and
has a large flat subspace, so no uniform positive-curvature bound like this can hold
over all of Rd; the RE condition asks for curvature only along the cone
Cα(S) that the Lasso's own optimality actually forces its error into.
The companion notion — the restricted nullspace property, C1(S)∩null(X)={0} — is the noiseless analogue: it is exactly the condition
under which the ℓ1-relaxed basis pursuit program
minθ∥θ∥1 s.t. Xθ=y exactly recovers every S-sparse
θ∗ from y=Xθ∗ (Theorem 7.8). A small pairwise incoherenceδPW(X):=maxj,k∣⟨Xj,Xk⟩/n−1[j=k]∣ is one
simply-checked sufficient condition for it (Proposition 7.9).
Formalization targets
Goal (Theorem 7.13(a) and its final sentence)
Under (A1) θ∗ supported on S, ∣S∣=s, and (A2) X satisfies the RE
condition over S with parameters (κ,3): for any θ^ solving the
Lagrangian Lasso with λn≥2∥XTw/n∥∞,
∥θ^−θ∗∥2≤κ3sλn,∥θ^−θ∗∥1≤4s∥θ^−θ∗∥2.
Milestones
Theorem 7.8. The restricted nullspace property is equivalent to exact recovery
by basis pursuit for every S-sparse vector.
Proposition 7.9.δPW(X)≤1/(3s) implies the restricted nullspace
property for every S with ∣S∣≤s.
Significance
The bound is the deterministic core underneath every high-dimensional consistency
guarantee for the Lasso: once a statistician checks that a particular random design
(Gaussian, sub-Gaussian, or otherwise) satisfies the RE condition with high
probability, and bounds ∥XTw/n∥∞ using concentration of the noise, this one
inequality converts directly into a rate — Wainwright's own Examples 7.14–7.15 do
exactly this for the classical Gaussian linear model and for compressed sensing. It
also isolates why the Lasso is competitive with an oracle that already knows the
support: the rate s/n (up to log factors, once λn is instantiated)
is the same order one would get regressing only on the s true coordinates.
The theorem is already proved in the source; this mission's contribution is a
machine-checked formal statement (and, eventually, proof) of the bound together with
its two supporting structural results, in a form that composes with the rest of this
book's formalized chapters and with any future formalization of the concentration
arguments (Chapters 2–6) that supply λn's numerical value in specific models.
Difficulty
The proof is short but every step leans on getting the cone membership exactly right.
The first hurdle is showing the error Δ:=θ^−θ∗ lands in
C3(S) at all — this needs the Lagrangian basic inequality (from θ^'s
optimality against θ∗), not the simpler constrained-Lasso argument used for
parts (b)/(c), and the constant 3 (not 1) comes precisely from the factor of 2
in the λn bound combined with Hölder's inequality on the noise term. A
tempting shortcut is to assume the uniform curvature bound (7.24),
∥XΔ∥22/n≥κ∥Δ∥22 for all Δ=0 — but in the
regime d>n this uniform bound is never satisfiable, since XTX/n has a
(d−n)-dimensional null space; the entire point of the restricted eigenvalue
condition is to demand curvature only on the cone the optimality argument already
produces.
Formalization scope
X, θ∗, θ^, w are unconstrained vectors/matrices over
Fin n/Fin d-indexed reals; S is a Finset (Fin d). The RE condition's constant
κ is required positive, since the book divides by it throughout the discussion
of Theorem 7.13 even though Definition 7.12 itself states the condition schematically;
α=3 is fixed to the book's own value, not a free parameter of the goal. The
ℓ∞- and pairwise-incoherence suprema are real iSups over finite index
types, which default to Mathlib's junk value 0 at dimension 0 — a degenerate
corner with no vector to measure, not a trivializing case of the theorem's actual
content. A trivializing formalization would drop the final-sentence ℓ1-bound as
"a trivial Cauchy–Schwarz corollary" or silently substitute the stronger, later-defined
restricted isometry property for the restricted eigenvalue condition; this mission
does neither. Parts (b) (constrained Lasso) and (c) (relaxed basis pursuit) of
Theorem 7.13, and the primal–dual-witness support-recovery result (Theorem 7.21), are
out of this mission's scope; a full-strength companion mission covering them,
including the RIP-based Proposition 7.11 and the random-design certification
Theorem 7.16, is natural future work.
Selected references
Wainwright, M. J. High-Dimensional Statistics: A Non-Asymptotic Viewpoint.
Cambridge University Press, 2019. Chapter 7. DOI: 10.1017/9781108627771.
Tibshirani, R. "Regression shrinkage and selection via the Lasso." Journal of the
Royal Statistical Society: Series B, 58(1), 1996, 267–288.
Chen, S. S., Donoho, D. L., Saunders, M. A. "Atomic decomposition by basis pursuit."
SIAM Journal on Scientific Computing, 20(1), 1998, 33–61.
High-Dimensional Probability IX: The Matrix Deviation InequalityTextbook
Motivation
Random matrices with independent rows are the workhorse of high-dimensional statistics and
compressed sensing: sample covariance matrices, sub-sampled measurement operators, and randomized
sketches are all of this form. A basic question about such a matrix A is how close ∥Ax∥2
stays to its typical size E∥Ax∥2≈m∥x∥2 — not just for one fixed x,
but simultaneously for every x in some set T of interest (a sphere, a cone, the difference
set of a data cloud). A bound that holds only pointwise in x is of limited use, since most
applications need to reason about the worst case over an entire geometric set at once.
This chapter proves such a uniform bound — the matrix deviation inequality — for matrices with
independent, isotropic, sub-gaussian rows, controlling the deviation by a single geometric
parameter of T, its Gaussian complexity. The result is a direct descendant of the chaining
machinery of Chapter 8 (via Talagrand's comparison inequality, Chapter 8.6) and, in this book's
own account, subsumes several results proved earlier by other methods — two-sided bounds on
random matrices, the Johnson-Lindenstrauss lemma for infinite sets — while also yielding two new
consequences central to high-dimensional convex geometry: the M∗ bound and the Escape theorem,
both controlling how a random subspace intersects a fixed geometric set.
Setting
Fix a probability space (Ω,F,P). A random vector X in Rn is
isotropic if its covariance matrix is the identity, Σ(X)=E[XX⊤]=In —
equivalently (the book's own Lemma 3.2.3), E⟨X,x⟩2=∥x∥22 for every
x∈Rn. The sub-gaussian norm of a random vector X is
∥X∥ψ2:=supx∈Sn−1∥⟨X,x⟩∥ψ2, the supremum over the unit
sphere of the scalar sub-gaussian (Orlicz ψ2) norm of its one-dimensional marginals; X is
sub-gaussian when this is finite.
Fix a standard Gaussian random vector g∼N(0,In) in Rn (a vector whose coordinates
in any orthonormal basis are independent standard normal). For a subset T⊆Rn,
the Gaussian width and Gaussian complexity of T are
w(T):=Ex∈Tsup⟨g,x⟩,γ(T):=Ex∈Tsup∣⟨g,x⟩∣,
two closely related measures of the geometric size of T — "cousins" that agree up to a factor of
2 whenever T contains the origin, and agree exactly when T is origin-symmetric.
Formalization targets
Goal (Theorem 9.1.1, Matrix deviation inequality)
∃C>0:Ex∈Tsup∥Ax∥2−m∥x∥2≤CK2γ(T)
for every m×n matrix A whose rows A1,…,Am are independent, isotropic,
sub-gaussian random vectors with K:=maxi∥Ai∥ψ2, and every T⊆Rn
(whenever γ(T) is finite). C is the book's own unnamed absolute constant, hard-coded to no
numeral — the weakest stable form of the claim.
Milestone (Theorem 9.4.2, the M∗ bound)
Ediam(T∩kerA)≤mCK2w(T)
for the same class of matrices A and any bounded T⊆Rn, where kerA is the
(random) kernel of A, a subspace of codimension at most m. A direct one-paragraph consequence
of the goal theorem (apply it to T−T, then restrict to kerA, where ∥Ax−Ay∥2 vanishes).
Significance
The matrix deviation inequality converts a purely algebraic quantity — how close ∥Ax∥2 stays
to m∥x∥2 — into a single geometric parameter of the index set T, letting it subsume,
via specializations of T, results that were previously proved by separate ad hoc arguments:
two-sided singular value bounds on random matrices (T a sphere), Johnson-Lindenstrauss-type
embeddings for possibly infinite point sets (T a difference set), and covariance estimation. The
M∗ bound is one of the two classical consequences the book develops fresh from the inequality
(the other, the Escape theorem, is outside this mission's scope): it answers, quantitatively, how
large a random affine section of a fixed convex body typically is, a question at the heart of the
local theory of Banach spaces and of compressed sensing's recovery guarantees (Chapter 10 builds
directly on this chapter's machinery). Both results have long-standing, well-understood classical
proofs; this mission formalizes their statements, not open research.
Difficulty
The natural first idea — bound ∥Ax∥2−m∥x∥2 pointwise for a fixed x using
concentration of the norm of a sub-gaussian random vector, then take a union bound over T — only
works when T is finite, and gives a bound that scales with log∣T∣ rather than with the actual
geometric size of T. The book's actual route treats Xx:=∥Ax∥2−m∥x∥2, indexed by
x∈Rn, as a genuine random process and shows it has sub-gaussian increments
(∥Xx−Xy∥ψ2≤CK2∥x−y∥2) — itself a nontrivial fact proved in stages (first for a
single unit vector via concentration of the norm, Theorem 3.1.1; then for a pair of unit vectors
via a squared-process argument; only then in full generality) — and then invokes Talagrand's
comparison inequality (a consequence of the chaining machinery of Chapter 8) to pass from
sub-gaussian increments directly to a bound in terms of Gaussian complexity, without ever
performing a union bound over T itself.
Formalization scope
A is represented by its rows, A : Fin m → Ω → EuclideanSpace ℝ (Fin n), with ‖Ax‖₂ recovered
as Real.sqrt (∑ i, ⟨Aᵢ,x⟩²) rather than constructing A as a Matrix/LinearMap — this
matches the book's own row-by-row hypotheses exactly and is what both theorems' own proofs use
directly. IsIsotropic is formalized via the book's basis-free Lemma 3.2.3 characterization
(E⟨X,x⟩² = ‖x‖² for every x) rather than the matrix equation Σ(X)=Iₙ, avoiding a fixed-basis
covariance-matrix construction the rest of this chunk's definitions do not otherwise need.
SubgaussianVectorNorm reuses the published scalar subgaussianNorm. GaussianWidth and
GaussianComplexity realize the standard Gaussian vector g ∼ N(0,Iₙ) as the identity map on
Mathlib's own standard Gaussian measure on a finite-dimensional inner product space
(ProbabilityTheory.stdGaussian), and both, together with the goal's own left-hand side, use a
locally-defined finite-marginal expected-supremum convention (ExpSup, EReal-valued) matching
the book's own footnote-3 convention (Section 7.2), reused throughout the series. Both theorems'
right-hand sides presuppose their respective geometric parameter (γ(T) or w(T)) is a
finite real number; since both are EReal-valued in general, each theorem takes an explicit real
witness together with a proof that it equals the true value — the same finiteness-disclosure
pattern 07-chaining's Dudley inequality uses for its own right-hand integral, needed here for
exactly the same reason (the book's own display does not spell out why the quantity is finite,
true whenever T is bounded, as in every application). C (and, in the milestone, the same C
again — the two are not asserted equal, matching that the book states them as two separate
"absolute constants") is existentially quantified before every type, instance and hypothesis it is
uniform over. The M∗ bound milestone (m_star_bound) additionally carries the hypothesis
m>0: its conclusion divides by m, and without this hypothesis Lean's real-division
convention (x/0=0) makes the right-hand side 0 at m=0 regardless of C,K,w(T) — false
whenever T has positive diameter, not merely a weaker or vacuous claim. The book's own proof
("Dividing by m yields …", p. 241) already implicitly assumes m≥1, matching every
other use of m in the chapter as a positive count of measurement rows.
A trivializing formalization would fix T to be a finite set, collapsing the goal to the
elementary union-bound case the book explicitly contrasts its own more general statement against
(Section 9.1's opening paragraph: "we may choose an arbitrary subset T⊆Rn"); this
mission's goal quantifies over an arbitrary Set (EuclideanSpace ℝ (Fin n)) to rule that out.
This mission covers Theorem 9.1.1 and Theorem 9.4.2 only; Theorem 9.4.7 (the Escape theorem) and
Theorem 9.2.4 (covariance estimation for lower-dimensional distributions), both named as candidate
milestones, are left out for lack of session time given the substantial shared infrastructure this
chapter needed from scratch. ExpSup, IsIsotropic, SubgaussianVectorNorm, GaussianWidth and
GaussianComplexity are reusable by any later chapter needing an isotropic or sub-gaussian random
vector, or a Gaussian-width-type quantity (Chapters 4, 10, 11 of this same book series all use one
or more of these notions). Solvers' contributions are welcome on: Theorem 9.1.3 (the sub-gaussian
increments of the deviation process, the technical heart of the goal's proof), Talagrand's
comparison inequality itself (outside this mission, in 07-chaining's companion chapter), and the
one-paragraph reduction from the goal to the M∗ bound.
Selected references
S. Mendelson, A. Pajor, N. Tomczak-Jaegermann, Reconstruction and subgaussian operators in
asymptotic geometric analysis, Geometric and Functional Analysis 17 (2007), 1248–1282.
https://doi.org/10.1007/s00039-007-0618-7
V. D. Milman, A new proof of A. Dvoretzky's theorem on cross-sections of convex bodies,
Funkcional. Anal. i Priložen. 5 (1971), 28–37.
R. Vershynin, High-Dimensional Probability: An Introduction with Applications in Data
Science, Cambridge University Press, 2018, Chapter 9. https://doi.org/10.1017/9781108231596
Stochastic Orders VI: The Multivariate Stochastic OrderTextbook
From "larger" to "larger in every direction"
Chapter I's usual stochastic order compares two real-valued random variables by "how large" they
tend to be. Chapter VI lifts the same idea to random vectors: X is smaller than Y in the
usual multivariate stochastic order if X is less likely than Y to land in any upper set of
Rn — any region defined by "at least this large in every coordinate." This mission
formalizes that order and its two founding characterizations: a coupling theorem (the direct
n-dimensional generalization of Chapter I's own coupling theorem) and a common-source
representation, plus two closure properties that make the order usable in practice.
The usual multivariate stochastic order
Let X be a random vector taking values in Rn on a probability space (Ω,μ),
and let Y be a random vector taking values in Rn on a (possibly different)
probability space (Ω′,ν). X is smaller than Y in the usual multivariate stochastic
order, written X≤stY, if
P{X∈U}≤P{Y∈U}for every upper set U⊆Rn,
where an upper set is one closed upward under the coordinatewise partial order on Rn
(x≤y iff xi≤yi for every i). Equivalently, X≤stY iff E[φ(X)]≤E[φ(Y)] for every increasing φ:Rn→R (increasing with respect
to that same coordinatewise order) for which the two expectations exist — the form this mission
drafts as the definition, exactly parallel to the univariate order's own equivalent form.
Formalization targets
Goal: the coupling characterization (Theorem 6.B.1)
X≤stY⟺∃(Ω′′,ρ),X^,Y^:Ω′′→Rn with X^=stX,Y^=stY,P{X^≤Y^}=1.
This is the direct n-dimensional generalization of Chunk 01's Theorem 1.A.1: a joint law on the
random vectors' shared space realizing X≤stY as an almost-sure coordinatewise inequality
between copies. The book does not give this direction's proof here (an explicit construction
appears later, in a special case irrelevant to a statements-only mission), and the claim is
exactly as citable either way.
Supporting milestones
Theorem 6.B.2, the common-source restatement: X≤stY iff there is a real-valued random
variable Z and Rn-valued functions ψ1≤ψ2 (coordinatewise, at every
z∈R) with X=stψ1(Z), Y=stψ2(Z) — the multivariate analogue of
Theorem 1.A.2, an immediate restatement of the goal.
Theorem 6.B.16(b), closure under conjunctions: independent Xi≤stYi (i=1,…,m)
give ψ(X1,…,Xm)≤stψ(Y1,…,Ym) for any increasing
ψ:Rk→R — note the codomain R, so this closure conclusion is
itself the univariate order applied to vector-valued inputs. Specializing ψ to a
coordinatewise sum gives closure under convolutions.
Theorem 6.B.16(c), closure under marginalization: X≤stY implies XI≤stYI for
every sub-index set I⊆{1,…,n} — a special case of part (b), included separately
for its own simple, widely-used content.
Significance
The usual multivariate stochastic order is the natural tool for comparing random vectors — costs,
resource-usage profiles, portfolio returns — that must be ranked simultaneously across several
coordinates rather than reduced to a single scalar summary first. It underlies simulation
comparisons (via the coupling and common-source characterizations, both constructive), reliability
comparisons of multi-component systems (whose component lifetimes are naturally vector-valued),
and comparative-statics arguments in queueing and inventory models with several state variables.
The closure properties are what make the order compositional: conjunction closure says a
vector-by-vector comparison of independent inputs survives any coordinatewise-increasing
post-processing, and marginalization closure says a joint comparison restricts consistently to
any sub-collection of coordinates — together they are the two properties an analyst reaches for
first when reducing a multivariate comparison to a more tractable one.
No platform prior art exists: GET /theorems?q=stochastic+order and q=coupling return zero
genuine hits (checked at this book's triage time, re-confirmed this session). This mission
restates the usual multivariate stochastic order and its two founding theorems as a
self-contained foundation, in the same spirit as Chunk 01's univariate mission but independently
drafted, since drafts cannot import each other's Lean.
Difficulty
The chief formalization risk this chapter's own brief flags is conflating "increasing" for
φ:Rn→R with some order other than the coordinatewise one (a total
order via a fixed embedding, or a lexicographic order): the book's order on Rn is
always the componentwise partial order, and Mathlib gives Fin n → ℝ exactly that order by
default (its Pi/product order), so Monotone φ for φ : (Fin n → ℝ) → ℝ already means what the
book means with no extra predicate to get wrong — but it would be easy to instead encode
ℝ^n-valued objects some other way (e.g. a fixed linear functional into ℝ) that silently swaps
in a different, weaker order. The second risk is Theorem 6.B.16(b)'s literal codomain: the book
states ψ:Rk→R (scalar), so the closure conclusion is a genuinely
univariate stochastic-order statement about ψ applied to vector inputs, not a
vector-to-vector closure (that is part (a), not drafted here) — stating it as a multivariate
conclusion by mistake would silently strengthen a theorem the book does not claim.
Formalization scope
Random vectors are drafted as functions into Fin n → ℝ from arbitrary measurable spaces, which
inherit Mathlib's default coordinatewise (Pi) order — the same order the book uses throughout
this chapter, requiring no separate order predicate. MultivariateOrder μ ν X Y quantifies over
φ : (Fin n → ℝ) → ℝ with Monotone φ in that order and Integrable (φ ∘ X) μ/Integrable (φ ∘ Y) ν stated inside the ∀, exactly matching "for which the expectations exist." Equality in
law is ProbabilityTheory.IdentDistrib. Theorem 6.B.2's random variable Z is drafted as
R-valued specifically (not an arbitrary-type common source), matching the book's own
"for all z∈R" quantification exactly.
Theorem 6.B.16(b) is drafted for a common dimension n across all Xi,Yi rather than the
book's per-i dimension ki: the concatenated input then lives in Fin m → Fin n → ℝ (nested
Pi types, carrying the coordinatewise order on Rmn exactly as needed), avoiding a
dependent-sum concatenation of vectors of genuinely different lengths that a mission of this size
does not justify. This is the "closed under convolutions" special case the book itself names as a
corollary of the general statement, not a different claim — but it is a genuine restriction of
scope, recorded here rather than silently applied, and the general varying-dimension statement is
left for a future pass (see STATUS.md). The theorem's conclusion is stated as the univariate
order's own defining inequality on ℝ (∀ x, μ {ω | x < ψ(X_∙ ω)} ≤ ν {ω | x < ψ(Y_∙ ω)}),
restated locally rather than importing Chunk 01's UsualOrder, since drafts cannot import
another mission's definitions. Theorem 6.B.16(c)'s sub-index set I⊆{1,…,n} of size
k is encoded as an injective reindexing r : Fin k → Fin n, with XI,YI drafted as X, Y
precomposed coordinatewise with r, matching the book's own subvector notation (6.A.1) exactly.
A trivializing formalization this mission rules out: drafting MultivariateOrder with an
order on Fin n → ℝ other than the coordinatewise one (for instance, a fixed linear functional
collapsing the vector to a scalar and reusing the univariate order), which would silently state a
different, generally weaker order under the same name; and drafting Theorem 6.B.16(b)'s conclusion
with a vector-valued (rather than the book's literal scalar-valued) ψ, which would silently
strengthen a theorem the book states only for real-valued ψ. This mission draws on no
platform prior art (searches for "stochastic order" and "coupling" as of 2026-09-18 return zero
genuine matches). Reusable beyond this mission: the MultivariateOrder definition pattern and its
coupling/common-source characterization parallel Chunk 01's univariate pair closely enough that a
future chapter needing a multivariate order's own coupling theorem (Chapter VII's multivariate
convex order is the direct next instance in this series) could restate the same shape with minimal
adaptation.
Selected references
M. Shaked and J. G. Shanthikumar, Stochastic Orders, Springer Series in Statistics, Springer,
2007, Chapter 6 (Multivariate Stochastic Orders), §6.A–6.B.
https://doi.org/10.1007/978-0-387-34675-5
This series' Chunk 01 (StochasticOrders.Usual), for the univariate usual stochastic order and
its coupling/common-source characterizations this chapter directly generalizes.
High-Dimensional Probability VIII: Dudley's Integral InequalityTextbook
Motivation
Many questions in high-dimensional probability reduce to bounding the expected supremum of a
random process (Xt)t∈T — the maximum, over an entire indexed family of random variables,
of how large any one of them can get. When T is finite this is routine (a union bound over
∣T∣ terms suffices), but the interesting cases have T infinite, even uncountable: a supremum
over a continuum of test functions, a norm expressed as a supremum over a sphere, or an empirical
process indexed by a whole class of functions. A naive union bound is unusable here, since ∣T∣
is infinite.
R. M. Dudley's 1967 entropy bound (R. M. Dudley, The sizes of compact subsets of Hilbert space
and continuity of Gaussian processes, Journal of Functional Analysis 1 (1967), 290–330) resolved
this for Gaussian processes, controlling the expected supremum purely in terms of the metric
entropy of T — how many balls of radius ε are needed to cover T, at every scale
ε. The technique behind the proof, chaining, builds a sequence of increasingly
fine finite approximations to T and telescopes the resulting bounds; it is one of the central
tools of the field, reused throughout empirical process theory, statistical learning theory (via
Vapnik-Chervonenkis theory), and non-asymptotic random matrix theory. This mission formalizes the
chapter's generalization of Dudley's bound beyond Gaussian processes, to any process with
sub-gaussian increments, together with the purely combinatorial Sauer-Shelah lemma that the
chapter's applications to statistical learning theory build on.
Setting
Fix a probability space (Ω,F,P). A random process is a family
(Xt)t∈T of real random variables on (Ω,F,P) indexed by an arbitrary set
T, with no independence or measurability-of-the-supremum assumed between different t's. Since
supt∈TXt(ω) need not be measurable in ω for a general index set T, its
expectation is understood — following the book's own convention, set once in Chapter 7 and reused
throughout — through the process's finite-dimensional marginals:
Now fix a metric d on T, making (T,d) a metric space. The covering numberN(T,d,ε), for ε>0, is the smallest cardinality of a finite
ε-net of T: a finite set N⊆T such that every point of T lies within
distance ε of some point of N (or N(T,d,ε):=∞ if no finite
ε-net exists). The quantity logN(T,d,ε) is the metric entropy of T
at scale ε: it measures how large T looks when resolved only down to scale
ε.
A process (Xt)t∈T has sub-gaussian increments with parameter K≥0 if
∥Xt−Xs∥ψ2≤Kd(t,s)for all t,s∈T,
where ∥⋅∥ψ2 is the sub-gaussian (Orlicz) norm of Chapter 2: the smallest u>0 with
Eexp((Xt−Xs)2/u2)≤2. This says the increments of the process are controlled by
the metric d the way a Gaussian process's increments are controlled by its own canonical metric
d(t,s):=∥Xt−Xs∥L2 — but without assuming (Xt)t∈T is Gaussian.
A class of Boolean functions F on a set Ωshatters a subset Λ⊆Ω
if every function g:Λ→{0,1} arises as the restriction to Λ of some f∈F.
The VC (Vapnik-Chervonenkis) dimensionvc(F) is the largest cardinality of a subset
of Ω shattered by F (or ∞ if arbitrarily large finite subsets, or an infinite one,
are shattered) — a purely combinatorial measure of how rich the class F is.
Formalization targets
Goal (Theorem 8.1.3, Dudley's integral inequality)
∃C>0:Et∈TsupXt≤CK∫0∞logN(T,d,ε)dε
for every mean-zero random process (Xt)t∈T on a metric space (T,d) with sub-gaussian
increments parameter K≥0, whenever the integral is finite. C is the book's own unnamed
absolute constant, never depending on T, K, or the process. This is the weakest stable form of
the claim: no numeral is hard-coded for C, and the statement asks only for the shape of the
bound, matching what the book actually proves.
Milestone (Theorem 8.3.16, Sauer-Shelah lemma)
∣F∣≤k=0∑d(kn)≤(den)d,d:=vc(F),
for every class F of Boolean functions on a finite n-point set Ω. This is a purely
combinatorial fact, with no probability involved, but it is the bridge (via the covering-number
bound Theorem 8.3.18, outside this mission's scope) between the chapter's Dudley-inequality engine
and its statistical-learning applications — a bound on how large a finite class of Boolean
functions can be, in terms of a single combinatorial complexity parameter.
Significance
Dudley's inequality is, in the book's own words, "the main result" of the chaining chapter: it
converts a purely geometric quantity — the metric entropy of an index set, computable in many
cases from covering-number estimates already available for balls, ellipsoids, and other convex
bodies — into a probabilistic control on the size of a random process indexed by that set. This
is what lets later chapters (uniform laws of large numbers over function classes, the matrix
deviation inequality, the Dvoretzky-Milman theorem on almost-spherical sections of convex bodies)
bound suprema over infinite, even uncountable, index sets without ever performing a union bound.
The bound is also known to be tight only up to a logarithmic factor in general — Sudakov's
minoration inequality (Chapter 7) gives a matching lower bound for Gaussian processes, and the
book's own Exercise 8.1.12 exhibits a set where the two bounds genuinely diverge — so the constant
C here cannot in general be sharpened away.
The Sauer-Shelah lemma is one of the two founding results of VC theory (together with the
Glivenko-Cantelli-type uniform convergence it feeds into), independently discovered by Vapnik and
Chervonenkis, Sauer, and Shelah in the early 1970s; it underlies the sample-complexity bounds of
statistical learning theory (a hypothesis class with finite VC dimension is PAC-learnable) and,
through Theorem 8.3.18, gives one of the two standard routes (the other being direct combinatorial
counting) to bounding covering numbers of infinite function classes.
Both results are decades old and have long-established, standard proofs; no open mathematical
question is being formalized. What this mission contributes is the machine-checked statement
infrastructure — the goal and the Sauer-Shelah milestone, together with the definitions
(CoveringNumber, ProcessESup, Shatters, VcDim) a faithful Lean rendering of either result
needs — for a solver to close with a proof. No formalization of Dudley's inequality or the
Sauer-Shelah lemma is known to exist on the platform prior to this mission.
Difficulty
The natural first idea for bounding Esupt∈TXt is a single-scale ε-net
argument: replace T by a finite ε-net, bound the maximum over the (finite) net by a
union bound using the sub-gaussian tail, and separately bound the error of replacing T by the
net using the Lipschitz-in-probability control the sub-gaussian-increments hypothesis gives. This
works, but it only ever sees T at one fixed resolution ε, and optimizing over
ε afterward gives a bound with an extra log(1/ε)-type loss that
does not match Dudley's inequality. The actual difficulty is genuinely multi-scale: chaining
builds a whole sequence of nets at dyadic scales ε=2−k simultaneously, connects
each point of T to its nearest net point at every scale to form a "chain" of successive
approximations back to a single fixed basepoint, and telescopes the resulting sum of increments —
turning Xt itself into a sum of differences between successive links of the chain, each
individually well controlled by the sub-gaussian hypothesis at its own scale. Passing from the
resulting discrete sum over dyadic scales (Theorem 8.1.4) to the continuous integral of the goal
is a further, separate technical step.
For the Sauer-Shelah lemma, the natural first idea — bound ∣F∣ directly by counting — has no
obvious purchase on an arbitrary class of Boolean functions. The actual argument goes through
Pajor's lemma, which reduces bounding ∣F∣ to counting the shattered subsets of Ω instead
of the functions in F themselves; only then does the cardinality bound d=vc(F) on
shattered sets become directly usable, via a binomial-sum estimate.
Formalization scope
CoveringNumber T ε is ℕ∞-valued (ℕ∞ = WithTop ℕ), defined as the infimum, over the subtype
of finite ε-nets of the whole type T (an instance of MetricSpace T), of their
cardinality; the infimum of the empty family in this complete lattice is ⊤, reproducing "N:=∞ if no finite net exists" with no case split. ProcessESup is EReal-valued, defined as
the supremum over finite nonempty T0⊆T of the Bochner integral of the finite max —
EReal, not ℝ, because a real-valued supremum would silently return the junk value 0 if the
family of marginal expectations were unbounded above. Shatters and VcDim are direct
transcriptions of Definition 8.3.1, with VcDim valued in ℕ∞ via a supremum of Set.encard
over the (always-nonempty, since ∅ is trivially shattered) subtype of shattered
subsets. The goal's mean-zero hypothesis is stated as Integrable (X t) P ∧ ∫ X t = 0 rather than
the bare equation, since a non-integrable variable's Bochner integral is 0 in Mathlib by
convention regardless of its true mean — a bare-equation hypothesis would let a non-mean-zero,
non-integrable process satisfy the theorem vacuously. Two further hypotheses make explicit what
the book's own displayed statement treats as understood without spelling out: that
N(T,d,ε) is finite for every ε>0 (total boundedness of T), and that the
resulting integrand is integrable on (0,∞) — both hold whenever T is totally bounded,
since the integrand vanishes once ε≥diam(T), so neither hypothesis excludes
any case the book's own proof does not also need. [Nonempty T] excludes the degenerate empty
index set. The absolute constant C is existentially quantified ahead of every type, instance,
and hypothesis it is uniform over, and pinned to no numeral, matching "C is an absolute
constant" — a formalization hard-coding a specific numeral for C would be invalidated by the
next sharper constant in the literature and would not match what the book proves.
A trivializing formalization of the Sauer-Shelah lemma would fix vc(F) at a hard-coded
small value, or drop the second (exponential) inequality in favor of the weaker first one; this
mission's statement keeps both inequalities, with d genuinely computed from VcDim, and handles
the d=0 boundary (where the exponential bound's base involves a division by zero under Lean's
x/0=0 convention) explicitly rather than excluding it, since x^0=1 still recovers the book's
correct bound ∣F∣≤1 there.
This mission covers Theorem 8.1.3 and Theorem 8.3.16 only; Theorem 8.3.18 (covering numbers via VC
dimension) and Theorem 8.2.3 (the uniform law of large numbers, the chapter's direct application
of Dudley's inequality) are left out, not approximated, for lack of the additional empirical-
process measurability machinery — the class of Lipschitz functions of Eq. (8.22), measurability of
the resulting empirical process — that a faithful statement of either would need beyond what this
mission's items already provide. CoveringNumber and ProcessESup are reusable by any later
chapter needing a metric space's covering numbers or a general random process's expected
supremum (this book's own Chapters 7, 9, and 11 all use one or both); Shatters and VcDim are
reusable by any later development of VC theory or statistical learning theory. Solvers'
contributions are welcome on: the chaining argument itself (the mission's hardest open leaf, via
the discrete dyadic form of Theorem 8.1.4), Pajor's lemma underlying Sauer-Shelah, and the
binomial-sum estimate closing its second inequality.
Selected references
R. M. Dudley, The sizes of compact subsets of Hilbert space and continuity of Gaussian
processes, Journal of Functional Analysis 1 (1967), 290–330.
https://doi.org/10.1016/0022-1236(67)90017-1
V. N. Vapnik, A. Ya. Chervonenkis, On the uniform convergence of relative frequencies of events
to their probabilities, Theory of Probability & Its Applications 16 (1971), 264–280.
https://doi.org/10.1137/1116025
R. Vershynin, High-Dimensional Probability: An Introduction with Applications in Data
Science, Cambridge University Press, 2018, Chapter 8. https://doi.org/10.1017/9781108231596
Stochastic Orders IV: The Increasing Convex and Increasing Concave OrdersTextbook
Comparing location and spread together
Chapter I's usual stochastic order compares "how large" two random variables tend to be; Chapter
III's convex order compares "how spread out" they are, holding the mean fixed. Chapter IV's
increasing convex and increasing concave orders combine the two: X≤icxY says X
is both smaller and less variable than Y in a single comparison, without forcing equal means.
These are the orders a decision-maker with risk-averse (concave-utility) or risk-loving
(convex-cost) preferences actually uses to rank random outcomes, since expected utility is exactly
an expectation of an increasing concave or convex function. This mission formalizes both orders
and their coupling characterization: the submartingale/supermartingale analogue, one chapter over,
of Chapter III's Strassen martingale coupling for the plain convex order.
The increasing convex and increasing concave orders
Let X be a real-valued random variable on a probability space (Ω,μ), and let Y be a
real-valued random variable on a (possibly different) probability space (Ω′,ν). X is
smaller than Y in the increasing convex order, written X≤icxY, if
E[φ(X)]≤E[φ(Y)]for every increasing convex φ:R→R for which the two expectations exist,
and smaller than Y in the increasing concave order, X≤icvY, if the same holds for
every increasing concaveφ. Taking φ(x)=x (increasing and both convex and
concave) gives E[X]≤E[Y] under either order — unlike the convex order, no equality of means
is forced. Two equivalent tail-integral characterizations (Theorem 4.A.2) make the orders
tractable: X≤icxY iff ∫x∞Fˉ(u)du≤∫x∞Gˉ(u)du for
every x, and X≤icvY iff ∫−∞xF(u)du≥∫−∞xG(u)du for
every x, where Fˉ,Gˉ and F,G are the survival and distribution functions.
Formalization targets
Goal: the submartingale-coupling characterization (Theorem 4.A.5, increasing convex case)
X≤icxY⟺∃(Ω′′,ρ),X^,Y^:Ω′′→R with X^=stX,Y^=stY,E[Y^∣X^]≥X^ a.s.
Furthermore, X^,Y^ can be chosen so that [Y^∣X^=x] stochastically
increases with x (in ≤st). This is the increasing-convex analogue of Chapter III's
Theorem 3.A.4: instead of a martingale, {X^,Y^} need only be a submartingale — the
copy of Y is, conditionally on the copy of X, at least a fair randomization of it. The book
states its proof is "similar to the proof of Theorem 3.A.4" and calls the constructive direction
"not easy to prove"; this mission states the theorem faithfully, including the "Furthermore"
strengthening, without attempting a proof.
Companion: the supermartingale-coupling characterization (Theorem 4.A.5, increasing concave case)
The same theorem's other bracketed case: X≤icvY iff there exist X^,Y^ on a
common space with X^=stX, Y^=stY, and {Y^,X^} a supermartingale,
E[X^∣Y^]≤Y^ a.s. — note the swapped roles of X^ and Y^ in the
conditioning relative to the increasing-convex case, not merely a flipped inequality. Drafted as
a separate Lean theorem from the goal (see Formalization scope), since the two conditioning
structures are genuinely different predicates, not sign-flipped rewrites of one another.
Supporting milestones
Theorem 4.A.1, the duality relation: X≤icxY⟺−X≥icv−Y, and
X≤icvY⟺−X≥icx−Y — the increasing-order analogue of Theorem 3.A.12(a)'s duality
for the plain convex order.
Theorem 4.A.2, the tail-integral characterizations above, for integrable X,Y.
Theorem 4.A.8(d), closure under convolution: independent Xi≤icxYi (resp.
≤icv) for i=1,…,m gives ∑iXi≤icx∑iYi (resp. ≤icv) — the
increasing-order analogue of Chapter III's Theorem 3.A.12(d), which the book itself says "can be
proven as in Theorem 3.A.12."
Significance
The increasing convex and concave orders are the natural language of expected-utility comparisons:
a risk-averse agent with concave utility u prefers Y to X exactly when X≤icvY implies
E[u(X)]≤E[u(Y)] for every increasing concave u — the order is defined precisely so that
"every risk-averse agent with increasing utility agrees" collapses to one comparison. In
operations research this underlies stochastic dominance of the second kind in portfolio and
inventory models, and the increasing-convex order similarly formalizes "second-order stochastic
dominance for costs" used to compare random cost/loss distributions under risk-loving or
regret-averse preferences. The submartingale-coupling characterization is what turns the
intractable "for every increasing convex φ" quantifier into a single explicit
construction, exactly as Strassen's theorem does for the plain convex order — and, being the
direct chapter-IV successor to Chapter III's coupling theorem in this series, it fixes the second
data point for what a "coupling-characterization" mission in this book's series looks like when
the order being characterized is not symmetric between the two variables' roles.
No platform prior art exists: GET /theorems?q=increasing+convex, q=increasing+concave, and
q=submartingale return zero genuinely matching hits (the one submartingale hit, a bandit
subgaussian maximal inequality, uses Doob's inequality for a concentration bound, not this
order). This mission restates the increasing convex/concave orders and their coupling
characterization as a foundational, self-contained pair of definitions, parallel in structure to
Chunk 03's convex-order mission but independently drafted (drafts cannot import each other's Lean).
Difficulty
The chief formalization risk is the one this chapter's own brief flags explicitly: the book states
Theorem 4.A.5 as a single statement with bracketed alternatives ("X≤icxY [X≤icvY] iff
… {X^,Y^} is a submartingale [{Y^,X^} is a supermartingale] …"), and the
two cases are not symmetric rewrites of each other — the conditioning variable in
E[Ŷ|X̂]≥X̂ swaps to E[X̂|Ŷ]≤Ŷ in the concave case, not just a flipped inequality on the same
conditioning. A Lean statement that tried to unify both cases with a single Or or a naive
sign-flip would either conflate two different predicates or silently state the wrong condition for
one of the two cases. The duality theorem (4.A.1) compounds this risk in the other direction: its
content is exactly that ≤icx and ≥icvare related (by negating the variables), so a
formalization that makes this equivalence provable by unfolding definitions (rather than as a
genuine ↔ between two independently-stated predicates) would trivialize the one theorem whose
entire content is that relationship.
Formalization scope
Random variables are measurable functions into R from arbitrary measurable spaces,
matching this series' convention; IcxOrder μ ν X Y and IcvOrder μ ν X Y are drafted as two
separate definitions (not one order parametrized by an Or of function classes), each
quantifying over Monotone φ ∧ ConvexOn ℝ Set.univ φ (resp. ConcaveOn) with the two
expectations' existence stated as explicit Integrable hypotheses inside the ∀, exactly as
Chunk 03's ConvexOrder. Equality in law is ProbabilityTheory.IdentDistrib. The goal's
submartingale condition uses Mathlib's conditional-expectation notation X̂ ≤ᵐ[ρ] ρ[Ŷ | m] with
m the σ-algebra generated by X̂; its companion's supermartingale condition uses ρ[X̂ | m'] ≤ᵐ[ρ] Ŷ with m' generated by Ŷ instead — the conditioning variable is genuinely swapped between the
two theorems, matching the book's own bracket ordering {X̂,Ŷ} vs. {Ŷ,X̂}. The "Furthermore"
clause in both is kept (not dropped), via Mathlib's ProbabilityTheory.condDistrib, restated as
the relevant conditional-distribution kernel's survival function being monotone at every
threshold — the same shape Chapter I's UsualOrder and Chunk 03's goal theorem use, necessarily
restated locally since drafts cannot import another mission's definitions.
Theorem 4.A.1 (duality) and Theorem 4.A.8(d) (convolution closure) are each drafted as a single
Lean theorem with two independent conjuncts (an ∧ of two ↔s, or of two implications), one per
bracketed case, since the book states both cases as the two halves of one theorem sharing every
hypothesis — this is not the same shape as the goal/companion split, where the two cases have
genuinely different internal structure (the swapped conditioning) rather than a shared statement
instantiated at two function classes. A trivializing formalization this mission rules out:
stating Theorem 4.A.1's duality by relabeling IcvOrder as IcxOrder applied to negated
arguments (making the equivalence a rfl or single simp unfolding) rather than keeping the two
orders as independently-defined predicates whose relationship is the theorem's actual content.
This mission draws on no platform prior art (searches for "increasing convex", "increasing
concave", and "submartingale" as of 2026-09-18 return zero genuine matches — the sole
submartingale hit is an unrelated bandit concentration inequality via Doob's inequality). Reusable
beyond this mission: the IcxOrder/IcvOrder definition pattern and the
submartingale/supermartingale coupling shape parallel Chunk 03's ConvexOrder
martingale-coupling pattern closely enough that a future chapter needing "coupling
characterization of a location-and-spread order" (none of the remaining chapters currently in
this series' first wave) could restate the same shape with minimal adaptation.
Selected references
M. Shaked and J. G. Shanthikumar, Stochastic Orders, Springer Series in Statistics, Springer,
2007, Chapter 4 (Univariate Monotone Convex and Related Orders), §4.A.
https://doi.org/10.1007/978-0-387-34675-5
This series' Chunk 03 (StochasticOrders.Convex), for the plain convex order and Strassen's
martingale coupling this chapter's submartingale/supermartingale coupling directly generalizes.
Foundations of Machine Learning IV: Support Vector Machines and the Margin BoundTextbook
Motivation
Support vector machines were, for two decades, the workhorse of applied classification, and
the reason offered for their success was always geometric: SVMs maximize the margin between
the two classes. Chapter 3's VC-dimension bound cannot explain why this should help — for
linear hypotheses in RN its bound depends on N+1 and is uninformative whenever the
feature dimension is large relative to the sample size, exactly the regime (kernel-induced or
high-dimensional features) where SVMs are most often used. Chapter 5 answers the question this
leaves open: a generalization bound for a real-valued hypothesis, stated in terms of its
margin on the training sample, that does not depend on the ambient dimension at all. This is
also the template every later chapter's margin bound specializes (multi-class classification,
ranking, and, indirectly, boosting all reuse the same Rademacher-complexity-of-a-Lipschitz-loss
argument developed here).
Setting
A hypothesis here is a real-valued function h:X→R, not (as in Chapters 2-3) a
function into {−1,+1}: for a labeled point (x,y) with y∈{−1,+1}, the sign of h(x)
gives the prediction and ∣h(x)∣ is read as the classifier's confidence. The confidence
margin of h at (x,y) is yh(x); it is positive exactly when h classifies x
correctly. For ρ>0, the ρ-margin lossΦρ:R→R
(Definition 5.5) is
Φρ(x)=min(1,max(0,1−ρx)),
equal to 1 when x≤0 (misclassified), 0 when x≥ρ (classified with confidence at
least ρ), and interpolating linearly in between; it is 1/ρ-Lipschitz. The
empirical margin loss on a sample S=(x1,…,xm) with labels y1,…,ym
(Definition 5.6) is R^S,ρ(h)=m1∑i=1mΦρ(yih(xi)) — the
fraction of training points misclassified or classified with confidence below ρ, a
strictly stronger requirement than plain misclassification. The (population) generalization
error is R(h)=Pr(x,y)∼D[yh(x)≤0]. Rademacher complexity, R^S(H) and
Rm(H) (Definitions 3.1-3.2, restated here since chunk 03-rademacher-vc's own copies are
still drafts), measure how well a real-valued hypothesis class H correlates with random sign
noise on a sample, and are the vehicle through which the margin bound's complexity term is
expressed.
Formalization targets
Lemma 5.7 (Talagrand's lemma, milestone). For l-Lipschitz Φ1,…,Φm:R→R and any hypothesis set H of real-valued functions,
m1Eσ[h∈Hsupi=1∑mσi(Φi∘h)(xi)]≤lR^S(H).
Theorem 5.10 (Rademacher complexity of bounded-norm linear hypotheses, milestone). For
S⊆{x:∥x∥≤r} and H={x↦w⋅x:∥w∥≤Λ},
R^S(H)≤r2Λ2/m.
Corollary 5.11 (margin bound for linear hypotheses, milestone). For the same H and
X⊆{x:∥x∥≤r}, fixing ρ>0, with probability at least 1−δ,
R(h)≤R^S,ρ(h)+2mr2Λ2/ρ2+2mlog(1/δ)for all h∈H.
Theorem 5.8 — the mission's goal. For any set H of real-valued functions and ρ>0,
with probability at least 1−δ, both
Theorem 5.8 is genuinely dimension-free: unlike Chapter 3's VC-dimension bound (5.36 in the
book, restated from Corollary 3.19), it holds regardless of the ambient feature dimension N,
depending instead only on the hypothesis class's Rademacher complexity and the chosen margin
ρ. Specialized to bounded-norm linear hypotheses (Corollary 5.11), this gives the
theoretical justification most often cited for SVMs and every other margin-maximization
algorithm: whenever the training data admits a large geometric margin, the empirical margin
loss at that margin is small (often zero, in the separable case) and the bound is tight
regardless of N. Every later chapter's own margin bound (multi-class in Chapter 9, ranking in
Chapter 10) is a direct structural descendant of Theorem 5.8's proof technique. No prior art on
the Prove2Me platform is faithful: GET /theorems?q=support+vector+machine and q=margin+bound
return no hits on this book's model (the two q=margin+bound hits found, both from the Aether
Catalog, state a different comparison — a VC-type bound is eventually worse than a fixed
Rademacher-type bound as a function of dimension — not Theorem 5.8 itself); q=Talagrand and
q=contraction+principle return several hits (Ledoux/Talagrand convex-distance concentration,
Rudin's Banach-space contraction-mapping theorem, a generic Rademacher-sign contraction lemma
for quadratic sums) but every one states either a different mathematical object (metric-space
fixed points, Talagrand's concentration inequality on product spaces) or a different idiom
(squared vs. linear coordinate sums) from Lemma 5.7's function-composition contraction — none
reused. All nine items are drafted fresh.
Not formalized here: Theorem 5.4 (the SVM sparsity/leave-one-out bound). It is listed as a
candidate milestone in BRIEF.md, but its statement and proof depend on the primal/dual SVM
optimization problem itself (the Lagrangian, KKT conditions, and the resulting definition of a
"support vector" as a training point with nonzero dual coefficient) — a materially different,
non-margin-based proof technique (leave-one-out stability of the trained hypothesis, via Lemma
5.3) that shares no definitions with the margin-bound family this mission's goal and other
milestones are built on. Formalizing it faithfully would require standing up the SVM primal/dual
formalism (Lagrangian, complementary slackness, the "support vector" predicate itself) from
scratch, which is disproportionate to a single additional milestone within this mission's
budget; per the captain brief's guidance to leave out, rather than approximate, a statement that
cannot be made faithful in the time available, it is omitted.
Difficulty
The proof of Theorem 5.8 needs the empirical margin loss's zero-one-loss upper bound
(1u≤0≤Φρ(u)) applied before invoking Theorem 3.3's Rademacher
generalization bound on the composed class H~~={Φρ∘f:f∈H~},
H~={(x,y)↦yh(x):h∈H} — reversing this order (bounding R(h) by a
Rademacher complexity computed on the zero-one loss directly) does not work, because the
zero-one loss is not Lipschitz. Talagrand's lemma is exactly what lets the 1/ρ-Lipschitz
surrogate Φρ be pulled outside the Rademacher complexity, at the cost of a factor
1/ρ and no worse; its own proof is an induction removing one Rademacher variable at a time,
using a two-point supremum argument (fixing ϵ>0, choosing near-optimal h1,h2) that
does not simplify to anything less than genuine care with suprema of non-smooth objects — a
formalization attempting to replace this with a naive linearity-of-expectation argument would be
proving a false or vacuous statement, since sup does not commute with linear combinations.
Theorem 5.10's bound needs the Cauchy-Schwarz and Jensen inequalities used in the particular
order the book uses them (Cauchy-Schwarz on the empirical sup, then Jensen on the expectation of
a norm, then the independence of the σis) — the bound R^S(H)≤rΛ/m
does not follow from either inequality alone.
Formalization scope
EmpiricalRademacherComplexity/RademacherComplexity are restated locally in SVM,
byte-identical to chunk 03-rademacher-vc's own copies (a draft item cannot import another
chunk's draft module); this duplication collapses once 03-rademacher-vc is uploaded and listed
in missions/README.md's "Published definitions" table. MarginGeneralizationError is a new,
real-valued-hypothesis specialization of Definition 2.1 (R(h) = P[y h(x) ≤ 0]), distinct from
every earlier chunk's {-1,+1}-valued GeneralizationError, since no earlier chunk's own copy
matches this chapter's real-valued convention. PhiRho/EmpiricalMarginLoss are new. The goal
theorem (margin_bound_binary_classification) states H's own Rademacher complexity computed
on the marginal X-distribution (D.map Prod.fst), matching the book's final displayed form —
the proof's intermediate step (the lifted class H~={(x,y)↦yh(x)} having the
same Rademacher complexity as H itself, since y∈{−1,+1}) is not separately drafted, only
the theorem's statement. Theorem 5.10/Corollary 5.11 generalize the book's ambient
RN to an arbitrary real inner-product space X ([NormedAddCommGroup X] [InnerProductSpace ℝ X]), a harmless generalization since the book's proof (Cauchy-Schwarz,
Jensen, orthogonality of Rademacher signs) uses only the inner-product structure, never finite
dimension; [BorelSpace X] is added to Corollary 5.11's statement to make the measurable
structure under which MarginGeneralizationError is well-posed explicit, since every
x ↦ ⟨w, x⟩ is automatically Borel-measurable — not a substantive restriction, the book never
discusses measurability of linear functionals. No numerical constant in any of the four
theorems is altered from the book's own displayed form. A trivializing formalization this
mission avoids: stating Theorem 5.8 only for a Finset/finite H (which would make it a
disguised instance of Chapter 2's finite-hypothesis bound rather than the chapter's genuinely
new, complexity-based argument) — H : Set (X → ℝ) is left fully general, exactly as the book
states it.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 5.
C. Cortes, V. Vapnik, "Support-vector networks," Machine Learning 20(3), 1995, 273-297.
M. Talagrand, "Sharper bounds for Gaussian and empirical processes," The Annals of
Probability 22(1), 1994, 28-76.
P. Bartlett, S. Mendelson, "Rademacher and Gaussian complexities: risk bounds and structural
results," Journal of Machine Learning Research 3, 2002, 463-482.
Support Vector Machines II: Uniform Calibration Inequalities Between Target and Surrogate RisksTextbook
Motivation
Chapter 2 of Steinwart & Christmann, Support Vector Machines, showed the hinge loss controls
the classification loss (Zhang's inequality, Theorem 2.31). That result was special to one
target/surrogate pair. Chapter 3 asks the question in general: given any target loss
Ltar (the loss whose risk we actually care about) and any surrogate loss
Lsur (the loss a learning algorithm actually minimizes, chosen for tractability —
convexity, differentiability), when does controlling the excess Lsur-risk control
the excess Ltar-risk? The book's answer factors the question through a purely
pointwise object, the calibration function, that depends only on the two losses and a single
label distribution — not on the learning problem's ambient space X or the unknown
data-generating distribution P at all.
Setting
Fix a measurable space X and a closed label set Y⊂R. For a loss L:X×Y×R→[0,∞), a distribution Q on Y, and x∈X, the inner
L-risk is CL,Q,x(t):=∫YL(x,y,t)dQ(y) and the minimal inner risk is
CL,Q,x∗:=inftCL,Q,x(t) (Definition 3.3). Eq. (3.5) rewrites the ordinary L-risk of
f against a full distribution P on X×Y as RL,P(f)=∫XCL,P(⋅∣x),x(f(x))dPX(x): the outer risk is an average of inner risks over the
X-marginal, one inner risk per conditional distribution P(⋅∣x). The set of
ε-approximate minimizers is ML,Q,x(ε):={t:CL,Q,x(t)<CL,Q,x∗+ε} (Definition 3.5).
The calibration functionδmax(ε,Q,x) of a pair (Ltar,Lsur) (Definition 3.13) is the largest δ such that every δ-approximate
surrogate minimizer is already an ε-approximate target minimizer: δmax(ε,Q,x):=inf{CLsur,Q,x(t)−CLsur,Q,x∗:t∈/MLtar,Q,x(ε)} when CLsur,Q,x∗<∞, and ∞
otherwise. Lsur is Ltar-calibrated with respect to a set
Q of label distributions if δmax(ε,Q,x)>0 for every
ε∈(0,∞], Q∈Q, x — one δmax working uniformly over
the whole class Q, not just a single fixed distribution.
Lsur is Ltar-calibrated w.r.t. Q⟺∀ε∈(0,∞],∀P of type Q with RLsur,P∗<∞,∃δ∈(0,∞],∀f,RLsur,P(f)<RLsur,P∗+δ⟹RLtar,P(f)<RLtar,P∗+ε
when Ltar is bounded. This is the mission's capstone: a purely pointwise,
P-independent condition (calibration) is shown equivalent to a whole-class-of-distributions
statistical guarantee, not merely necessary for it.
Milestones (attack order)
Lemma 3.4 — the Bayes risk is the integral of the minimal inner risks: RL,P∗=∫XCL,P(⋅∣x),x∗dPX(x), and x↦CL,P(⋅∣x),x∗ is
measurable. Foundational: it is what makes minimizing risk pointwise, one conditional
distribution at a time, a valid strategy at all.
Lemma 3.11 — for ε∈(0,∞], CL,P(⋅∣x),x∗<∞ for
PX-a.a. x iff a measurable ε-approximate minimizer selection f exists.
Directly invoked in Theorem 3.17's own proof.
Lemma 3.14 — the calibration function traps the surrogate's δmax(ε)
-approximate minimizers inside the target's ε-approximate minimizers (and no
larger δ does), plus the pointwise inequality Eq. (3.16),
δmax(CLtar,Q,x(t)−CLtar,Q,x∗,Q,x)≤CLsur,Q,x(t)−CLsur,Q,x∗. Directly invoked in Theorem 3.17's
proof ("By part i) of Lemma 3.14...").
Theorem 3.17 — for a single fixed P, an a.s.-strictly-positive calibration function is
necessary for the risk implication (3.18), and sufficient under an added domination condition
(Eq. (3.19), a PX-integrable envelope on the excess inner target risk).
Theorem 3.22 (BRIEF.md's originally recommended goal — the fully quantitative uniform
calibration inequality, using a Fenchel-Legendre biconjugate) was not attempted; see
STATUS.md for the reason and the fallback taken instead.
Significance
Corollary 3.19 is the chapter's answer to "is calibration actually useful, or just necessary?"
Theorem 3.17 alone only rules out non-calibrated surrogates; Corollary 3.19 shows that for the two
most important bounded target losses in the book — the classification loss and the density-level-
detection loss — calibration is exactly the right test, with no gap between necessity and
sufficiency. Concretely: the book's Example 3.16 computes that both the least-squares and hinge
losses are calibrated surrogates for the classification loss for every η∈[0,1], and this
corollary is what turns that pointwise computation into the qualitative consistency guarantee
"minimizing empirical hinge risk is a statistically sound way to approach the empirical
classification risk," ahead of the sharper quantitative form Zhang's inequality already supplies
for that one pair (Theorem 2.31) and Theorem 3.22 supplies in general.
Difficulty
The apparatus itself — inner risks, approximate-minimizer sets, the calibration function — is the
chapter's real content, and getting the finite/infinite distinction right throughout is the
chapter's central technical difficulty: Lemma 3.11's whole point is that "CL,P(⋅∣x),x∗<∞ for a.e. x" is a genuine dichotomy, not a standing assumption, and the calibration
function's own definition branches on exactly this finiteness. A real-valued, junk-at-infinity
convention for risks (as used in the 01-loss-functions mission, where losses were always
bounded) would silently collapse this dichotomy and trivialize Lemma 3.11 and much of Theorem
3.17's content. The definitions in this mission are built in ENNReal (Lean's [0,∞])
throughout specifically to avoid this trap.
Formalization scope
X is an arbitrary measurable space; label distributions Q range over Measure ℝ with no
IsProbabilityMeasure requirement in InnerRisks/CalibrationFunction/Lemma 3.14 — re-reading
Lemma 3.14's proof directly (p. 59) found no step that uses Q having total mass 1, so this
hypothesis is dropped as a disclosed generalization there, matching the convention this series
already used for Lemma 2.23's convexity hypothesis. Wherever a genuine distribution P on
X×Y is required (Lemma 3.4, Lemma 3.11, Theorem 3.17, Corollary 3.19), P is represented
as a pair (PX,κ) — an X-marginal PX and a measurable family κ:X→Measure R of conditional distributions P(⋅∣x) — with ∀ x, IsProbabilityMeasure (κ x) added explicitly at each such use site, since the (PX, κ)
representation does not force this by its types alone. X being a complete measurable space
(required by all four theorem-kind items but Lemma 3.14) is rendered as the disclosed sufficient
condition "∃ a probability measure μ for which μ-null sets have every subset
measurable" rather than the book's exact universal-completion equality — see
Def_..._IsCompleteMeasurableSpace's own note. ε ranges over ENNReal throughout, so
"ε∈[0,∞]"/"(0,∞]" need no narrowing, unlike this series' real-valued
conventions elsewhere.
A trivializing formalization here would let IsCalibrated/the calibration function be an
unconstrained hypothesis disconnected from innerRisk/approxMinimizers, or let κ/PX range
freely with no link to outerRisk/bayesRisk as actually defined — both are ruled out since
every item's statement is built compositionally from the same innerRisk/minInnerRisk/
approxMinimizers/outerRisk/bayesRisk definitions, traced back to Definitions 3.3, 3.5, 2.2
and 2.3 exactly as the book states them.
Loss, innerRisk/minInnerRisk/approxMinimizers, outerRisk/bayesRisk/IsOfType, and
calibrationFunction/IsCalibrated are reusable beyond this mission: this series' 06- classification chunk restates this chapter's apparatus locally (per Hard Rule 9, drafts cannot
import each other) when it reuses Chapter 3's calibration ideas for its own oracle inequality.
Contributions completing the five sorrys are welcome; Theorem 3.22 itself (the fully
quantitative version this mission's BRIEF.md recommended as the primary goal) remains a natural
follow-up mission built on top of this one's definitions.
Selected references
I. Steinwart & A. Christmann, Support Vector Machines, Springer, Information Science and
Statistics, 2008. https://doi.org/10.1007/978-0-387-77242-4 (Chapter 3, §§3.1-3.3, pp. 49-65).
T. Zhang, "Statistical behavior and consistency of classification methods based on convex risk
minimization," Annals of Statistics 32(1), 2004, pp. 56-85.
https://doi.org/10.1214/aos/1079120130
P. L. Bartlett, M. I. Jordan & J. D. McAuliffe, "Convexity, classification, and risk bounds,"
Journal of the American Statistical Association 101(473), 2006, pp. 138-156.
https://doi.org/10.1198/016214505000000907
High-Dimensional Statistics III: A Uniform Law via Rademacher ComplexityTextbook
Motivation
Many statistical estimators are defined by minimizing an empirical average over a class of
candidate models — empirical risk minimization, maximum likelihood, and binary classification
all fit this template. Analyzing such an estimator's excess risk reduces, in each case, to
controlling how far the empirical average of a whole class of functions can deviate from its
population expectation, not just a single fixed function — a much stronger requirement than the
ordinary law of large numbers, which only controls one function at a time. This mission
formalizes the central non-asymptotic tool for this problem, the Rademacher complexity-based
uniform law, following Wainwright, High-Dimensional Statistics: A Non-Asymptotic Viewpoint
(Cambridge University Press, 2019), Chapter 4.
Setting
Let F be a class of real-valued functions with a common domain, indexed as F={fj,j∈ι}, and let X1,…,Xn be i.i.d. samples from a distribution P. The empirical
process deviation (Eq. (4.7)) is
∥Pn−P∥F:=f∈Fsupn1i=1∑nf(Xi)−E[f(X)].
Given an independent Rademacher sequence ε1,…,εn (each
εi=±1 equiprobably), the symmetrized process (Eq. (4.19)) and the
Rademacher complexity (Eq. (4.13)) of F are
For any convex non-decreasing Φ, E[Φ(21∥Sn∥Fˉ)]≤E[Φ(∥Pn−P∥F)]≤E[Φ(2∥Sn∥F)], where Fˉ is the
recentered class. This generalizes the specific symmetrization step used in Theorem 4.10's own
proof (the case Φ(t)=t) to an entire family of moment comparisons.
Milestone — Eq. (4.16) (concentration around the mean)
For a b-uniformly bounded, i.i.d.-sampled class F, ∥Pn−P∥F−E[∥Pn−P∥F]≤t with P-probability at least 1−e−nt2/2b2, obtained via the
bounded-differences method. Combined with Proposition 4.11's bound on E[∥Pn−P∥F] by 2Rn(F), this is exactly Theorem 4.10's proof.
Significance
Theorem 4.10 is the general-purpose engine behind the classical Glivenko–Cantelli theorem
(recovered by taking F to be the class of half-line indicator functions, Example 4.6) and
behind uniform convergence guarantees for empirical risk minimization more broadly (Section
4.1.2): whenever a task can be reduced to bounding the Rademacher complexity of a specific
function class — a purely combinatorial/geometric quantity independent of any particular
statistical model — Theorem 4.10 converts that bound directly into a high-probability uniform
convergence guarantee. Proposition 4.11 is separately significant as the general symmetrization
principle from which Theorem 4.10's specific bound, and many similar bounds throughout empirical
process theory, are instances.
Formalizing it. No faithful prior art exists on the platform: a fresh search for "uniform
law," "symmetrization," "Rademacher complexity," "Glivenko-Cantelli," and "empirical process"
found only unrelated hits and the existing RademacherSymmetrization.*/RademacherMassart.*
items, which are specific to finite function classes (Finset (X → ℝ)) — a strictly narrower
setting than Theorem 4.10's fully general (possibly infinite) function classes, and not reused
here. All three theorems are drafted as open goals (:= by sorry).
Difficulty
The naive approach to bounding ∥Pn−P∥F — apply a scalar concentration bound to
each f∈F individually and union-bound over F — fails outright when F is infinite (there
is no union bound to take). The two-step resolution captured by this mission's milestones avoids
this entirely: first, ∥Pn−P∥F itself, viewed as a single function of the n
samples, is shown to concentrate sharply around its own mean via the bounded-differences method
(no union bound over F needed — the argument treats supf∈F(⋯) as one Lipschitz
function of the samples). Second, the meanE[∥Pn−P∥F] itself, a single
deterministic number, is bounded via symmetrization: introducing an independent "ghost sample"
Yi with the same law as Xi converts the un-symmetric quantity E[supf∣(1/n)∑f(Xi)−Ef∣] into the manifestly symmetric E[supf∣(1/n)∑εi(f(Xi)−f(Yi))∣], and it is only after this symmetrization that the supremum over F becomes
tractable via the geometry of F (its Rademacher complexity) rather than requiring F finite.
Formalization scope
The function class F is realized as the range of an index family f:ι→D→R
rather than a Set (D → ℝ), matching the standard representation of a (possibly infinite)
function class by an index type; ι carries no finiteness assumption, matching the book's own
full generality (in contrast to the platform's existing RademacherSymmetrization/
RademacherMassart items, which are finite-class-specific). The population expectation
E[f(X)] is realized via an explicit population variable X0 sharing the samples'
common law, rather than a separately axiomatized abstract distribution object. The Rademacher
sequence and the samples are packaged into one jointly independent family Z : ℕ → Ω → D × ℝ
with an explicit hypothesis that the two coordinates are themselves independent at each index —
capturing "ε independent of X, both i.i.d." exactly, without a bespoke
joint-independence predicate.
Theorem 4.10's own qualitative corollary ("consequently, ∥Pn−P∥Fa.s.0
whenever Rn(F)=o(1)") is not included in the goal's conclusion: it concerns an infinite
sequence of samples and asymptotic convergence via the Borel–Cantelli lemma, a substantially
different formal object (requiring Filter.Tendsto over ℕ→∞ and ∀ᵐ almost-sure convergence)
from the single-n non-asymptotic tail bound (4.14) this mission's goal states, and is left as
natural follow-on work, alongside a direct formalization of the classical Glivenko–Cantelli
theorem (Theorem 4.4) as a corollary.
Lemma 4.14 (the polynomial-discrimination route to bounding Rademacher complexity for VC-type
classes) is out of scope for this mission: its displayed inequality is extracted with heavily
garbled math layout from the source PDF (a known, disclosed limitation of this book's text
extraction at that specific page), and confirming it character-for-character against the
rendered page image was judged out of budget for this chunk relative to Proposition 4.11 and
Eq. (4.16), both of which are directly load-bearing in Theorem 4.10's own proof and extracted
cleanly.
Selected references
M. J. Wainwright, High-Dimensional Statistics: A Non-Asymptotic Viewpoint, Cambridge
University Press, 2019. DOI: 10.1017/9781108627771.
Chapter 4.
M. Ledoux and M. Talagrand, Probability in Banach Spaces: Isoperimetry and Processes,
Springer, 1991 (the symmetrization technique).
V. N. Vapnik and A. Y. Chervonenkis, "On the uniform convergence of relative frequencies of
events to their probabilities," Theory of Probability and Its Applications, 16(2):264–280,
1971.
High-Dimensional Probability VI: The Hanson-Wright InequalityTextbook
Motivation
Sums of independent random variables are well understood: Bernstein's inequality and its
relatives give sharp, non-asymptotic tail bounds for ∑iaiXi whenever the Xi are
independent and light-tailed. Many quantities that arise in high-dimensional statistics and
random matrix theory, however, are not linear but quadratic in an independent sample —
the squared norm of a random vector after a linear transformation, a quadratic-form
test statistic, the diagonal of a sample covariance matrix, or the number of edges cut by a
random partition in a random graph. A quadratic form X⊤AX=∑i,jAijXiXj
is a sum with dependent terms: XiXj and XiXk share the factor Xi, so classical
sum-of-independent-variables tools do not apply directly.
The Hanson-Wright inequality, first obtained by Hanson and Wright (1971) for sub-gaussian
variables and later sharpened and popularized in this form by Rudelson and Vershynin
(2013, "Hanson-Wright inequality and sub-gaussian concentration," Electronic Communications
in Probability), closes this gap: it gives a concentration inequality for X⊤AX around
its mean with the same two-regime (sub-gaussian near the center, sub-exponential in the tail)
shape as Bernstein's inequality for linear sums. It is now a standard tool wherever quadratic
statistics of independent data are analyzed: covariance estimation, compressed sensing,
randomized numerical linear algebra, and the analysis of random matrices more broadly draw on
it routinely.
Setting
Fix a probability space and let X=(X1,…,Xn) be a random vector whose coordinates
X1,…,Xn are independent, mean zero, and sub-gaussian: each Xi has a finite
sub-gaussian (Orlicz ψ2) norm ∥Xi∥ψ2, the smallest t>0 with Eexp(Xi2/t2)≤2. Write K=maxi∥Xi∥ψ2.
Let A=(Aij)i,j=1n be an n×n real matrix, with no constraint on its diagonal,
and form the quadratic form
X⊤AX=i,j=1∑nAijXiXj.
Two matrix norms measure the size of A: the Frobenius norm∥A∥F=(∑i,jAij2)1/2 (the Euclidean norm of A's entries) and the operator (spectral) norm∥A∥=sup∥x∥2=1∥Ax∥2 (the largest singular value of A). Always ∥A∥≤∥A∥F≤n∥A∥, so the two norms can differ by a factor as large as n —
the gap between them is exactly what produces the inequality's two regimes below.
Formalization targets
Goal — Theorem 6.2.1 (Hanson-Wright inequality)
P{∣X⊤AX−EX⊤AX∣≥t}≤2exp[−cmin(K4∥A∥F2t2,K2∥A∥t)]for every t≥0,
where c>0 is an absolute constant, not depending on n, X, A, or t. Stating the
constant only as "some absolute c" (rather than pinning it to a numeral) is deliberate: the
book's own proof does not track a sharp value, and a goal that only asserts the shape of the
bound survives any later improvement to c.
Significance
The result itself. Hanson-Wright turns a two-dimensional (in i,j) dependency structure
into a one-dimensional concentration statement controlled by two scalar quantities, ∥A∥F
and ∥A∥. This is what makes it usable: a practitioner bounding a quadratic statistic need
only compute these two norms, not analyze the joint dependency structure of {XiXj}
directly. It specializes to Bernstein's inequality (Chapter 2 of this book) when A is
diagonal, and it underlies non-asymptotic guarantees for covariance estimation, the
Johnson-Lindenstrauss lemma via a different route, and the concentration of Lipschitz functions
of sub-gaussian vectors.
Formalizing it. The published proof of Hanson-Wright is not a single argument but a chain
of four steps: a decoupling reduction (Section 6.1), a direct computation for Gaussian chaos
(Lemma 6.2.2), a comparison lemma extending the Gaussian bound to general sub-gaussian vectors
via a replacement trick (Lemma 6.2.3), and a final assembly that separates the diagonal part
(handled by Bernstein's inequality) from the off-diagonal part (handled by decoupling and
comparison). This mission formalizes the goal theorem's statement and the first, most reusable
link in that chain — the decoupling machinery of Section 6.1, which reduces the analysis of the
dependent chaos X⊤AX to the independent-once-conditioned bilinear form X⊤AX′ —
together with the chapter's separate contraction principle (Section 6.7), a general comparison
tool for Rademacher-weighted sums used repeatedly in the book's later chaining chapters. The
Gaussian MGF computation and the replacement-trick comparison lemma (Lemmas 6.2.2–6.2.3) are
left as future milestones on top of this mission: they require Gaussian rotation invariance and
the singular value decomposition of A, substantially more machinery than the milestones
included here.
Difficulty
The obvious first idea — treat X⊤AX=∑i,jAijXiXj as if it were a sum of
independent terms and apply Bernstein's inequality termwise — fails immediately: the terms
AijXiXj for fixed i are not independent across j, since they all share the factor
Xi. Decoupling (Theorem 6.1.1) is the non-obvious fix: it replaces the off-diagonal chaos by
a bilinear form X⊤AX′ in an independent copy X′, which genuinely does become a sum
of independent terms once one of the two vectors is conditioned on. The price is a universal
constant factor of 4 and the restriction to diagonal-free matrices, which is exactly why the
full Hanson-Wright proof must separate the diagonal contribution to EX⊤AX
(handled directly by Bernstein's inequality, Chapter 2) before decoupling can be applied to what
remains.
Formalization scope
Random variables and vectors are real-valued on an explicit probability space (Ω,F,P). The sub-gaussian norm is HighDimProb.Concentration.subgaussianNorm, the
Orlicz-ψ2-norm definition already published for this series (01-concentration), reused
here as a reference item rather than redefined. K=maxi∥Xi∥ψ2 is written as a
finite supremum over the coordinate index, ⨆ i, subgaussianNorm P (X i); because the index
type is always a Fintype (Fin n), this supremum is well-defined and, at the degenerate index
n=0, reduces to a true (if content-free) instance of the inequality rather than a vacuous or
false one. The Frobenius and operator norms of A are this mission's own frobeniusNorm and
opNorm, stated directly from their defining formulas rather than through Mathlib's scoped
matrix-norm typeclass instances, which are deliberately not global defaults (to avoid a diamond
between the two norms) and so are unsuitable for a statement that needs both simultaneously.
Every place the goal or a milestone integrates a quantity, that quantity is required
Integrable, guarding against Mathlib's convention of returning 0 for the Bochner integral of
a non-integrable function — without these hypotheses, a mean-zero or expectation hypothesis
could hold vacuously, or a conclusion could hold trivially, for reasons having nothing to do
with the book's mathematics.
The formalization deliberately does not restrict A's diagonal in the goal theorem: doing
so would collapse Hanson-Wright to a restatement of Bernstein's inequality for the special case
of a diagonal matrix, discarding the chapter's actual content, which is handling the
off-diagonal, genuinely quadratic dependence between coordinates. The diagonal-free restriction
does appear, correctly, in the Decoupling theorem (6.1.1), whose proof needs it.
Reusable beyond this mission: frobeniusNorm and opNorm are needed by any future chapter
using matrix norms (Chapter 4's random matrix norms, Chapter 9's matrix deviation inequality);
the decoupling theorem and convex decoupling lemma are the standard entry point for any later
formalization of chaos concentration; the contraction principle is reused throughout the book's
chaining chapters (7 and 8). Welcome contributions include the Gaussian MGF and comparison
lemmas (6.2.2–6.2.3) needed to complete a full proof of the goal theorem, and the two-sided
version of Bernstein's inequality needed for the diagonal part of that proof.
Selected references
R. Vershynin, High-Dimensional Probability: An Introduction with Applications in Data
Science, Cambridge University Press, 2018. DOI: 10.1017/9781108231596.
D. L. Hanson, F. T. Wright, "A bound on tail probabilities for quadratic forms in independent
random variables," Annals of Mathematical Statistics 42 (1971), 1079–1083.
M. Rudelson, R. Vershynin, "Hanson-Wright inequality and sub-gaussian concentration,"
Electronic Communications in Probability 18 (2013), no. 82, 1–9.
https://arxiv.org/abs/1306.2872
Foundations of Machine Learning III: Structural Risk Minimization and Model SelectionTextbook
Motivation
Chapters 2 and 3 bound the estimation error of a hypothesis chosen from a fixed hypothesis
set H, but the choice of H itself is left open: a richer H lowers the approximation
error (how close H comes to the Bayes classifier) at the price of a looser generalization
bound, and a poorer H does the reverse. Chapter 4 is the book's answer to this trade-off. It
first shows that Empirical Risk Minimization (ERM) alone cannot resolve it — ERM ignores the
complexity of H entirely — and then develops Structural Risk Minimization (SRM): decompose a
rich hypothesis set into a nested countable union H=⋃k≥1Hk of increasingly
complex pieces, and let the learning algorithm balance empirical fit against a complexity
penalty for each Hk automatically. The chapter closes by showing how the same balance can be
achieved computationally through convex surrogate losses, whose minimization is tractable where
minimizing the zero-one loss directly is not.
Setting
For a hypothesis h chosen from H, the excess error R(h)−R∗ decomposes into an estimation
term R(h)−infh∈HR(h) and an approximation term infh∈HR(h)−R∗ (Eq. 4.1).
Proposition 4.1 bounds ERM's estimation error by twice the uniform deviation
suph∈H∣R(h)−R^S(h)∣. For a nested family (Hk)k≥1 and h∈H, k(h)
denotes the least index with h∈Hk(h); SRM selects hSSRM by minimizing
Fk(h)=R^S(h)+Rm(Hk)+logk/m jointly over k≥1 and h∈Hk, where
Rm(Hk) is Hk's Rademacher complexity (Definitions 3.1/3.2, restated locally in this
chunk's ModelSelection namespace). Theorem 4.2 is the resulting learning guarantee. Section
4.4 develops a competing model-selection procedure, cross-validation, and Theorem 4.4 directly
compares its guarantee to SRM's on a held-out split of the sample. Section 4.7 turns to
real-valued scoring functions h:X→R with sign convention fh(x)=sign(h(x))
and a convex non-decreasing surrogate Φ of the zero-one loss; the Bayes scoring function
h∗(x)=η(x)−21 (Eq. 4.9) and the Φ-loss LΦ (Eq. 4.10) let Theorem 4.7
bound the true excess error by a power of the surrogate's own excess loss.
Formalization targets
Proposition 4.1 (ERM bound, milestone). For any sample S, Pr[R(hSERM)−infh∈HR(h)>ϵ]≤Pr[suph∈H∣R(h)−R^S(h)∣>ϵ/2].
Theorem 4.2 — the mission's goal. For a nested countable union H=⋃k≥1Hk and
hSSRM minimizing Fk(h) over the whole union, for any δ>0, with probability at
least 1−δ:
Theorem 4.4 (Cross-validation versus SRM, milestone). Splitting a sample of size m into
S1 (size (1−α)m, training) and S2 (size αm, validation), for any δ>0,
with probability at least 1−δ:
Theorem 4.7 (Convex-surrogate excess-error bound, milestone). For Φ convex and
non-decreasing with s≥1,c>0 satisfying ∣h∗(x)∣s≤cs(LΦ(x,0)−LΦ(x,hΦ∗(x)))
for all x: R(h)−R∗≤2c(LΦ(h)−LΦ∗)1/s.
Significance
Theorem 4.2 is the chapter's headline result and the theoretical justification for
regularization-based learning: it shows that a single algorithm, without knowing in advance
which Hk contains a good hypothesis, achieves a guarantee that is — up to the
logk(h)/m penalty — as favorable as if an oracle had revealed the best-in-class
index in advance (Eq. 4.6). It is also the chapter's genuine new content beyond chunk
03-rademacher-vc's single-hypothesis-set bound: the countable union bound (a 1/k²-weighted
union over k≥1 converging to π2/6, hence the log3 appearing in place of log2)
is not a restatement of Theorem 3.3 but a distinct argument, and the goal's inf over the
whole nested family is what makes SRM a model-selection method rather than a bound for one
fixed k. Theorem 4.4 is the chapter's only head-to-head comparison between two competing
model-selection procedures, on two genuinely different samples. Theorem 4.7 is the bridge
between the learning-theoretic guarantees of chapters 2-4 and the actually-implemented convex
optimization problems of chapters 5 (SVM), 6 (kernels) and beyond, all of which minimize a
convex surrogate rather than the zero-one loss directly. No prior art exists on the platform:
GET /theorems?q=structural%20risk%20minimization and GET /theorems?q=model%20selection both
return zero hits.
Difficulty
Theorem 4.2's proof genuinely uses the union bound over a countably infinite family indexed
by k≥1 with weight 1/k2 converging to π2/6<2 (Eq. 4.5) — this is the chapter's
distinct new technique, not an application of chunk 03's finite/VC-dimension machinery to a
single Hk; a formalization that stated the bound only for one fixed k, or dropped the
inf over the whole union in favor of a single best-in-class h∗, would be Theorem 4.2's
named trivializing formalization (BRIEF.md's pitfall note) rather than the theorem itself.
Theorem 4.4 requires keeping two distinct samples (S1, S2, of different, precisely
related sizes) and two distinct hypotheses (hSCV, hS1SRM) apart throughout;
conflating them collapses the comparison to a tautology. Theorem 4.7's difficulty is in its
setup, not its statement: the Bayes scoring function, the Φ-loss, and the pointwise
Φ-minimizer hΦ∗ (which the book allows to take the extended values ±∞ at
the degenerate points η(x)∈{0,1}) all need care to state without silently altering
the theorem's content.
Formalization scope
GeneralizationError, EmpiricalError, EmpiricalRademacherComplexity and
RademacherComplexity are restated locally in this chunk's ModelSelection namespace
(identical in content to chunk 03-rademacher-vc's own copies), since a draft item cannot
import another chunk's draft module. LeastIndex H h (k(h)) is Nat.sInf {k | 1 ≤ k ∧ h ∈ H k}; every theorem using it carries the standing hypothesis that h lies in the relevant union,
guarding against trap 5 (Nat.sInf of an empty set). Theorem 4.2's hSRM and Proposition 4.1's
hERM are hypothesis-supplied functions satisfying the book's optimality property, not
constructed via choice over an unconstrained H; H.Nonempty (Proposition 4.1) and
(⋃ k ≥ 1, Hk k).Nonempty (Theorem 4.2) guard the outer sInf/inf terms against trap 5.
Theorem 4.7's hΦ∗ is formalized as a real-valued function satisfying the pointwise
minimization property for all x; the book's own extended-real convention
(hΦ∗(x)=±∞ exactly where η(x)∈{0,1}) is outside this formalization —
disclosed here and in MODERATION_NOTES.md — since no real number satisfies the minimizing
property at those degenerate points, the theorem as stated applies precisely to the case a
real-valued hΦ∗ can be supplied, which is the book's own generic case. No numerical
constant is altered from the book in any of the four theorems: 2 and log(3/δ) in Theorem
4.2, 2 (twice) and log(4/δ) in Theorem 4.4, and 2c and the exponent 1/s in Theorem 4.7
are exactly as displayed.
Not formalized: the discussion of computing k∗ via binary search (a computational, not a
statistical, result); n-fold and leave-one-out cross-validation (Section 4.5, a practical
variant of Theorem 4.4's two-sample cross-validation without its own numbered generalization
bound); regularization-based algorithms (Section 4.6, the uncountable-union extension of SRM,
which the book itself only sketches without a numbered theorem); Lemma 4.5 and Proposition 4.6
(intermediate results establishing that hΦ∗ induces the same classifier as h∗,
needed for Theorem 4.7's proof but not part of its statement); and the worked examples for
the hinge, exponential and logistic losses (instantiations of Theorem 4.7's s,c, not separate
theorems). Drafting only these worked instantiations in place of Theorem 4.7's general
statement would be a trivializing formalization for this chapter.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 4.
V. Vapnik, Statistical Learning Theory, Wiley-Interscience, 1998 (structural risk
minimization).
T. Zhang, "Statistical behavior and consistency of classification methods based on convex
risk minimization," Annals of Statistics 32(1), 2003 (Theorem 4.7's origin).
Support Vector Machines I: Zhang's Inequality Relating the Hinge Risk and the Classification RiskTextbook
Motivation
Binary classification asks for a rule that predicts a label y∈{−1,1} from an observation
x. The natural loss for this task, the classification loss Lclass, is a step
function: minimizing its empirical average over a class of functions f is generally NP-hard,
because the objective is non-convex and discontinuous in f. Every practical classification
algorithm — logistic regression, boosting, and the support vector machine this book is about —
sidesteps this by minimizing a convex surrogate loss instead, such as the hinge loss
Lhinge(y,t):=max{0,1−yt}, and hoping that a small surrogate risk implies a
small classification risk.
Zhang (2004) and Bartlett, Jordan & McAuliffe (2006) put this hope on a rigorous footing: for a
wide class of convex surrogates, controlling the excess surrogate risk controls the excess
classification risk, with an explicit quantitative relationship. Steinwart & Christmann,
Support Vector Machines (Springer 2008, Information Science and Statistics), Chapter 2, develop
the special case of the hinge loss in closed form as Theorem 2.31 ("Zhang's inequality"), the
sharpest and most self-contained instance of this calibration phenomenon: an exact equality for
bounded functions, not merely an inequality.
Setting
Fix a measurable space (X,A) and a closed label set Y⊂R; throughout
this mission Y:={−1,1}. A loss function is a measurable map
L:X×Y×R→[0,∞), read as the cost L(x,y,f(x)) of predicting y
by f(x) when x is observed. Given a distribution P on X×Y, the L-risk of a
measurable f:X→R is the average cost
RL,P(f):=∫X×YL(x,y,f(x))dP(x,y), and the Bayes riskRL,P∗:=inffRL,P(f) is the smallest risk any measurable function can achieve.
The classification loss is Lclass(y,t):=1(−∞,0](y⋅sgnt) — it charges 1 exactly when the sign of the prediction t disagrees with
the label y — where sgn is the sign function with the book's convention
sgn(0):=1. The hinge loss is
Lhinge(y,t):=max{0,1−yt}, a convex, piecewise-linear upper bound on
Lclass up to a factor of 2. Writing η(x):=P(y=1∣x) for the conditional
probability of the positive label given x, the Bayes classification function is
fLclass,P∗(x):=sgn(2η(x)−1): it predicts the majority label
at x.
A loss Lcan be clipped at M>0 if truncating every prediction to [−M,M] never increases
the loss: L(x,y,t)≤L(x,y,t) for the clipped value t of t. Both
Lclass and Lhinge can be clipped at M=1.
The first target is an exact identity for bounded predictors: the excess hinge risk equals a
weighted L1 distance to the Bayes classifier. The second, weaker but unrestricted, statement
is what makes the hinge loss a valid classification surrogate for arbitrary real-valued scores:
no matter how large ∣f∣ grows, the excess classification risk it incurs is bounded by its
excess hinge risk. Because the second statement is the one actually used downstream (Chapter 6's
oracle inequality composes it with a bound on the excess hinge risk to bound the excess
classification risk), it is the weakest stable form of the calibration claim and the natural
target to keep in mind when judging whether a variant formalization is still faithful.
Significance
Zhang's inequality is the single fact that licenses every consistency and rate-of-convergence
result for SVM classification in the rest of the book (flagged explicitly on p. 38: "we will show
in Section 3.4 that the other margin-based losses ... are also reasonable surrogates," and reused
directly, e.g., in Chapter 6's oracle inequality via its restatement as Theorem 6.24 in Chapter 6
of this series). Its role is entirely mechanical but load-bearing: every SVM consistency proof
reduces to bounding an excess surrogate risk, and Theorem 2.31 is what converts that bound back
into a statement about the classification error anyone actually cares about.
The result itself has been known since Zhang (2004) and Bartlett–Jordan–McAuliffe (2006) in more
general form (arbitrary convex margin losses, with an explicit "ψ-transform" relating excess
risks); Theorem 2.31 is the closed-form hinge-loss instance, with the equality (not just an
inequality) available because the hinge loss's clipped value is exactly linear in η. No
machine-checked proof of either the general or the hinge-specific statement is known to exist in
a public Lean/Mathlib development at the time of writing (see prior-art search below); this
mission asks for a formalization of the hinge-specific case exactly as the book states it.
Difficulty
The natural first attempt is to expand both risk differences directly as integrals over P and
compare integrands. This works for the equality (bounded f), because the hinge loss is
piecewise linear in t and the calculation collapses to the algebraic identity
1+f(x)(1−2η(x))=∣f(x)−fLclass,P∗(x)∣⋅∣2η(x)−1∣ once f∗ is spelled
out by cases on the sign of 2η(x)−1. It fails for the inequality on unbounded f: neither
risk difference has a closed algebraic form once f is allowed to leave [−1,1], and the excess
classification risk itself is genuinely discontinuous in f. The book's proof resolves this by
clipping f first (Lemma 2.23: clipping a convex loss at a minimizer's interval only decreases
its risk) and observing the excess classification risk is invariant under clipping — this
reduces the general case to the bounded case, at the cost of needing Lemma 2.23 as a genuine
prerequisite rather than a routine remark. The remaining pointwise step (Lemma 2.30) is a
case-by-case real-variable inequality with no probabilistic content of its own, but gets the
boundary case η=1/2 (equivalently 2η−1=0, where the book's sign convention
sgn(0):=1 is load-bearing) wrong if that convention is not tracked precisely.
Formalization scope
X is an arbitrary measurable space; Y is fixed to {−1,1}⊂R throughout. A
loss is represented as a plain function Loss X := X → ℝ → ℝ → ℝ; nonnegativity and the
restriction of the middle argument to {−1,1} are supplied as explicit hypotheses at each use
site rather than built into the type, since only some lemmas of the chapter need them (Lemma 2.23
needs neither). risk/bayesRisk are ordinary real-valued Bochner integrals/infima, not
extended-real-valued as in the book; consequently every assertion that could otherwise degrade to
a vacuous 0 - 0 from a non-integrable loss carries an explicit Integrable hypothesis on the
relevant loss composed with f — automatic in the book's own setting (bounded losses on a
probability space) but not implied by the Lean types alone. η(x):=P(y=1∣x) is
represented by its defining disintegration identity,
P(A×{1})=∫x∈Aη(x)dPX(x) for every measurable A⊆X, rather
than via a general regular-conditional-probability construction — a specific, checkable
representation of "the conditional probability of y=1 given x" rather than a synonym for it.
A trivializing formalization would let fLclass,P∗ or η be an unconstrained
hypothesis unconnected to P and Lclass (making the goal a tautology about
whatever function is supplied); this is ruled out here by deriving fLclass,P∗
from η by the book's own formula sgn(2η−1) and constraining η by the
disintegration identity above, not taking either as a free unconstrained parameter.
Lemma 2.23, Lemma 2.30, L_class/L_hinge, risk/bayesRisk and CanBeClipped/clip are
reusable beyond this mission: Lemma 2.23 and the risk/Bayes-risk vocabulary recur throughout the
book (clippability is used again in Section 7.4 and, per this series' README, this chapter's
Theorem 2.31 itself is restated inside Chapter 6's oracle inequality). Contributions completing
the two milestone proofs and the goal's sorry are welcome; a from-scratch alternative proof
avoiding Lemma 2.23 (e.g. by a direct case analysis on f outside [−1,1]) would also be a
valid solution to the goal, since the milestones are the book's own attack path, not a required
lemma structure.
Selected references
I. Steinwart & A. Christmann, Support Vector Machines, Springer, Information Science and
Statistics, 2008. https://doi.org/10.1007/978-0-387-77242-4 (Chapter 2, pp. 21-47).
T. Zhang, "Statistical behavior and consistency of classification methods based on convex risk
minimization," Annals of Statistics 32(1), 2004, pp. 56-85.
https://doi.org/10.1214/aos/1079120130
P. L. Bartlett, M. I. Jordan & J. D. McAuliffe, "Convexity, classification, and risk bounds,"
Journal of the American Statistical Association 101(473), 2006, pp. 138-156.
https://doi.org/10.1198/016214505000000907
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-H) right is
the foundation the rest of the book's guarantees build on.
Setting
A learner sees a sample S=(x1,…,xm) drawn i.i.d. from a fixed but unknown distribution
D on an instance space X, labeled by an unknown target concept c drawn from a concept
class C; a hypothesis h from a fixed hypothesis set H is judged by its generalization
error R(h)=Prx∼D[h(x)=c(x)] (Definition 2.1) against its empirical error
R^S(h)=m1∑i1h(xi)=c(xi) (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 1−δ, for every accuracy ϵ and
confidence δ and every distribution D — 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 H is finite and algorithm A always returns
a hypothesis consistent with the target concept on the training sample (R^S(hS)=0),
then PrS∼Dm[R(hS)≤ϵ]≥1−δ whenever
m≥ϵ1(log∣H∣+logδ1).
Corollary 2.11 (single-hypothesis Hoeffding bound, milestone). For a fixed hypothesis
h:X→{0,1} and any δ>0, with probability at least 1−δ,
R(h)≤R^S(h)+log(2/δ)/(2m).
Theorem 2.13 (inconsistent case, goal). For a finite hypothesis set H and any δ>0,
with probability at least 1−δ, simultaneously for everyh∈H,
R(h)≤R^S(h)+2mlog∣H∣+log(2/δ).
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 H perfectly fits the
training data — while paying only an additive log∣H∣ price inside the square root, via a
union bound over H 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 log∣H∣
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 ∣H∣ hypotheses), but each
ingredient carries its own faithfulness burden. Corollary 2.11 needs the sample S and the
target hypothesis h kept in the right relationship — h fixed, S random — for the bound to
be Hoeffding's inequality and not a vacuous statement about a random hypothesis. Theorem 2.13
needs the ∀h∈H quantifier placed inside the probability event (a single sample S
must work for every h at once), not outside it (which would only assert each h's bound holds
with high probability for a sample chosen depending on h) — the difference between a uniform
convergence bound and ∣H∣ separate, weaker statements. Definition 2.3's "polynomial function
poly(⋅,⋅,⋅,⋅)" is a genuine formalization judgment call, addressed
below.
Formalization scope
GeneralizationError/EmpiricalError are typed generally over X,Y (matching Definition
2.1/2.2's own general statement, "h:X→Y"), since Theorem 2.5 itself is stated for general
Y, not just Y=Bool; Corollary 2.11 and Theorem 2.13 specialize to
h:X→Bool, matching their own explicit "h:X→{0,1}" (Corollary 2.11) and the
surrounding inconsistent-case section's restriction to binary classification. The i.i.d. sample
S∼Dm is modeled as the identity random variable on the product-measure space
(Finm→X,Measure.pi(λ_.D)) in both Corollary 2.11 and
Theorem 2.13, matching the book's own S∼Dm notation exactly. IsPACLearnable
(Definition 2.3) makes "polynomial function" precise as a function bounded above by
K⋅(a+b+n+s+1)k for some constants K>0, k∈N, 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 δ>1). Not formalized: the "efficiently PAC-learnable"
running-time clause of Definition 2.3 (a second, independent polynomial-time condition on A
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-H 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.