The science of systems that learn from data and experience. Its scope runs from the statistical and mathematical foundations of learning, including generalization, expressivity, and computational limits, through the design of learning algorithms, deep learning, reinforcement learning, and probabilistic methods, to the empirical study of large models and the trustworthiness, interpretability, and societal impact of learned systems.
Les Houches Lectures on Deep Learning at Large & Infinite Width II: Finite-Width Four-Point Function RecursionTextbook
Motivation
At infinite width a randomly initialized network is a Gaussian process (Mission I of this series). Real networks have finite width n, and the leading departure from Gaussianity is measured by the connected four-point functionκ4. It captures both correlations between neurons and non-Gaussian fluctuations. Lecture 4 of the Les Houches lectures (arXiv:2309.01592, lectures by B. Hanin) states the central finite-width result, Theorem 4.2: κ4 is of order 1/n and obeys an explicit layer-to-layer recursion up to O(n−2). At criticality this gives the effective depthL/n as the parameter controlling finite-width effects. The result was first derived at a physics level of rigor by Yaida (2020) and in Roberts–Yaida–Hanin (2022), and later derived more mathematically by Hanin (reference [19] of the notes).
Setting
A network of depth L with widths n0,…,nL+1 and nonlinearity σ has preactivations z(1)=b(1)+W(1)x and z(ℓ+1)=b(ℓ+1)+W(ℓ+1)σ(z(ℓ)). The parameters are independent, with Wij(ℓ)∼N(0,CW/nℓ−1) and bi(ℓ)∼N(0,Cb), where Cb≥0 and CW>0 (eqs. (118)–(119)). At a single input x, write ⟨f⟩K for the average of f against N(0,K). The infinite-width kernel is K(1)=Cb+CW∣x∣2/n0 and K(ℓ+1)=Cb+CW⟨σ2⟩K(ℓ) (eq. (120)). The parallel susceptibility is χ∥(ℓ)=CW∂K⟨σ2⟩K∣K=K(ℓ). The normalized connected four-point function is
κ4(ℓ)=31(E[(zi(ℓ))4]−3E[(zi(ℓ))2]2).
Formalization targets
Goal: Theorem 4.2, recursion for κ4
If the hidden widths satisfy n≤nℓ≤An, then κ4(ℓ)=O(n−1) and
Theorem 4.2, expansion of observables: Ef(z1(ℓ),…,zm(ℓ))=⟨f⟩G(ℓ)+8κ4(ℓ)⟨(∑j∂j4+∑j1=j2∂j12∂j22)f⟩K(ℓ)+O(n−2).
Significance
Theorem 4.2 is the first quantitative statement that finite-width networks at initialization are not Gaussian processes. The size of the deviation is 1/n per layer, and it accumulates linearly in depth at criticality. This is the basis for the claim of Lecture 4 that L/n controls correlations between neurons, fluctuations and, in later lectures, feature learning. As far as the drafter knows these statements have not been machine-checked. Lemma 4.4 and the covariance exercise are exact finite-width identities and are natural first targets.
Difficulty
The next layer is Gaussian only conditionally, with a random variance Σ(ℓ) that is an average over nℓ dependent neurons. Establishing the recursion to order n−2 requires expanding Gaussian averages around the mean of Σ(ℓ) and controlling all higher cumulants of this collective observable uniformly in the widths. The nonlinearity is only assumed polynomially bounded, so smoothness must come from Gaussian averaging, not from σ.
Formalization scope
Mission I's definitions (LesHouchesWidth_GaussianMLP: the network mlpZ, stdGaussianParams, nngpKernel, uniformWidths) are reused. Mission I must be launched first, and its definition then added to this proposal as a reference item.
"n1,…,nL≃n" is encoded as n≤nℓ≤An for a fixed A≥1. The O(⋅) constants may depend on all fixed data (Cb,CW,σ,L,n0,nL+1,x,A, and m,f where relevant) but not on n or on the widths.
"Reasonable" σ is taken to mean measurable and polynomially bounded, and the kernel is assumed nondegenerate: K(ℓ)>0 for 1≤ℓ≤L+1, as the density-based definition of ⟨⋅⟩K in Section 4.2 requires. "Reasonable" test functions f are taken to be smooth with polynomially bounded derivatives of all orders.
The expansion of observables is stated with κ4(ℓ) in front of the correction. The printed κ4(ℓ+1) appears to be an index slip: with κ4(ℓ) the formula reproduces E[z4]=3G2+3κ4 and E[z12z22]=G2+κ4 exactly.
The criticality statement is formalized for ReLU at Cb=0, CW=2, the one critical example in the notes where K(ℓ) is constant. For σ=tanh the notes' "≃" is asymptotic in depth and is not formalized here.
Selected references
Y. Bahri, B. Hanin, A. Brossollet, V. Erba, C. Keup, R. Pacelli, J. B. Simon, Les Houches Lectures on Deep Learning at Large & Infinite Width, 2023. arXiv:2309.01592
S. Yaida, Non-Gaussian processes and neural networks at finite widths, MSML 2020. arXiv:1910.00019
D. A. Roberts, S. Yaida, B. Hanin, The Principles of Deep Learning Theory, Cambridge University Press, 2022. arXiv:2106.10165
B. Hanin, Random Fully Connected Neural Networks as Perturbatively Solvable Hierarchies, 2022. arXiv:2204.01058
Les Houches Lectures on Deep Learning at Large & Infinite Width I: Gaussian-Process Limit of Wide Networks and Wick's TheoremTextbook
Motivation
A fully connected neural network with random Gaussian weights defines a random function of its input. Lecture 1 of the Les Houches lectures on deep learning at large and infinite width (arXiv:2309.01592, lectures by Y. Bahri) explains that, when the hidden layers become infinitely wide, this random function becomes a Gaussian process (the "neural network Gaussian process", NNGP). Its covariance kernel is computed by an explicit layer-to-layer recursion. The observation goes back to Neal (1996) for one hidden layer. It was extended to deep networks by Matthews et al. and Lee et al. (2018). It underlies Bayesian inference with infinitely wide networks (Section 1.6) and the analysis of signal propagation at large depth (Section 1.7). Lecture 2 introduces Wick's theorem, the tool for computing moments of Gaussian vectors that the lectures then use for finite-width corrections.
Setting
A network of depth L with widths n0,…,nL+1 and nonlinearity φ maps an input x∈Rn0 to preactivations
with independent bi(ℓ)∼N(0,σb2) and Wij(ℓ)∼N(0,σw2/nℓ−1) (eqs. (1)–(3) and (5); layers are indexed as in Lectures 4–5, so zl of Lecture 1 is z(l+1) here). For a 2×2 covariance Σ write Fφ(Σ11,Σ12,Σ22)=E(u1,u2)∼N(0,Σ)[φ(u1)φ(u2)] (eq. (15)). The NNGP kernel is
A pairing of {1,…,2m} is a partition into m two-element blocks.
Formalization targets
Goal: Result 1 (single hidden layer)
For a network with one hidden layer of width n, fixed inputs x1,…,xm and output width n2, as n→∞ the vector (zi(2)(xa))i≤n2,a≤m converges in distribution to a centered Gaussian with covariance
E[zi(2)(xa)zj(2)(xb)]→δijK(2)(xa,xb).
Milestones
Eq. (10): E[zi(1)(x)zi(1)(x′)]=K(1)(x,x′).
Eqs. (9), (11): E[zi(2)(x)zi(2)(x′)]=K(2)(x,x′) at every finite width.
Eq. (16): closed form of FReLU (the arc-cosine kernel).
Result 2 (Wick's theorem): E[zμ1⋯zμ2m]=∑pairings∏Kμkμk′ for z∼N(0,K), and odd moments vanish.
A further item states the deep version of the limit, eqs. (13)–(14), in the simultaneous-width limit. It is included as a supporting theorem rather than a milestone.
Significance
Result 1 and its deep extension identify the prior over functions induced by random initialization. They also make the NNGP kernel the central computational object of the infinite-width theory. The finite-width covariance identities (9)–(11) are exact and explain where the recursion comes from. Formula (16) makes the recursion explicit for ReLU. Wick's theorem is the basic tool of the finite-width perturbation theory of later lectures. These are classical results. The mission asks for their formal proofs against a single shared model of random networks that the later missions of this series reuse.
Difficulty
Result 1 is a multivariate central limit theorem for sums of n i.i.d. vectors whose entries are products of a Gaussian weight and a nonlinear function of Gaussian first-layer preactivations. No assumption beyond square-integrability of φ against the relevant Gaussians is imposed, so the CLT must be applied in its L2 form. The deep limit is harder: for L≥2 the hidden preactivations are not Gaussian at finite width, and one must control a triangular array in which the widths of all layers grow together. The ReLU formula (16) is an explicit but delicate Gaussian integral over a cone.
Formalization scope
The parameters are coordinates of i.i.d. standard Gaussians (stdGaussianParams), scaled by σb and σw/nℓ−1 (mlpBias, mlpWeight). This is equality in law with the prior (5).
Bivariate Gaussian averages use Mathlib's multivariateGaussian. Convergence in distribution is stated with bounded continuous test functions: Eg(Zn)→∫gdN(0,C) for every bounded continuous g.
The one-hidden-layer goal assumes only that φ is measurable and that φ2 is integrable against N(0,K(1)(xa,xa)) for each input. The deep statement assumes φ continuous with a linear envelope ∣φ(u)∣≤c+M∣u∣, the condition used by Matthews et al. (2018). The notes defer to the references for these conditions.
Pairings are fixed-point-free involutions of {0,…,2m−1}.
Selected references
Y. Bahri, B. Hanin, A. Brossollet, V. Erba, C. Keup, R. Pacelli, J. B. Simon, Les Houches Lectures on Deep Learning at Large & Infinite Width, 2023. arXiv:2309.01592
A. G. de G. Matthews, M. Rowland, J. Hron, R. E. Turner, Z. Ghahramani, Gaussian Process Behaviour in Wide Deep Neural Networks, ICLR 2018. arXiv:1804.11271
Y. Cho, L. K. Saul, Kernel Methods for Deep Learning, NeurIPS 2009.
An Introduction to Computational Learning Theory V: Classification Noise and Statistical QueriesTextbook
Motivation
Chapter 5 of Kearns and Vazirani, An Introduction to Computational Learning Theory (MIT Press, 1994, doi:10.7551/mitpress/3897.001.0001), asks what happens to PAC learning when the labels are unreliable. In the classification noise model of Angluin and Laird, each label returned by the oracle is flipped independently with a fixed probability η<1/2. The algorithms of Chapter 1 collapse at once: the elimination algorithm deletes a correct literal on the strength of a single mislabeled example, and the tightest-fit rectangle may not exist. The chapter's remedy is to learn from statistics: an algorithm that forms its hypothesis only from estimates of probabilities of simple events is insensitive to occasional wrong labels. Kearns's statistical query model makes this precise, replacing the example oracle by an oracle that returns the probability of any predicate of a labeled example to within a tolerance, and the main theorem (5.3) shows that every class learnable from statistical queries is PAC learnable in the presence of classification noise. The proof rests on a single identity, Equation (5.2), that expresses the true value of a statistical query in terms of three quantities that can each be estimated from noisy examples, and on the observation that a hypothesis's disagreement with the noisy label is an affine function of its true error, which lets the best of several candidate hypotheses be recognized without clean data.
Setting
The framework is that of Mission I. The noisy example law is that of (x,b) with x∼D and b=c(x) flipped with probability η. A statistical query is a predicate χ of a labeled example with value Pχ=Prx∼D[χ(x,c(x))=1]. The inputs split into X1, where the label matters to χ, and X2, where it does not; p1=D(X1) and D1 is D conditioned on X1. For conjunctions over {0,1}n, p0(z) is the probability that a literal z is set to 0 and p01(z) the probability that it is 0 on a positive example; z is significant if p0(z)≥ϵ/8n and harmful if p01(z)≥ϵ/8n.
the probabilities on the right being taken under the noisy oracle.
Milestones
The §5.2 analysis behind Theorem 5.2 (the conjunction of all significant, non-harmful literals has error at most ϵ/2); the product estimate bound of p. 115 (AB−2τ′≤A^B^≤AB+3τ′); the identity of p. 117 (γh=η+(1−2η)error(h)).
Significance
Equation (5.2) is the entire mechanism of noise-tolerant learning in the statistical query model: the noisy oracle cannot be de-noised example by example, but the probability of any predicate can be recovered exactly from noisy probabilities, because on the inputs where the label matters the noise acts as a known affine contraction and on the others it acts not at all. Together with the p. 117 identity, which turns hypothesis selection into a comparison of noisy disagreement rates, and the Chernoff bounds of Mission IV, it yields Theorem 5.3 and hence noise-tolerant algorithms for every class the book has learned so far (conjunctions, decision lists, k-CNF). The §5.2 analysis is the first statistical-query algorithm and shows the pattern: a hypothesis defined by thresholds on a few probabilities, with enough slack between the thresholds that estimates suffice. None of this is machine-checked. The formalization fixes the noisy example law on the platform's sample framework and proves the exact identities on which the noise-tolerant simulation depends.
Difficulty
Equation (5.2) is a computation with the pushforward of a product measure: one must express the noisy law on X1 as a mixture of the clean law and its label-flipped image, solve the affine relation for the clean probability, and combine with the restriction to X2, where the flipped and unflipped labels give the same value of χ; the degenerate case D(X1)=0, in which the conditional measure is zero and the first term vanishes, must be handled separately. The p. 117 identity is the same computation without the split. The §5.2 analysis is two union bounds over the 2n literals after the observation that a literal of the target is never harmful and that a literal of the hypothesis is never insignificant. The product lemma is elementary arithmetic with a case split at A<τ′.
Formalization scope
The noisy oracle is a measure on labeled examples obtained by mapping the product of D and a Bernoulli(η) coin; the conditional D1 is Mathlib's conditional measure; queries are arbitrary measurable predicates of a labeled example, with no tolerance or query-count bookkeeping. Theorem 5.3 itself, the definitions of efficient learnability from statistical queries (Definition 14) and of efficient noisy PAC learnability (Definition 13), Theorem 5.1, Theorem 5.2 as a statement about an algorithm with oracle access, and Corollary 5.4 are not stated: they quantify over query algorithms and their running times, for which this series has no model; the mission carries their exact probabilistic content. The error-propagation analysis of §5.4.2–5.4.3 with tolerance τ/27 and the guessing resolution Δ is not stated beyond the product lemma, since the factor 1/(1−2η) is not in [0,1] and the book's constant does not account for it. Hypotheses: 0≤η<1/2 for the decomposition, 0≤η≤1 for the disagreement identity, ϵ>0 for the conjunction analysis, all reals in [0,1] for the product lemma.
Trivializing readings are excluded: the decomposition is an exact identity for every measurable query, and the conjunction bound is for the exact thresholds ϵ/8n with the union bound's ϵ/2. Welcome contributions: the mixture representation of the noisy law, the restriction of a pushforward to X2, and the two union bounds.
Selected references
M. J. Kearns, U. V. Vazirani, An Introduction to Computational Learning Theory, MIT Press, 1994, Chapter 5. doi:10.7551/mitpress/3897.001.0001
D. Angluin, P. Laird, Learning from noisy examples, Machine Learning 2(4), 1988. doi:10.1007/BF00116829
M. Kearns, Efficient noise-tolerant learning from statistical queries, Journal of the ACM 45(6), 1998. doi:10.1145/293347.293351
M. Kearns, M. Li, Learning in the presence of malicious errors, SIAM Journal on Computing 22(4), 1993. doi:10.1137/0222052
An Introduction to Computational Learning Theory IV: Weak and Strong Learning, Boosting and Chernoff BoundsTextbook
Motivation
Chapter 4 of Kearns and Vazirani, An Introduction to Computational Learning Theory (MIT Press, 1994, doi:10.7551/mitpress/3897.001.0001), asks whether the PAC model's demand for arbitrarily small error and confidence is essential. A weak learning algorithm need only, with some fixed positive probability, output a hypothesis that beats random guessing by a fixed margin. Schapire's theorem, the chapter's main result, says that this apparently much weaker requirement is equivalent to the original one: any weak learner can be converted, by running it on carefully filtered distributions and combining its hypotheses by majority votes, into a strong learner. The construction is boosting, which became one of the most influential ideas in machine learning. The chapter proves the equivalence in two steps. Boosting the confidence is elementary: run the learner several times and validate. Boosting the accuracy is the substance: a modest procedure that combines three hypotheses, each with error at most β on its own distribution, into a majority with error at most g(β)=3β2−2β3<β, applied recursively until the error is driven below the target. The Chernoff bounds of the Appendix, the book's workhorse for estimating probabilities from samples, are what makes the validation steps rigorous.
Setting
The framework is that of Mission I. A class C is weakly learnable using H if for some advantage γ>0, confidence δ0>0 and sample size m, an algorithm outputs hypotheses in H that, for every target in C and every distribution, have error at most 1/2−γ with probability at least δ0; the algorithm's prediction L(S)(x) is a measurable function of the sample and the instance together, as it is for every algorithm. Given a hypothesis h1, the filtered distribution D2 gives weight 1/2 to the instances on which h1 errs and 1/2 to those on which it is correct, preserving relative weights within each part, and D3 is D conditioned on h1=h2; the modest procedure outputs majority(h1,h2,h3). Ternary majority trees over H are the closure of H under the majority of three. For confidence boosting, k independent samples yield k hypotheses, and a fresh sample selects the one with the fewest mistakes. Bernoulli trials are m independent coin flips with success probability p.
Formalization targets
Goal: Theorem 4.9
If C is weakly PAC learnable using measurable hypotheses in H, then C is PAC learnable using the class of ternary majority trees with leaves from H: for all ϵ,δ∈(0,1/2) some sample size and some algorithm outputting majority trees achieve error at most ϵ with probability at least 1−δ, for every target in C and every distribution.
Milestones
Theorem 9.2 (the additive and multiplicative Chernoff bounds); the two facts of §4.2 behind confidence boosting (independent runs all fail with probability at most (1−δ0)k; the fewest-mistakes selection loses at most γ with probability at least 1−2ke−mγ2/2); Lemma 4.1 (the modest procedure: error at most g(β)).
Significance
Theorem 4.9 is one of the landmark results of learning theory: it shows that the PAC model has no intermediate strength, that Occam learning, weak learning and strong learning coincide, and that the resources of a strong learner can be bounded polylogarithmically in 1/ϵ in memory and hypothesis size. Its constructive proof is the first boosting algorithm, ancestor of AdaBoost and of gradient boosting. Lemma 4.1 is the analytic core, a clean inequality about three hypotheses and three distributions in which the filtered distribution is exactly calibrated so that h1 has no advantage on it. The Chernoff bounds are the concentration inequalities invoked throughout the book, and their formalization on the product law of Bernoulli trials makes every later "estimate to within γ with confidence 1−δ" step reusable. None of these is machine-checked in this form; the boosting theorem in the sample-complexity sense is, to our knowledge, not formalized anywhere.
Difficulty
Lemma 4.1 is a computation with conditional measures: writing errorD of the majority as the weight of the instances on which h1 and h2 both err plus β3 times the weight of their disagreement, mapping weights under D2 back to D by the factors 2(1−β1) and 2β1 (Equation (4.1)), and maximizing the resulting polynomial in β1,β2,β3,γ1,γ2; the degenerate cases where a conditioning event is null must be handled separately. The Chernoff bounds require the exponential moment method on a finite product measure. The confidence-boosting facts are the product bound for independent blocks and Hoeffding plus a union bound. The goal is a genuine construction: from a large sample of D one must simulate the recursive algorithm Strong-Learn, whose calls to the weak learner on filtered distributions are served by rejection sampling from the remaining examples, bound the depth of the recursion by the growth of g−1 iterates (Lemma 4.2), bound the number of examples consumed at each node (Lemmas 4.3–4.7) and allocate the confidence over all the places the simulation can fail; then package the result as a deterministic function of a sample of fixed size. An alternative route is available: weak learnability with a fixed sample size forces a finite VC dimension (a class shattering a large set defeats any fixed-size learner on the uniform distribution over it), after which Theorem 3.3 gives a consistent strong learner; but its hypotheses lie in C, not in the majority trees over H, so it does not prove the stated conclusion.
Formalization scope
The weak-learning hypothesis is the book's with constants γ,δ0 in place of the inverse polynomials, which is what the definition says for a fixed class; hypotheses in H are required to be measurable, and the weak learner jointly measurable in the sample and the instance, because Strong-Learn runs it on distributions filtered through its own earlier outputs and the analysis integrates over the earlier samples (for an arbitrary function the combined failure event need not be measurable, and outer-measure bounds on separate runs do not combine); the conclusion is the book's hypothesis class, the majority trees over H, built as an inductive predicate. Filtered distributions use Mathlib's conditional measure, so that a null conditioning event yields the zero measure; Lemma 4.1 is stated for 0≤β≤1/2 and holds in those degenerate cases too. The confidence-boosting milestone states the two probabilistic facts rather than the composite algorithm, whose sample indexing across runs and validation is bookkeeping; the selection rule is any rule minimizing mistakes. Chernoff's bounds are stated with non-strict inequalities in the events, for 0≤p≤1 and 0<γ≤1. Running time, the recursion-depth and sample-size lemmas with unspecified constants (4.2–4.8), and Exercises 4.1–4.3 are not stated.
Trivializing readings are excluded: the weak-learning guarantee is uniform over all targets and distributions with an advantage strictly positive, the strong conclusion is for every ϵ,δ, and Lemma 4.1 requires all three error bounds on their respective distributions. Welcome contributions: Lemma 4.1 itself, the Hoeffding bound on the product law, and the rejection-sampling lemma that turns a sample of D into a sample of a filtered distribution.
Selected references
M. J. Kearns, U. V. Vazirani, An Introduction to Computational Learning Theory, MIT Press, 1994, Chapter 4 and Chapter 9. doi:10.7551/mitpress/3897.001.0001
R. E. Schapire, The strength of weak learnability, Machine Learning 5(2), 1990. doi:10.1007/BF00116037
Y. Freund, Boosting a weak learning algorithm by majority, Information and Computation 121(2), 1995. doi:10.1006/inco.1995.1136
W. Hoeffding, Probability inequalities for sums of bounded random variables, Journal of the American Statistical Association 58(301), 1963. doi:10.1080/01621459.1963.10500830
H. Chernoff, A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations, Annals of Mathematical Statistics 23(4), 1952. doi:10.1214/aoms/1177729330
Introduction to Multi-Armed Bandits XI: Bandits and Agents, Incentivized Exploration via Hidden ExplorationTextbook
Motivation
A recommendation system learns from the users it serves: the diner who tries a restaurant produces the review the next diner reads. Each user would rather exploit what is already known than explore for the benefit of those who come later, so a population of self-interested agents under-explores, and an alternative that looks bad on sparse early evidence may never be tried again even when it is the best. Chapter 11 of Slivkins, Introduction to Multi-Armed Bandits (arXiv:1904.07272), treats incentivized exploration: a principal who cannot force the agents but can recommend, and who, because it aggregates what earlier agents observed, knows more than any one of them. The question is whether recommendations alone can induce enough exploration to learn as fast as an ordinary bandit algorithm. The model is that of Kremer, Mansour and Perry (JPE 2014) and the results are those of Mansour, Slivkins and Syrgkanis (EC 2015, Operations Research 2020), specialized to two arms; the single-round problem is Bayesian persuasion in the sense of Kamenica and Gentzkow (AER 2011).
Setting
There are K arms and T rounds. A mean reward vector μ∈[0,1]K is drawn from a known priorP, and each pull of arm a yields a reward drawn from a known family Dμa with mean μa. In round t the principal recommends an arm rect; agent t, who knows the prior, the family, the algorithm and the round but not the past, sees only rect, chooses at, collects rt∼Dμat and leaves; the principal observes (at,rt). The chapter works with two arms, ordered so that the prior means satisfy μ10≥μ20, with a prior of finite support and finitely many reward values.
An algorithm is Bayesian incentive-compatible (BIC, Definition 11.4) if following its recommendation is in every agent's interest given what the agent knows: for every round t and arms a=a′ with Pr[rect=a,Et−1]>0,
E[μa−μa′∣rect=a,Et−1]≥0,(11.1)
where Et−1 is the event that all previous agents complied. A BIC algorithm is then an ordinary bandit algorithm whose recommendations are followed, and the run has the law of the Bayesian bandit of Chapter 3. Two contrasting policies frame the chapter. GREEDY reveals the history and lets agents exploit, at∈argmaxaE[μa∣Ht] (11.2); it is BIC and it fails. HiddenExploration (Algorithm 11.1) hides a little exploration in a lot of exploitation: on a signal sig, with probability ε it recommends a target arm atrg(sig), otherwise the arm maximizing E[μa∣sig], ties to arm 1. Its posterior gap is G=E[μ2−μ1∣sig]. RepeatedHE (Algorithm 11.2) runs it round after round with an arbitrary bandit algorithm ALG as the target: N0 initial rounds recommend arm 1; afterwards, with probability ε the round is an exploration round in which ALG chooses (and is fed the reward), and otherwise the exploitation branch recommends minargmaxaE[μa∣St], where St is the data of all exploration rounds so far (11.10). The quantity that governs everything is G1,n=E[μ2−μ1∣S1,n] (11.11), the posterior gap after n samples of arm 1, and Property (11.12), that Pr[G1,n>0]>0 for some n: arm 2 can appear better after enough samples of arm 1.
Formalization targets
Goal: Theorem 11.15
RepeatedHE with exploration probability ε>0 and N0 initial samples of arm 1 is BIC as long as
ε<31E[G⋅1{G>0}],G=GN0+1=E[μ2−μ1∣S1,N0],
for any bandit algorithm ALG and any horizon. The threshold depends on the prior alone.
Milestones
Theorem 11.7 (GREEDY never chooses arm 2 with probability at least μ10−μ20) and Corollary 11.8 (linear Bayesian regret of GREEDY under independent priors); Lemma 11.10 (HiddenExploration is BIC when ε≤31E[G1{G>0}]) with Claim 11.12 (the arm-2 side of the constraint suffices); Corollary 11.14 (RepeatedHE is BIC under the round-by-round condition); Theorem 11.19 (without Property (11.12) no BIC algorithm ever plays arm 2, ties to arm 1).
Significance
The results say when exploration can be incentivized at all and how. Theorem 11.7 shows that revealing everything is not a solution: the greedy dynamics gets stuck on arm 1 with a probability that does not shrink with T, and Corollary 11.8 turns that into Ω(T) Bayesian regret. Theorem 11.15 shows that a recommendation-only principal can induce any amount of exploration it wants, with ALG arbitrary, at a per-round rate ε fixed by the prior; Theorem 11.17 (stated with a proof sketch, and omitted here) then transfers ALG's regret to RepeatedHE up to the prior-dependent factors N0 and 1/ε, so O~(T) regret is attainable subject to incentives. Theorem 11.19 closes the picture: Property (11.12) is necessary as well as sufficient. Together they characterize which priors admit incentivized exploration and give an algorithm that works for all of them.
Nothing of this is machine-checked. The mission adds to the Bayesian layer of mission III (prior, posterior by Bayes' rule, Bayesian regret) the BIC constraint on a joint law, GREEDY as a policy, the single-round HiddenExploration on an abstract finite signal, and the law of RepeatedHE; all of it is reusable for the K-arm and the "explore all explorable arms" extensions of the literature review.
Difficulty
Theorem 11.7 is a martingale argument: the posterior gap along the history is a Doob martingale, the first round in which arm 2 is chosen is a bounded stopping time, and optional stopping gives E[Zτ]=μ10−μ20; all of this has to be set up on the joint law of (μ,HT) of mission III, where the posterior is defined by Bayes' rule and the identification with a conditional expectation is itself a theorem (posterior_eq_condProb). Lemma 11.10 is the heart of the chapter and is not a computation about rec: it works with F(E)=E[G1E], splits along the two branches, uses that the exploitation branch recommends arm 2 exactly when G>0, and closes with F(G>0)+F(G<0)=E[μ2−μ1]≤0; the only place where the analysis uses that both branches are functions of the signal is the step E[μ2−μ1∣rec=2]=E[G∣rec=2], and a formalization has to make that step explicit. Theorem 11.15 requires seeing each later round of RepeatedHE as a HiddenExploration with signal St, where ALG's choice is a randomized function of St, and then the monotonicity of E[Gt1{Gt>0}] in t, a two-line consequence of St+1 determining St that presupposes the posterior given St is the Bayes posterior of the exploration data alone, which is true because the exploration decisions do not depend on μ given that data. Corollary 11.8 needs the independence of the event "μ1<1−2α and arm 2 is never chosen" from μ2. Theorem 11.19 is an induction in which the inductive hypothesis is a probability-zero statement about all earlier rounds.
Formalization scope
Arms are Fin 2, the book's arm 1 being index 0; rounds are Fin T. The prior is a probability measure on mean vectors supported on a finite set F⊆[0,1]2, with μ10≥μ20 as a hypothesis; the reward family is mission III's RewardFamily (finitely many values, mean ν for ν∈[0,1]). BIC is defined on a joint law of (μ,record) of the run in which every agent complies, with the recommendation of each round read off the record; the compliance event Et−1 of (11.1) is the sure event of that law, which is the standard reading of "the agents believe all previous agents complied". For a bandit policy the law is mission III's jointMeasure. Conditional expectations are written as finite sums over F, so there are no integrals and no integrability side conditions; a posterior mean off the support is a junk 0 that never enters a theorem. GREEDY allows arbitrary tie-breaking; HiddenExploration's exploitation branch breaks ties toward arm 1 as Algorithm 11.1 does; the tie convention of Theorem 11.19 is the strict form of BIC for arm 2. The law of RepeatedHE is an explicit finitely supported measure, μ and record weighted by the prior times the product of the round probabilities (initial rounds forced to arm 1, then the ε-coin, ALG's kernel on its own history, or the exploitation arm, then Dμat); it is written this way because ALG is fed a history of variable length. Two conditions are stated exactly as printed: Lemma 11.10 with ε≤31E[G1{G>0}] (non-strict, checked at equality) and Theorem 11.15 with the strict inequality.
Trivializations are excluded: ε>0 throughout; the BIC condition is asserted only where the recommendation has positive probability, and the sums in it are over the finite support, so an unsatisfiable hypothesis cannot hide in a measure-zero set. Welcome contributions: the optional-stopping argument on jointMeasure, the identification of explPostMean with the conditional expectation given the exploration data, the Bayes-rule algebra behind Lemma 11.10, and the counting lemmas on heRecords.
Selected references
A. Slivkins, Introduction to Multi-Armed Bandits, Foundations and Trends in Machine Learning 12(1-2), 2019, Chapter 11. arXiv:1904.07272, doi:10.1561/2200000068
I. Kremer, Y. Mansour, M. Perry, Implementing the "Wisdom of the Crowd", Journal of Political Economy 122(5), 2014. doi:10.1086/676597
Y. Mansour, A. Slivkins, V. Syrgkanis, Bayesian Incentive-Compatible Bandit Exploration, Operations Research 68(4), 2020 (EC 2015). doi:10.1287/opre.2019.1919
E. Kamenica, M. Gentzkow, Bayesian Persuasion, American Economic Review 101(6), 2011. doi:10.1257/aer.101.6.2590
M. Sellke, A. Slivkins, The Price of Incentivizing Exploration: A Characterization via Thompson Sampling and Sample Complexity, Operations Research 71(5), 2023. doi:10.1287/opre.2022.2401
Wasserstein Distributionally Robust Optimization I: Kantorovich Duality and Strong Duality for the Worst-Case RiskTextbook
Motivation
Every data-driven decision problem faces the same trap. A decision-maker estimates a risk
functional R(P,ℓ)=EP[ℓ(ξ)] from a nominal distribution P^N built
from N training samples, then optimizes a loss function ℓ against P^N instead
of the unknown true distribution P. Because the optimizer adapts to the noise in P^N, the in-sample risk of the optimizer systematically understates its true, out-of-sample
risk — a phenomenon Smith and Winkler named the optimizer's curse (Smith & Winkler,
Management Science, 2006). The remedy explored here is to hedge against a whole
neighborhood of plausible distributions around P^N, rather than trusting the point
estimate. Kuhn, Mohajerin Esfahani, Nguyen and Shafieezadeh-Abadeh's INFORMS TutORials
chapter (2019) develops this neighborhood using the Wasserstein distance, and the present
mission formalizes its foundational duality theory: the machinery every later result in the
chapter (finite-sample guarantees, elliptical tractability, regularization) builds on.
Setting
Fix a norm ∥⋅∥ on a finite-dimensional real vector space E (representing
Rm). For p∈[1,∞), the type-p Wasserstein distance between two
Borel probability measures Q,Q′ on E is
where Π(Q,Q′) is the set of couplings of Q and Q′ — joint probability measures on
E×E whose marginals are Q and Q′. The optimal π can be read as a
transportation plan moving one pile of dirt (Q) into another (Q′) at minimum cost, which
is why Wp is also called the earth mover's distance; the underlying linear program was
formalized by Kantorovich (1942) after Monge's 1781 original.
Given N training samples ξ^1,…,ξ^N, the empirical distribution is
P^N=N1∑i=1Nδξ^i. Centered at P^N, the
Wasserstein ambiguity set of radius ε≥0 is
Bε,p(P^N)={Q∈P(Ξ):Wp(Q,P^N)≤ε},
where Ξ⊆E is a closed set known to contain the support of the true
distribution. The worst-case risk of a loss function ℓ is
Rε,p(P^N,ℓ)=Q∈Bε,p(P^N)supEQ[ℓ(ξ)],
and minimizing it over a class of admissible loss functions L is a
distributionally robust optimization problem. ε measures the estimation error
one insures against; a larger ambiguity set gives a more conservative (and more expensive)
guarantee.
This is the Lagrangian dual of the worst-case risk evaluation problem, with γ the
multiplier of the Wasserstein constraint Wp(Q,P^N)≤ε: it converts a
supremum over an infinite-dimensional space of measures into a one-dimensional minimization
of the Moreau-Yosida regularization ℓγ. Every tractability result later in the
chapter (finite convex reformulations, SDP relaxations) specializes this duality by choosing
a loss class for which ℓγ is computable.
Supporting dual representations of Wp — Theorems 1 and 2
These identify Wp as a linear program's strong dual (Theorem 1) and, for p=1,
specialize it to the Kantorovich-Rubinstein form (Theorem 2), which is what lets the
worst-case-risk analysis reason about Lipschitz loss functions directly.
These are the tractable, easily-computed bracket that Theorems 7 and 10 later show is tight
in important special cases.
Exact case — Theorem 10
Ξ=Rm,ℓ convex,p=1⟹Rε,1(P^N,ℓ)=R(P^N,ℓ)+εLip(ℓ)
Theorem 5's inequality becomes exact under convexity — the cleanest closing corollary of the
duality theory, obtained from Theorem 7 by evaluating the Moreau-Yosida regularization of a
convex function explicitly.
Significance
Theorem 7 is the hinge on which the entire computational program of Wasserstein
distributionally robust optimization turns: every tractable reformulation in the source
chapter (piecewise-concave losses via conic duality, quadratic losses via semidefinite
programming, the shrinkage-estimator connection) is obtained by substituting a specific loss
class into the right-hand side of Theorem 7 and showing the resulting Moreau-Yosida
regularization is computable. Kuhn et al. themselves derive it as a corollary of Blanchet
& Murthy (2019) and Gao & Kleywegt (2016) for the empirical case, generalized to Polish
spaces by Blanchet & Murthy and Gao & Kleywegt independently — the paper cites [12] and [37]
for the general statement. Formalizing it is what makes every later, more computational
result in the chapter — the ones a solver is more likely to reach for next — rest on a
mechanically verified foundation rather than a citation chain.
Status. The mathematical result is well established (multiple independent published
proofs cited above); nothing here is open research. What this mission contributes is the
first machine-checked formal statement of the duality theorem and its supporting dual
representations (Theorems 1, 2, 5, 6, 10) on the Prove2Me platform — none of Wp's dual
representation, the Wasserstein ambiguity set, or the worst-case risk functional exist there
prior to this mission (see Formalization scope).
Difficulty
The obvious proof strategy — write down the Lagrangian of the semi-infinite program (6),
swap the order of the outer supremum over Q and the inner minimization over the multiplier
γ, and invoke ordinary Lagrangian strong duality — fails because (6) is an infinite-
dimensional linear program over measures, not a finite convex program: there is no compact
feasible set or Slater point in a form that ordinary finite-dimensional duality applies to
directly. The actual proof goes through the dual representation of the Wasserstein distance
itself (Theorem 1, which is why it is a prerequisite milestone), reformulating the
constraint Wp(Q,P^N)≤ε via its own dual variables and swapping the
resulting sup-inf using minimax theorems for semi-infinite programs, not ordinary Lagrangian
duality for finite programs.
Formalization scope
E is a generic finite-dimensional real normed space (NormedAddCommGroup, NormedSpace ℝ,
Borel-measurable), representing Rm with the paper's arbitrary fixed norm as a
parameter rather than fixing the Euclidean norm. A coupling is formalized directly via
MeasureTheory.Measure.map: π.map Prod.fst = Q ∧ π.map Prod.snd = Q'. Constrained
infima/suprema (over couplings, over the ambiguity set, over Lipschitz test functions, over
perturbation matrices) use Mathlib's guarded-binder idiom ⨅ x (_ : P x), f x, which
correctly returns ⊤ (resp. ⊥) outside the feasible set rather than a finite junk
value.
Two deliberate, disclosed conventions keep the extremal-value definitions faithful without
extended-real integration machinery, both recorded in MODERATION_NOTES.md:
worstCaseRisk and the dual representations (Theorems 1, 2) are valued in EReal,
not ℝ, so an unbounded supremum is recorded as +∞ rather than collapsed to
Mathlib's real-valued junk value 0 on an unbounded family.
The goal theorem (7) and its Moreau-Yosida regularization restrict the loss function to
bounded continuous ℓ (BoundedContinuousFunction E ℝ), narrower than the paper's
general upper-semicontinuous, P^N-integrable loss class L (Assumption
1). This keeps ℓγ(ξ)=supz∈Ξℓ(z)−γ∥z−ξ∥p a finite real
number for every nonempty Ξ, so the right-hand side's Bochner integral is well-posed;
the milestones (Theorems 5, 6, 10) keep the more general real-valued (not necessarily
bounded) loss class, since their statements do not require evaluating a pointwise
supremum over Ξ.
Ξ is required closed in Theorems 5, 6 and 7, matching the paper's own standing
assumption (p. 6: "we let Ξ⊆Rm be a closed set that is known to
contain the support of P") for the whole worst-case-risk framework, which is used
silently in the paper wherever a theorem takes Ξ as an argument but was not carried
into these theorems' own hypothesis lists in an earlier draft.
The goal theorem (7) additionally requires P^N itself supported on Ξ
(P^N(Ξc)=0, the same "supported on Ξ" convention ambiguitySet uses for
Q∈P(Ξ)), which the paper's framework presupposes for the nominal
distribution throughout §2. Combined with ℓ bounded, this makes ℓγ bounded
on the full-measure set Ξ (above by supℓ unconditionally, below by ℓ(ξ)
itself via z=ξ for ξ∈Ξ), which is what makes the right-hand side's integral
genuinely well-posed rather than liable to Mathlib's non-integrable junk value 0.
There is no trivializing formalization risk from a vacuous hypothesis: Ξ.Nonempty and
0 < N are both required exactly where the paper's own indexing and support assumptions
require them, and every extremal value uses the extended-real convention above rather than a
convention that would make an inequality vacuously true.
No definition in this mission exists on the platform prior to this series (GET /theorems?q=Wasserstein, q=Kantorovich, q=optimal transport, q=coupling return only
unrelated discrete/finite-type constructions); all seven definitions and six theorems are
drafted fresh. WassersteinDRO.Duality.wassersteinDistance, .ambiguitySet and
.worstCaseRisk are the substrate every later mission in this five-part series (Gelbrich
tractability, finite-sample guarantees, regularization, shrinkage estimation) either imports
directly or redefines locally per the series' reuse rule.
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, 130–166.
https://doi.org/10.1287/educ.2019.0198
Villani, C. (2009). Optimal Transport: Old and New. Springer. (Cited as [108] for
Theorems 1 and 2.)
Smith, J. E., & Winkler, R. L. (2006). The optimizer's curse: Skepticism and postdecision
surprise in decision analysis. Management Science, 52(3), 311–322.
https://doi.org/10.1287/mnsc.1050.0451
Gao, R., & Kleywegt, A. J. (2016). Distributionally Robust Stochastic Optimization with
Wasserstein Distance. arXiv:1604.02199.
Blanchet, J., & Murthy, K. (2019). Quantifying Distributional Model Risk via Optimal
Transport. Mathematics of Operations Research, 44(2), 565–600.
https://doi.org/10.1287/moor.2018.0936
Foundations of Machine Learning XIV: Finite Markov Decision Processes and Bellman's EquationsTextbook
Motivation
Reinforcement learning formalizes a scenario supervised learning cannot: an agent that
actively interacts with an environment, choosing actions that change both the state it
observes next and the reward it receives, rather than passively receiving an i.i.d. labeled
sample. Every practical treatment of this scenario — from classical dynamic programming to
modern deep reinforcement learning — is built on the Markov decision process (MDP), a model
in which the effect of an action depends only on the current state, not on the full history
that led to it. Two questions define the theory this mission covers: given a fixed way of
acting (a policy), what value does it obtain, and how is that value actually computed rather
than merely characterized as the solution of a fixed-point equation? Mohri, Rostamizadeh and
Talwalkar's chapter 17 answers both for the stationary, infinite-horizon discounted case, and
this mission targets its two central results: that a fixed policy's value is not just
characterized but uniquely determined by a linear system with an explicit closed-form
solution (Theorem 17.10), and that the optimal value function — obtained instead by choosing
the best action at every state — can be computed by an iterative algorithm guaranteed to
converge regardless of where it starts (Theorem 17.11).
Setting
A (finite) Markov decision process consists of a finite set of states S, a finite set of
actions A, a transition kernel P[s′∣s,a] giving the distribution over the next state
s′ after taking action a at state s, and an expected reward E[r(s,a)] for that
transition. A (stationary) policyπ:S→Δ(A) assigns each state a distribution over
actions — possibly, but not necessarily, a point mass on a single action. Fixing π turns the
MDP into an ordinary Markov chain on S: at each step the agent is at some state s, draws
a∼π(s), receives (expected) reward E[r(s,a)], and moves to a state drawn from
P[⋅∣s,a]. For a discount factor γ∈[0,1), the value of π at s is the
expected discounted sum of future rewards starting from s,
Vπ(s)=Eat∼π(st)[t=0∑+∞γtr(st,at)s0=s],
and the state-action value functionQπ(s,a) is the analogous quantity for taking a
at s and then following π. Marginalizing the raw kernel and reward over the mixed action
π(s) gives the induced transition matrix Ps,s′=P[s′∣s,π(s)]=∑aπ(s)(a)P[s′∣s,a] and induced reward vector Rs=E[r(s,π(s))]=∑aπ(s)(a)E[r(s,a)] — the objects that turn π's value into a genuinely linear-algebraic quantity. A
policy π∗ is optimal if Vπ∗(s)≥Vπ(s) for every policy π and every
state s; write V∗ for its value function.
Formalization targets
Theorem 17.10 (goal). For a finite MDP and a fixed policy π, the matrix I−γP
(with P the policy-induced transition matrix) is invertible, and π's value function is the
unique solution of the Bellman equations, given in closed form by
Vπ=(I−γP)−1R.
Proposition 17.9 (milestone). The value function itself satisfies the linear system that
Theorem 17.10 solves:
Theorem 17.7 (milestone). A policy π is optimal if and only if it places probability
only on Qπ-maximizing actions: for every (s,a) with π(s)(a)>0, a∈argmaxa′Qπ(s,a′).
Theorem 17.11 (milestone). The Bellman optimality operator Φ, [Φ(V)](s)=maxa{E[r(s,a)]+γ∑s′P[s′∣s,a]V(s′)}, is a γ-contraction for
∥⋅∥∞; consequently, for any starting vector V0, the value-iteration
sequence Vn+1=Φ(Vn) converges to a fixed point of Φ.
Significance
Theorem 17.10 is what makes policy evaluation on a finite MDP an exact, finite computation
rather than an infinite limit: instead of summing an infinite discounted series or solving an
implicit fixed-point equation numerically, a single ∣S∣×∣S∣ matrix inversion gives the
policy's value at every state simultaneously. It is also the base case every planning algorithm
in the chapter builds on: policy iteration alternates optimizing a policy with exactly this
evaluation step. Theorem 17.11 gives the complementary guarantee for the harder problem of
finding the optimal value function directly, without fixing a policy first: value iteration
converges from any starting point, with a convergence rate (O(log(1/ϵ)) iterations for
ϵ-accuracy) that follows from the same contraction argument. Together, the two results
are the mathematical content behind why dynamic-programming planning for finite MDPs is
tractable at all — the discount factor γ<1, not any structural assumption on rewards or
transitions, is what buys both the uniqueness in Theorem 17.10 and the convergence in Theorem
17.11. Formalizing them requires reproducing this linear-algebraic and metric content precisely,
not just asserting the conclusions: an invertibility claim asserted without the operator-norm
argument, or a convergence claim without the contraction property, would state something true
by fiat rather than the book's actual result. No faithful prior art exists on the platform for
this exact model (see Formalization scope).
Difficulty
The obvious shortcut for Theorem 17.10 is to assert I−γP is invertible without proof —
true, but not what the book does, and not informative about why it holds. The genuine content
is that P, being row-stochastic (every row of P sums to exactly 1, since π(s) and
P[⋅∣s,a] are both proper distributions), has operator norm ∥P∥∞=1
exactly, so ∥γP∥∞=γ<1 strictly; this rules out 1 as an eigenvalue
of γP, which is exactly what invertibility of I−γP requires. The same
γ<1 fact, applied differently, drives Theorem 17.11: showing Φ is γ-Lipschitz
requires bounding Φ(V)(s)−Φ(U)(s) by comparing the maximizing action for V against
the same action's value under U (not U's own maximizer), since the two suprema need not be
attained at the same action — a step easy to state incorrectly as a direct comparison of two
maxima. Both theorems fail if γ=1 is allowed: the discounted setting's central asset, a
strict contraction, disappears exactly at that boundary.
Formalization scope
States and actions are modeled as finite types (Fintype S, Fintype A); the raw kernel and
reward P : S → A → S → ℝ, Er : S → A → ℝ are unconstrained functions, with IsTransitionKernel
asserting the required distribution property explicitly rather than assuming it silently. A
policy is π : S → A → ℝ with IsPolicy π asserting π s is a distribution over A for every
s — deliberately not π : S → A or a PMF-valued function, since Theorem 17.7's own
quantifier ("for any pair (s,a) with π(s)(a) > 0") requires treating π(s) as a genuine
mixture. PolicyValue is defined as the actual infinite discounted expectation (via an explicit
state-occupation-distribution recursion), not as the Bellman fixed point — so that Proposition
17.9 (the value function satisfies the linear system) and Theorem 17.10 (that system has a
unique, invertible-matrix solution) are both non-vacuous claims about the same object, rather
than one being definitionally true of the other. The trivializing formalization this rules out
is asserting IsUnit (1 - γ • P) as a bare hypothesis, or defining V_πas(1-γP)⁻¹R and
calling the resulting identity a theorem; both would erase the mission's actual content.
Two platform modules model related MDPs (BertsekasSSPModel, a stochastic-shortest-path model
with a termination-probability deficit rather than exact row-stochasticity, and
FoundationsRL.RLBasics, a finite-horizon episodic model indexed by layer) — neither
specializes exactly to this chapter's stationary, always-continuing, infinite-horizon discounted
convention, so every definition here is drafted fresh rather than imported. This chunk covers
§17.2–17.4.2 (the MDP model, policy value, Bellman's equations, value and policy iteration);
§17.4.3 (the linear-programming formulation) and §17.5 (stochastic-approximation learning
algorithms — TD(0), Q-learning, SARSA) are out of scope, since they require a
stochastic-approximation convergence substrate this mission does not build.
Selected references
Mohri, M., Rostamizadeh, A., and Talwalkar, A. Foundations of Machine Learning, 2nd ed.,
chapter 17. MIT Press, 2018.
Bellman, R. Dynamic Programming. Princeton University Press, 1957.
Puterman, M. L. Markov Decision Processes: Discrete Stochastic Dynamic Programming. Wiley,
1994.
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.
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 X: Regression and Rademacher Complexity BoundsTextbook
Motivation
Every generalization bound presented so far in this series is for classification, where the
error of a prediction is binary (correct or not). Regression asks a different question:
predictions are real-valued, and error is measured by the magnitude of the deviation from
the true label, via a loss function L. Chapter 11 develops generalization theory for bounded
regression, showing that the same two complexity measures used for classification —
Rademacher complexity and a VC-dimension analogue — extend naturally, once the loss function
itself is folded into the machinery via a Lipschitz-contraction argument (Rademacher route) or
a reduction to classification via level-set thresholding (pseudo-dimension route).
Setting
A regression hypothesis h:X→ℝ is scored by a loss L:ℝ×ℝ→ℝ against a joint distribution D
on X×ℝ (the stochastic scenario, since regression labels are rarely exactly reproducible);
R(h) = E_{(x,y)~D}[L(h(x),y)] (Eq. 11.1) and R̂_S(h) = (1/m)∑L(h(x_i),y_i) (Eq. 11.2). For
a finite hypothesis set, Theorem 11.1 gives a Hoeffding/union-bound guarantee directly, the
regression analogue of chunk 02-pac's finite-hypothesis bound. For infinite H, §11.2.2
develops a Rademacher-complexity route: Proposition 11.2 shows that if L is µ-Lipschitz in
its first (predicted-value) argument, the Rademacher complexity of the loss-composed family
G = {(x,y)↦L(h(x),y) : h∈H} is controlled by µ times H's own Rademacher complexity, via
Talagrand's contraction lemma (chunk 05-svm's Lemma 5.7); Theorem 11.3 combines this with
chunk 03's Theorem 3.3 to give the chapter's headline bound. §11.2.3 develops an independent,
purely combinatorial route: pseudo-dimension (Definition 11.5), a real-valued analogue of
VC-dimension defined via threshold-witnessed shattering (Definition 11.4, restated via its own
Eq. 11.3 as the VC-dimension of a thresholded indicator family); Theorem 11.8 gives a
pseudo-dimension generalization bound by reducing regression to a family of classification
problems (one per threshold t), using the tail-integral identity Eq. 11.5.
Formalization targets
Theorem 11.1 (milestone). For L bounded by M and H finite: for any δ>0, with
probability at least 1-δ, for all h∈H: R(h) ≤ R̂_S(h) + M√((log|H|+log(1/δ))/(2m)).
Proposition 11.2 (milestone). For L non-negative, bounded by M, µ-Lipschitz in its
first argument: for any sample S, R̂_S(G) ≤ µR̂_S(H).
Theorem 11.3 — the mission's goal. Under Proposition 11.2's hypotheses on L: for any
δ>0, with probability at least 1-δ, for all h∈H: E[L(h(x),y)] ≤ (1/m)∑L(h(x_i),y_i) + 2µR_m(H) + M√(log(1/δ)/(2m)), and also with 2µR̂_S(H) + 3M√(log(2/δ)/(2m)).
Theorem 11.8 (milestone). For Pdim(G)=d, L non-negative bounded by M: for any
δ>0, with probability at least 1-δ over a sample of size m, for all h∈H: R(h) ≤ R̂_S(h) + M√(2d log(em/d)/m) + M√(log(1/δ)/(2m)).
Significance
Theorem 11.3 is the chapter's own choice of headline result (§11.2's stated goal is to show
"how the Rademacher complexity bounds of theorem 3.3 can be used to derive generalization
bounds for regression"), and its proof genuinely reuses two pieces of prior machinery from
this series — chunk 03's Theorem 3.3 and chunk 05's Talagrand's-lemma-style contraction —
combined via a new observation (Proposition 11.2) specific to loss-composed families, not a
restatement of either. Theorem 11.8 is the chapter's second, structurally independent
technique: its em/d bound parallels chunk 03's Corollary 3.19 (both ultimately reduce to a
VC-dimension-style growth-function argument), but the reduction itself — regression to a
continuum of threshold classification problems, via the Lebesgue-integral tail identity Eq.
(11.5) applied to |R(h)-R̂_S(h)| — is genuinely new content for this book, and pseudo-dimension
has no prior art on the platform or in Mathlib. No prior art exists for this chapter's overall
content either: GET /theorems?q=generalization%20bound%20regression and
GET /theorems?q=pseudo-dimension both return zero hits.
Difficulty
Proposition 11.2's proof needs Talagrand's contraction lemma applied with the Lipschitz
constant taken in the first argument of L only — the predicted value h(x_i), holding the
true label y_i fixed — exactly the pitfall BRIEF.md names: a loss Lipschitz in the wrong
argument, or in both arguments jointly, would not license this step. Theorem 11.8's proof is
the chapter's most involved: it defines, for every h∈H and threshold t≥0, a classifier
c(h,t):(x,y)↦1_{L(h(x),y)>t}, bounds |R(h)-R̂_S(h)| by M·sup_{t∈[0,M]}|R(c(h,t))- R̂_S(c(h,t))| via the tail-integral identity, and then applies a VC-dimension-style
classification bound (Corollary 3.19) to the family of thresholded classifiers — whose
VC-dimension is, by Eq. (11.3), exactly Pdim(G) by construction. A formalization that
conflated pseudo-dimension with ordinary VC-dimension, or reused chunk 03's HasVCDim
definition by relabeling, would misrepresent this chapter's genuinely different (real-valued,
threshold-witnessed) combinatorial notion — precisely the pitfall BRIEF.md flags.
Formalization scope
Y := ℝ throughout (the book's own "Y a measurable subset of ℝ"), a harmless
simplification consistent with every hypothesis, loss and Lipschitz condition in this chapter
being stated for real-valued scores and labels. EmpiricalRademacherComplexity/
RademacherComplexity restate chunk 03-rademacher-vc's Definitions 3.1/3.2 locally, since a
draft item cannot import another chunk's draft module. Shatters/PseudoDim are formalized
via the book's own equivalent reformulation (Eq. 11.3, the thresholded-indicator form), rather
than the sign-function form of Definition 11.4 directly, since the two coincide except at a
measure-zero boundary the book itself does not address; PseudoDim mirrors chunk 03's
HasVCDim Prop-valued pattern (does not cover Pdim(G)=+∞; every consuming theorem takes it
as an explicit hypothesis) but is a structurally distinct definition built on Shatters, never
a relabeling of HasVCDim, per BRIEF.md's pitfall note. Proposition 11.2's and Theorem
11.3's Lipschitz hypothesis (hLlip) is stated with the true label y' universally quantified
outside the two-point comparison y1, y2 (the predicted values), matching "for any fixed
y' ∈ Y, y ↦ L(y,y') is µ-Lipschitz" exactly — Lipschitzness in the first argument only,
per BRIEF.md's pitfall note. RademacherComplexity (Measure.map Prod.fst D) H m gives the
book's R_m(H) (H's Rademacher complexity under the marginal sampling distribution of the
inputs x, i.e. D's first marginal). No numerical constant is altered from the book in any
of the four theorems.
Not formalized: the L_p-loss worked example following Theorem 11.3's proof (an instantiation
of the general theorem for a specific loss family, not a separate numbered theorem); Theorem
11.6 and Theorem 11.7 (worked pseudo-dimension examples for hyperplanes and vector spaces,
background/illustration rather than the chapter's general machinery — drafting only these
examples instead of the general Theorem 11.8 would be this chapter's trivializing
formalization); the two-sided variant of Theorem 11.1 mentioned immediately after its proof
(an unnumbered remark, not a separately displayed/numbered theorem); and all of §11.3 (linear
regression, kernel ridge regression, SVR, Lasso and their online variants), which is
applications-heavy per BRIEF.md's chapter restriction to §11.1-11.2.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 11 (§11.1-11.2).
D. Haussler, "Decision theoretic generalizations of the PAC model for neural net and other
learning applications," Information and Computation 100(1), 1992 (pseudo-dimension's
origin).
D. Pollard, Convergence of Stochastic Processes, Springer, 1984 (the tail-integral
identity Eq. 11.5's classical antecedent).
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).
High-Dimensional Statistics IX: Nuclear-Norm Regularization for Low-Rank Matrix RegressionTextbook
Motivation
Many estimation problems are naturally posed over matrices rather than vectors: recommender
systems (Netflix-style matrix completion), multivariate regression with correlated responses,
vector autoregressive time series, and phase retrieval all reduce to estimating an unknown
matrix Θ∗ that is low-rank, or well approximated by one. A rank constraint alone makes
the natural least-squares estimator non-convex and generally intractable; replacing it with the
nuclear norm — the sum of the matrix's singular values, the tightest convex surrogate for rank
— yields a tractable semidefinite program. Wainwright's High-Dimensional Statistics (2019),
Chapter 10, shows that this substitution costs nothing statistically: nuclear-norm-regularized
least squares achieves error rates matching what one could hope for even knowing the rank in
advance, by specializing Chapter 9's general decomposable-regularizer framework (mission
09-decomposability) directly to the nuclear norm.
Setting
For matrices A,B∈Rd1×d2, the trace inner product is
⟨⟨A,B⟩⟩:=trace(ATB)=∑j1,j2Aj1j2Bj1j2
(Eq. 10.1), inducing the Frobenius norm∥∣A∣∥F. Given design matrices
X1,…,Xn∈Rd1×d2 and responses yi=⟨⟨Xi,Θ∗⟩⟩+wi, the observation operatorXn(Θ):=(⟨⟨Xi,Θ⟩⟩)i=1n and its adjoint
Xn∗(u):=∑iuiXi (Eqs. 10.2-10.3) are the matrix analogs of a vector design
matrix and its transpose. The nuclear norm∥∣Θ∣∥nuc:=∑jσj(Θ)
(Eq. 10.5) — the sum of singular values — is a decomposable regularizer (in the sense of
Chapter 9) with respect to the subspace pair spanned by the top singular vectors of any target
matrix, and its dual norm (Table 9.1) is the ℓ2-operator (spectral) norm∥∣⋅∣∥2. The estimator under study is nuclear-norm-regularized least squares,
Suppose Xn satisfies the restricted strong convexity condition (10.17),
∥Xn(Δ)∥22/(2n)≥κ/2∥∣Δ∣∥F2−c0nd1+d2∥∣Δ∣∥nuc2 for all Δ, with κ>0,
c0≥0. Conditioned on the good event G(λn)={∥∣n1∑iwiXi∣∥2≤λn/2}, any optimal Θ^ satisfies, for any r∈{1,…,d′} with
r≤κn/(128c0(d1+d2)),
Under the alternative Φ∗-curvature condition (10.20) (a curvature bound on the gradient
map rather than the Taylor error), with rank(Θ∗)<κ/(64τn): conditioned
on G(λn)={∥∣n1Xn∗(w)∣∥2≤λn/2}, any optimal
Θ^ satisfies ∥∣Θ^−Θ∗∣∥2≤32λn/κ — an
operator-norm bound the book notes is, in conjunction with the cone-like constraint (10.15),
strictly stronger than Proposition 10.6's Frobenius-norm bound.
Significance
Proposition 10.6 is this chapter's direct payoff from Chapter 9's general machinery: it shows
that the deterministic backbone of the Lasso's guarantee (mission 07-sparse-linear) extends
essentially verbatim to the matrix setting, with the sparsity level s replaced by the target
rank r and the ambient dimension d replaced by d1+d2 — exactly the "degrees of freedom"
scaling one would predict by counting the parameters needed to specify a rank-r matrix. Every
one of the chapter's later corollaries (matrix compressed sensing, multivariate regression,
matrix completion) is obtained by verifying the restricted strong convexity condition (10.17)
holds with high probability for a specific random design, then reading the rate directly off
Proposition 10.6 — the same two-step recipe Chapter 9's own Theorem 9.19 established abstractly.
Proposition 10.7's operator-norm bound is what subsequently controls the individual singular
values of the estimation error, needed for exact-rank-recovery guarantees.
Difficulty
Both results are direct specializations of Chapter 9's general oracle inequalities (Theorem
9.19 and Theorem 9.24 respectively) to the nuclear norm as regularizer and the Frobenius/operator
norm pair, so their formalization difficulty lies almost entirely in getting the matrix-specific
objects right rather than in new proof machinery: the nuclear norm requires an actual notion of
singular values (realized via the eigenvalues of the Gram matrix ΘTΘ, using
Mathlib's Hermitian-matrix spectral theorem), the operator norm requires the correct rectangular
generalization of the symmetric-matrix Rayleigh-quotient characterization used in mission
08-pca, and the restricted-strong-convexity and curvature conditions must be instantiated
against the correctly-adjointed observation operator Xn∗. A further subtlety is
keeping Proposition 10.6's Frobenius-norm conclusion and Proposition 10.7's operator-norm
conclusion cleanly distinct — the book itself warns against conflating the norms used across
different chapters of Part II (the vector ℓ2-norm of chunks 07-sparse-linear/08-pca
versus the matrix Frobenius and operator norms here).
Formalization scope
Scope cut, disclosed here and in STATUS.md.BRIEF.md recommends Corollary 10.10 (the
sample-complexity bound for the Σ-Gaussian random matrix ensemble) as the goal theorem.
Corollary 10.10 is a genuinely probabilistic statement — it asserts a bound holding "with
probability at least 1−2e−2nδ2" over n i.i.d. draws of design matrices from a
Σ-Gaussian ensemble (Theorem 10.8's own high-probability restricted-strong-convexity
certification for that ensemble) — and formalizing it faithfully would require a genuine
multivariate-Gaussian-measure infrastructure on matrix space (a probability space, an i.i.d.
sequence of Σ-covariance-structured Gaussian matrices, and Mathlib's measure-theoretic
probability API) that is disproportionate to this mission's time budget, and orthogonal to what
Chapter 10 itself contributes (the chapter's own text stresses that Propositions 10.6 and 10.7
are the chapter's deterministic core, with probability entering only in Section 10.3's
ensemble-specific certification — precisely mirroring chunk 09-decomposability's own
"Theorem 9.19 is actually a deterministic result" framing). This mission instead takes
Proposition 10.6 as its goal — explicitly named in BRIEF.md's own candidate list as "the
nuclear-norm oracle inequality, an explicit corollary of Theorem 9.19" — the natural, tractable,
still highly citable deterministic title result of Section 10.2, together with its companion
Proposition 10.7. Theorem 10.8 (the Σ-Gaussian ensemble's RSC certification), Corollary
10.9 (noiseless exact recovery) and Corollary 10.10 itself are left for a future mission with a
dedicated probability-theory budget. The cone-like constraint (Eq. 10.15) — whose own faithful
statement requires the same explicit subspace-pair machinery
(M(Ur,Vr),Mˉ(Ur,Vr)) chunk 09-decomposability built for the
general theory — is similarly left out, since Propositions 10.6 and 10.7's own numbered
statements never expose these subspaces directly (only their proofs do, via instantiating
Theorem 9.19/9.24). singularValues and nuclearNorm are noncomputable, defined via
Mathlib's Hermitian-matrix eigenvalue spectral theorem; c0 ≥ 0 and λn > 0 are made explicit,
matching this book's running conventions for RSC tolerance constants and regularization weights
(see MODERATION_NOTES.md).
Selected references
Wainwright, M. J. High-Dimensional Statistics: A Non-Asymptotic Viewpoint. Cambridge
University Press, 2019. Chapter 10. DOI: 10.1017/9781108627771.
Negahban, S., Wainwright, M. J. "Estimation of (near) low-rank matrices with noise and
high-dimensional scaling." Annals of Statistics, 39(2), 2011, 1069–1097.
Recht, B., Fazel, M., Parrilo, P. A. "Guaranteed minimum-rank solutions of linear matrix
equations via nuclear norm minimization." SIAM Review, 52(3), 2010, 471–501.
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 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
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
Foundations of Machine Learning V: Kernel Methods and the Representer TheoremTextbook
Motivation
Linear methods like SVMs work only when the classes are linearly separable, but most real
data is not. Chapter 6 shows how to get non-linear decision boundaries for free: replace the
input space's inner product with a kernelK that implicitly computes an inner product in a
(possibly very high- or infinite-dimensional) feature space, without ever explicitly computing
the feature mapping. This works for any positive definite symmetric (PDS) kernel — and the
chapter's central theorem shows that such a kernel always induces a genuine Hilbert space (the
reproducing kernel Hilbert space, RKHS) in which the kernel is literally an inner product. The
chapter's capstone, the representer theorem, then shows that a broad class of optimization
problems over this (possibly infinite-dimensional) Hilbert space always has a solution
expressible as a finite linear combination of kernel evaluations at the training points —
turning an infinite-dimensional problem into a finite, m-dimensional one.
Setting
A kernel K:X×X→R is PDS (Definition 6.3) if for every finite sample
{x1,…,xm}⊆X, the Gram matrix [K(xi,xj)] is symmetric positive
semidefinite. Theorem 6.8 shows every PDS kernel is an inner product K(x,x′)=⟨Φ(x),Φ(x′)⟩ in some Hilbert space H (the RKHS), which further has the
reproducing propertyh(x)=⟨h,K(x,⋅)⟩ for every h∈H — evaluating h
at a point is itself an inner product with the kernel section at that point. Theorem 6.10
shows PDS kernels are closed under sum, product, tensor product, pointwise limit, and
power-series composition, letting complex kernels (Gaussian, and many others) be built from
simple ones (polynomial kernels) without re-verifying positive-semidefiniteness from scratch.
Section 6.3's representer theorem (Theorem 6.11) then considers minimizing, over h∈H, an
objective F(h)=G(∥h∥H)+L(h(x1),…,h(xm)) that depends on h only through its norm
and its values at m fixed points.
Formalization targets
Theorem 6.8 (RKHS existence, milestone). For a PDS kernel K, there exist a Hilbert space
H and Φ:X→H with K(x,x′)=⟨Φ(x),Φ(x′)⟩, and H has the
reproducing property h(x)=⟨h,K(x,⋅)⟩ for all h∈H, x∈X.
Theorem 6.10 (closure properties, milestone). PDS kernels are closed under sum, product,
tensor product, pointwise limit, and power-series composition with non-negative coefficients.
Theorem 6.11 — the mission's goal. For any non-decreasing G:R→R and any
loss L:Rm→R∪{+∞}, argminh∈HG(∥h∥H)+L(h(x1),…,h(xm)) admits a solution h⋆=∑i=1mαiK(xi,⋅); if G
is increasing, every solution has this form.
Significance
Theorem 6.11 is the chapter's payoff and one of the most widely used structural results in
kernel methods: it explains, in one general statement covering SVMs, kernel ridge regression,
Gaussian process MAP estimation and many other algorithms simultaneously, why the dual
(finite, m-coefficient) formulation always suffices — the RKHS's infinite dimensionality
never has to be confronted directly. Theorem 6.8 is the structural fact the whole chapter (and
every later kernelized algorithm in the book, chapters 9-11, 15) depends on: without it, "PDS
kernel" would be a purely combinatorial condition on Gram matrices with no guarantee it
corresponds to any actual inner product. No prior art on the Prove2Me platform is faithful to
any of this chapter's content: GET /theorems?q=Representer theorem and q=reproducing kernel return no faithful match (one unrelated hit concerns a Gaussian-measure reproducing
kernel in a different, probabilistic context, not this chapter's PDS-kernel/RKHS
construction). All six items are drafted fresh.
Difficulty
Theorem 6.8's proof is a genuine construction: define H0 as finite linear combinations of
kernel sections Φ(x)=K(x,⋅), define an inner product on H0 using K itself,
verify it is well-defined (independent of the representation), positive semidefinite (via the
PDS hypothesis), and — via the Cauchy-Schwarz-for-PDS-kernels lemma (Lemma 6.7) — actually
positive definite, then complete H0 to a genuine Hilbert space H in which it is dense,
and finally extend the reproducing property from the dense subspace H0 to all of H by a
continuity argument. This is substantial analysis, not a restatement. Theorem 6.11's proof
uses the orthogonal decomposition H=H1⊕H1⊥ (where H1=span{K(xi,⋅)}) and the reproducing property to show the orthogonal component h⊥ never helps
and, when G is strictly increasing, strictly hurts — a short argument, but one that depends
essentially on Theorem 6.8's reproducing property holding for the specificH constructed,
not just any Hilbert space with the kernel as its inner product.
Formalization scope
IsPDS uses the book's own second SPSD characterization (c^T K c ≥ 0 for every finite sample
and coefficient vector c) rather than the non-negative-eigenvalues characterization, avoiding
spectral theory for a Prop-valued definition; the book states the two are equivalent.
IsRKHSOf and IsMinimizer are formalization scaffolding, not book-numbered definitions:
IsRKHSOf packages Theorem 6.8's own two displayed equations (6.8, 6.9) as a reusable
predicate shared between Theorem 6.8 (its conclusion) and Theorem 6.11 (its "H its
corresponding RKHS" hypothesis), using an explicit evaluation map ev : H → X → ℝ to stand in
for "elements of H are functions on X," since Mathlib's abstract Hilbert spaces are not
themselves spaces of functions; IsMinimizer packages argmin. Both X in Theorem 6.8's
existential and Theorem 6.11's ambient type are plain Type rather than Type*, avoiding
universe-polymorphic quantification over the constructed Hilbert space's own type — a harmless
simplification, since every application in this book instantiates X at a concrete, small
type (typically RN or a finite set). Theorem 6.11's loss codomain ℝ ∪ {+∞} is
WithTop ℝ, not EReal (which would also admit -∞, an unstated generalization the book's
own display does not license, since EReal's ⊤+⊥=⊥ collapse is a genuine faithfulness risk
the book's own L:\mathbb R^m\to\mathbb R\cup\{+\infty\} avoids by construction). WithTop ℝ
on its own does not avoid every collapse, though: an unconstrained L may be the constant
function ⊤ (a legal instance of ℝ∪\{+\infty\}), forcing the objective identically ⊤ and
every point to vacuously minimize it, which would make the theorem's second conjunct false. An
added hypothesis, ∃ h₀, F h₀ ≠ ⊤, makes explicit the book's own implicit assumption that the
objective is finite somewhere — see the Formalization scope note below. Theorem 6.11's two
clauses are otherwise kept exactly as distinct as the book states them: existence needs only
Monotone G (non-decreasing); "any solution has this form" needs StrictMono G (increasing)
as an added hypothesis on the second conjunct only — per this chunk's own BRIEF.md, the crux
of the theorem, and the trap this mission is most careful to avoid collapsing. Theorem 6.10's
five closure clauses are stated as one conjunction (matching the book's single theorem, not
five separate items); the power-series clause keeps the book's own radius-of-convergence
domain restriction and adds an explicit summability hypothesis guarding the ∑' term.
Not formalized: Theorem 6.2 (Mercer's condition) — not needed by the goal's own proof chain
(it is an equivalent characterization of PDS mentioned before the RKHS construction, not a
premise Theorem 6.8's or 6.11's proof invokes) and its own hypotheses (compact X⊂RN, continuous K, an eigenfunction expansion of a compact self-adjoint integral
operator) are real analytic content this mission's budget does not include; Lemma 6.7
(Cauchy-Schwarz for PDS kernels) and Lemma 6.9 (normalized PDS kernels) — supporting lemmas for
Theorem 6.8's proof, not independently numbered results the goal cites; Theorem 6.12/Corollary
6.13 (Rademacher complexity/margin bounds for kernel-based hypotheses) — the chapter's optional
further milestone, connecting to chunks 03/05's machinery, cut for budget; §6.5-6.8
(sequence kernels, weighted transducers, rational kernels, Bochner's theorem, approximate
feature maps) — explicitly out of scope per this chunk's own BRIEF.md, a distinct,
applications-heavy topic.
Selected references
M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd ed., MIT
Press, 2018, Chapter 6, §6.1-6.4.
B. Schölkopf, R. Herbrich, A. J. Smola, "A generalized representer theorem," COLT 2001,
Lecture Notes in Computer Science 2111, 2001, 416-426.
N. Aronszajn, "Theory of reproducing kernels," Transactions of the American Mathematical
Society 68(3), 1950, 337-404.
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 Probability IV: Norms of Random Matrices with Sub-gaussian EntriesTextbook
Motivation
Random matrices with independent entries appear whenever a system is measured through many
noisy, roughly independent channels: shot noise in a sensor array, edges in an Erdős–Rényi-type
random graph, or the design matrix of a linear model with independent covariates. A basic
question about any such matrix A is how far it can stretch a vector — its operator norm∥A∥ — since this single number controls the stability of every linear statistic computed
from A: least-squares estimates, spectral clustering, covariance estimation, and random
projections all reduce, at some point, to bounding ∥A∥.
The theory traces to Marchenko and Pastur's 1967 asymptotic law for the spectrum of large random
matrices, and to Bai and Yin's 1988 almost-sure limit ∥A∥/n→2 for n×n
matrices with i.i.d. mean-zero, unit-variance entries. Those results are asymptotic: they say
what happens as the dimension n→∞, for a fixed matrix shape. The result formalized
here, Theorem 4.4.5 of Vershynin's High-Dimensional Probability (2018)
(DOI 10.1017/9781108231596), belongs to the more recent
non-asymptotic strand of the theory: it gives an explicit, dimension-free bound that holds at
every fixed m,n, with an explicit failure probability — the form of statement needed for
finite-sample guarantees in statistics and data science, rather than limiting behavior.
Setting
Let A be an m×n real matrix. Equip Rn and Rm with the Euclidean
norm ∥⋅∥2; A acts as a linear map ℓ2n→ℓ2m. Its operator norm
(§4.1.2) is
∥A∥:=x∈Sn−1max∥Ax∥2,
the largest factor by which A can stretch a unit vector; equivalently, the largest singular
value of A.
A real random variable X is sub-gaussian with the mission's own convention (matching the
Orlicz ψ2 norm this series already carries as a published definition,
HighDimProb.Concentration.subgaussianNorm) if
∥X∥ψ2:=inf{t>0:Eexp(X2/t2)≤2}<∞.
Bounded random variables and Gaussians are sub-gaussian; a Bernoulli(p) variable and a
±1-valued coin flip both qualify, which is why the theorem below directly covers
random matrices with i.i.d. Rademacher or Gaussian entries as special cases.
The mission's proof technique is the ε-net argument, developed in §4.2 and used nowhere
before this chapter of the book: a metric space (T,d), a subset K⊆T, and
ε>0 give rise to an ε-netN⊆K — a finite set such that every point
of K is within ε of some point of N — and a covering numberN(K,d,ε), the smallest cardinality of such a net. The technique reduces a statement that
must hold uniformly over an infinite (compact) set to a statement about finitely many points,
paid for by a union bound whose cost is controlled by the covering number.
for any m×n random matrix A with independent, mean-zero, sub-gaussian entries
Aij and K=maxi,j∥Aij∥ψ2. This is the weakest stable form of the
bound — it fixes no numerical value for C, only its existence and absoluteness (independence
from m, n, A, t), so later refinements of the constant do not invalidate it.
Significance
The result itself. The bound ∥A∥≲m+n is sharp up to the constant:
for entries of unit variance, E∥A∥≥41(m+n) for large m,n
(the book's Exercise 4.4.7), so no non-asymptotic bound of this shape can be improved beyond
constants. It is the entry point to the rest of the book's random matrix theory: Corollary 4.4.8
specializes it to symmetric matrices, and it underlies the community-detection (§4.5) and
covariance-estimation (§4.7) applications later in the same chapter, neither of which is part of
this mission.
Formalizing it. The theorem is a classical, fully proved result; nothing about its truth is
open. What this mission contributes is a machine-checked formal statement — together with the
two pieces of chapter infrastructure its own textbook proof names by number (Corollary 4.2.13,
Exercise 4.4.3(a)) — and a third, self-contained application of the same covering-number
machinery (Theorem 4.3.5) that exercises the shared IsEpsNet/coveringNumber definitions on a
different metric space (the Hamming cube), independently of the Euclidean case. Mathlib and the
Prove2Me platform currently have no ε-net, covering-number, or packing-number infrastructure
(checked by q=random matrix, q=operator norm, q=covering number, q=net on the platform,
and by filename search in Mathlib): this mission is the first to introduce it, restated inside
its own namespace since it is not otherwise available to build on.
Difficulty
The obvious first approach is to bound ∥A∥=maxx∈Sn−1∥Ax∥2 directly by union-bounding a concentration inequality over the sphere Sn−1. This fails outright: Sn−1 is
infinite (indeed uncountable) for n≥2, so no union bound over its points can converge — the
naive approach gives ∞⋅(tail probability). The ε-net argument is the fix, but
it is not just "discretize and hope": the reduction from the sphere to a finite net
(quadratic_form_on_net, Exercise 4.4.3(a)) loses a multiplicative factor 1/(1−2ε)
that must be tracked, and the net's cardinality (covering_numbers_of_euclidean_ball_and_sphere,
Corollary 4.2.13) is exponential in the dimension (9n at ε=1/4) — so the
per-point tail probability from Hoeffding-type concentration must itself decay fast enough
(quadratically in the exponent) to survive multiplying by 9m+n many points. Getting the
union bound to close requires choosing the threshold u in the tail bound proportionally to
m+n+t, not to t alone — the m+n term is exactly what pays for
the net's exponential size.
Formalization scope
A is represented as Ω → Matrix (Fin m) (Fin n) ℝ; its entries A ω i j are the individual
real random variables. Independence of the mn entries is iIndepFun over the index type
Fin m × Fin n; mean-zero is the vanishing of each entry's Bochner integral. The operator norm
is the norm of the associated continuous linear map between EuclideanSpace ℝ (Fin n) and
EuclideanSpace ℝ (Fin m) (matrixOpNorm, every linear map between finite-dimensional normed
spaces being automatically continuous), matching the book's maxₓ∈Sⁿ⁻¹ ‖Ax‖₂ exactly. The
sub-gaussian norm K reuses this series' own published definition,
HighDimProb.Concentration.subgaussianNorm, rather than a re-derivation. Covering numbers
(coveringNumber) are restricted to finite (Finset) ε-nets, the only kind this chapter uses;
this is a deliberate restriction, not a general-purpose covering-number formalization, and is
disclosed as such. A hard-coded numeral for C, or an unquantified "with high probability" in
place of the explicit failure probability 2exp(−t2), would each trivialize the statement and
is ruled out: C is existentially bound ahead of every other quantifier, and t>0 is a free
parameter with its own explicit bound, exactly as the book states it.
Definitions reusable beyond this mission: IsEpsNet and coveringNumber are stated for a
general PseudoMetricSpace and apply unchanged to any later chapter's covering-number needs
(e.g. Chapter 8's VC-dimension covering numbers), though per this series' rule that drafts cannot
import drafts, a later chunk would restate rather than import them until this mission is
published. matrixOpNorm is likewise chapter-agnostic. Contributions completing the sorry
proofs of any of the four theorem items are welcome and independent of one another; the covering
number and net-reduction items (covering_numbers_of_euclidean_ball_and_sphere,
quadratic_form_on_net) are the standard prerequisites for the goal's own volumetric/ε-net
proof.
Selected references
Vershynin, R. High-Dimensional Probability: An Introduction with Applications in Data
Science. Cambridge University Press, 2018. DOI 10.1017/9781108231596
Bai, Z. D., Yin, Y. Q. "Necessary and sufficient conditions for almost sure convergence of the
largest eigenvalue of a Wigner matrix." Annals of Probability 16 (1988), 1729–1741.
Marchenko, V. A., Pastur, L. A. "Distribution of eigenvalues for some sets of random matrices."
Mathematics of the USSR-Sbornik 1 (1967), 457–483.
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).
First-Order and Stochastic Optimization Methods for Machine Learning VI: The Classic Conditional Gradient MethodTextbook
Motivation
Every method in Chapters 2-4 of this series solves a projection or proximal subproblem at every
step — a Euclidean projection, or a Bregman-divergence prox-mapping — which can itself be as hard
as the original problem when X is a complicated feasible set (a spectrahedron, a flow polytope,
a matroid base polytope). The conditional gradient method (Frank & Wolfe, 1956) sidesteps this
entirely: instead of a projection, each step calls a linear optimization (LO) oracle —
minimize a linear function over X — which is frequently far cheaper (over a spectrahedron,
this reduces to a single eigenvector computation; over many combinatorial polytopes, to a greedy
algorithm). This is the origin of the modern "projection-free" family of optimization methods
widely used at the scale where projections are the bottleneck.
Setting
Fix a nonempty compact convex set X in a real normed space E and a convex f:X→R with L-Lipschitz gradient (Eq. (7.1.4)): ∥f′(x)−f′(y)∥∗≤L∥x−y∥. The
classic conditional gradient (CndG) method, Algorithm 7.1, sets x0∈X, y0=x0, and for
k=1,2,…: calls the LO oracle xk∈argminz∈X⟨f′(yk−1),z⟩, then sets
yk=(1−αk)yk−1+αkxk for a stepsize αk∈[0,1], either the fixed schedule
αk=2/(k+1) (Eq. (7.1.9)) or exact line search (Eq. (7.1.10)).
Section 7.1.1.2 extends this to bilinear saddle-point problems, where f itself is the
(generally nonsmooth) function f(x)=maxy∈Y{⟨Ax,y⟩−f^(y)} (Eq. (7.1.5))
for a compact convex Y and linear operator A. Since f is nonsmooth, the method is applied
instead to a family of smooth approximations fη built from a strongly convex ω on
Y (Eq. (7.1.21)-(7.1.23)), with the smoothing parameter ηk allowed to vary across
iterations rather than being fixed in advance.
Formalization targets
Goal — Theorem 7.1
f(yk)−f∗≤k(k+1)2Li=1∑k∥xi−yi−1∥2.
Supporting milestones, in attack order
Lemma 7.1: the smoothed objective family fη is monotone nondecreasing in η≥0 —
the one-line fact (V(y)−DY2≤0 pointwise) that licenses a variable, decreasing smoothing
schedule ηk rather than a schedule fixed in advance from knowledge of the target accuracy.
Theorem 7.2: the saddle-point counterpart of the goal theorem, running the same CndG
algorithm on the smoothed gradients fηk′ instead of f′ directly, with the explicit
rate f(yk)−f∗≤k(k+1)2∑i=1k[iηiDY2+σvηi∥A∥2∥xi−yi−1∥2].
Every constant here is exactly the book's; the goal theorem's bound is left in terms of the
actual step distances ∑∥xi−yi−1∥2, not a diameter-based simplification (see
Difficulty).
Significance
This mission formalizes the founding convergence result of the entire projection-free family
(Frank-Wolfe methods), which has become central to large-scale machine learning precisely because
its per-iteration cost can be orders of magnitude below that of a projection-based method on
structured feasible sets. Theorem 7.1's specific form — a rate depending on the realized step
distances rather than a fixed diameter — is also the more informative, tighter statement (the
book's own remarks show it recovers the classical diameter-based O(LDX2/ε)
complexity as a corollary, but also explains why the rate can be much better in practice when the
iterates settle near an extreme point).
No result matching conditional gradient / Frank-Wolfe methods exists on the platform as of
2026-09-18 (q=Frank-Wolfe and q=conditional gradient both return zero hits — see Prior art
in MODERATION_NOTES.md).
Difficulty
The chief formalization difficulty is representing "with the stepsize policy in (7.1.9) or
(7.1.10)" faithfully without either restricting to one policy (weaker than the book's stated
theorem) or introducing an awkward disjunction of two separate algorithm definitions. The book's
own proof resolves this by a single observation used for both policies at once: f(yk)≤f(y~k) for y~k the point the fixed schedule γk=2/(k+1) would have
produced — trivially by equality under (7.1.9), or because yk is chosen to minimize f over
the entire line segment under (7.1.10), of which y~k is one point. This mission's
hyk_le hypothesis states exactly this shared consequence, which is genuinely what the proof
uses and genuinely covers both policies, rather than picking one arbitrarily.
A second difficulty is not collapsing ∑i=1k∥xi−yi−1∥2 into a diameter bound
kDX2 inside the milestone itself — the book's own remarks perform that substitution as a
separate, weaker corollary (Eq. (7.1.19)) after stating Theorem 7.1 in its sharper form; folding
the substitution into the goal statement itself would silently prove a different, weaker theorem.
Formalization scope
conditional_gradient_rate and saddle_point_cndg_rate state the LO oracle's exactness
(x k ∈ Argmin_{z∈X}⟨fGrad(y(k-1)),z⟩) as a pointwise hypothesis rather than deriving it from
IsCompact X via an existence lemma — matching the pointwise-hypothesis convention this series
uses throughout for argmin-defined algorithmic steps (chunk 03-deterministic's mirror-descent
updates, chunk 04-stochastic's stochastic mirror-descent update). X compact convex is still
included as a hypothesis, matching the book's own standing assumption on the problem class, even
though it is not itself needed to derive the stated conclusion from the other hypotheses.
smoothed_objective_monotone and saddle_point_cndg_rate realize fη/f via sSup of the
image of Y under the pointwise saddle-point objective, matching the book's own max_{y∈Y}{...}
definition (Eq. (7.1.5), (7.1.23)) directly rather than introducing a separate Def_ file for a
"bilinear saddle-point objective" structure — no other item in this mission reuses that
definition verbatim, so per this series' convention (no shared substrate bundled into a structure
unless reused), it is inlined at each use.
A trivializing formalization this mission rules out: stating the LO oracle via an
ε-approximate minimizer ((fGrad (y(k-1))) (x k) ≤ (fGrad (y(k-1))) z + ε for some
ε) rather than an exact one — this is explicitly a different, weaker algorithm the book does not
analyze in Theorem 7.1/7.2 (the book studies approximate LO oracles separately, later in the
chapter, not selected here).
Left out of scope, for time: Theorem 7.7 (the matching lower complexity bound for LO-oracle
methods, Eq. (7.1.60)) — formalizing it faithfully requires first modeling the abstract class of
"LCP methods" (any algorithm restricted to LO-oracle calls) as a universally-quantified object,
a substantially different and more involved formalization task than the two upper-bound
convergence theorems selected here; named per Hard Rule 7 rather than approximated. The
d(x)=\sum x_i\log x_i entropy-smoothing remark and the primal/primal-dual averaging CndG
variants (§7.1.2, not covered by this mission's page range) are likewise not attempted.
Selected references
G. Lan, First-Order and Stochastic Optimization Methods for Machine Learning, Springer Series
in the Data Sciences, Springer 2020, Chapter 7, §7.1.1. https://doi.org/10.1007/978-3-030-39568-1
M. Frank, P. Wolfe, "An algorithm for quadratic programming," Naval Research Logistics
Quarterly, 3(1-2), 1956, pp. 95-110.
M. Jaggi, "Revisiting Frank-Wolfe: projection-free sparse convex optimization," ICML, 2013
(the modern machine-learning revival of the method).
First-Order and Stochastic Optimization Methods for Machine Learning IV: Variance-Reduced Mirror Descent for Finite-Sum ProblemsTextbook
Motivation
Empirical-risk-minimization objectives in machine learning are finite sums: Ψ(x)=m1∑i=1mfi(x)+h(x), one smooth term fi per training example (or per
worker, in a distributed setting), plus a simple nonsmooth regularizer h. Chapter 4's basic
stochastic mirror descent handles this by sampling a single random component gradient
∇fit(x) as an unbiased estimator of ∇f(x) — but that estimator's variance is a
constant throughout the algorithm, which caps the achievable convergence rate. Variance-reduced
mirror descent asks a sharper question: can an unbiased finite-sum gradient estimator be built
whose variance itself vanishes as the algorithm approaches the optimum? The answer — periodic
full-gradient snapshots combined with single-component corrections — is the SVRG-style idea this
mission formalizes in Lan's general-norm mirror-descent framework, with an explicit,
sampling-distribution-dependent constant rather than a generic O(⋅).
Setting
Fix a closed convex set X in a real normed space E, and the finite-sum composite problem
minx∈X{Ψ(x):=f(x)+h(x)} (Eq. (5.3.1)), where f(x)=m1∑i=1mfi(x) is
the average of m smooth convex component functions, each with Li-Lipschitz gradient
∇fi (∥∇fi(x)−∇fi(y)∥∗≤Li∥x−y∥), and h is a simple, possibly
nondifferentiable convex function. f is possibly μ-strongly convex, μ≥0 (Eq. (5.3.2));
this mission's goal takes μ=0 (§5.3.1, "Smooth Problems Without Strong Convexity"). A fixed
probability distribution Q={q1,…,qm} on the component indices governs the algorithm's
random sampling, and
LQ:=m1i=1,…,mmaxqiLi
is the section's key aggregate smoothness constant (Eq. (5.3.4)), replacing the plain average L
wherever component-wise variance enters the analysis. Variance-reduced mirror descent (Algorithm
5.6) is a multi-epoch method: each epoch of length Ts recomputes a full gradient ∇f(x~) at a snapshot point x~, then runs Ts inner iterations using the estimator
Gt:=(∇fit(xt)−∇fit(x~))/(qitm)+∇f(x~) and
the mirror-descent-with-composite-term update xt+1:=argminx∈X{γ[⟨Gt,x⟩+h(x)]+V(xt,x)}, where V is the Bregman divergence of a fixed
distance-generating function, exactly as in Chapters 3-4.
Formalization targets
Goal — Corollary 5.8
With θ=1, γ=1/(16LQ), and the doubling epoch schedule T1=7, Ts=2Ts−1 (Eq.
(5.3.17)),
for every epoch count S≥1, where xˉS is the weighted average of the epoch snapshots
(Eq. (5.3.16)).
Supporting milestones, in attack order
Lemma 5.12 — the per-component gradient-variation bound m1∑imqi1∥∇fi(x)−∇fi(x∗)∥∗2≤2LQ[Ψ(x)−Ψ(x∗)], the basic smoothness consequence from
which the estimator's variance bound is built.
Lemma 5.13 — unbiasedness (E[δt]=0) and two variance bounds
(E[∥δt∥∗2]≤2LQ[…] and ≤4LQ[…]) for the variance-reduced
estimator's error δt:=Gt−∇f(xt).
Lemma 5.14 — the one-step progress bound combining Lemma 5.13's variance control with the
mirror-descent update's three-point inequality.
Theorem 5.6 — the general epoch-level convergence bound (with an arbitrary epoch-length
schedule Ts and stepsize γ satisfying 4LQγ≤1) that Corollary 5.8
instantiates.
Every constant is exactly the book's: LQ's own sampling-distribution-dependent definition
(never specialized to uniform qi=1/m), and Corollary 5.8's explicit 8/2S−1,
11/4, 16LQ — not a generic O(⋅) — are all taken verbatim.
Significance
This is the series' first genuinely finite-sum result: unlike Chapters 3-4's single abstract
objective f, here f is structurally a named average of m component functions, and the
sampling distribution {qi} over those components is a first-class free parameter of both the
algorithm and the analysis (not fixed to uniform sampling) — LQ itself depends on this choice,
and a formalization that hard-codes qi=1/m would understate what Lemma 5.12's own proof needs.
Getting Theorem 5.6/Corollary 5.8 right also requires keeping two nested indices straight: inner
iterations t within an epoch, and outer epoch counts s, with the convergence bound stated in
terms of the epoch count S alone — and keeping the two "gap" quantities Ψ(x0)−Ψ(x∗)
(an objective-value gap) and V(x0,x∗) (a Bregman-divergence gap) distinct throughout, since
they enter Corollary 5.8's final bound with different explicit coefficients (11/4 vs. 16LQ)
and neither generically bounds the other.
No result on the platform models a finite-sum objective with m named component functions
sampled by a general index distribution {qi}, a variance-reduction snapshot/anchor point, or
this specific SVRG-style estimator, as of 2026-09-18 (q=finite sum, q=variance reduction,
q=SVRG, q=component function, q=variance reduced gradient, q=mirror descent finite sum —
see Prior art below).
Difficulty
The central difficulty is Theorem 5.6's own epoch-weight sequence ws: the book defines
ws:=(1−4LQγ)(Ts−1−1)−4LQγTs explicitly only for s≥2 (Eq. (5.3.14)), yet the
displayed sums ∑s=1Sws in (5.3.15)-(5.3.16) run from s=1. A 2026-09-19 revision found
that this, combined with the epoch snapshot x~s being constrained only by membership in
X and not tied to the algorithm's own dynamics, made the originally drafted statements false,
not merely incomplete: an adversarial, unboundedly-large-Ψ, ω-independent x~1
together with w1→∞ violates the stated conclusion. The fix restores the connection via an
auxiliary epoch-boundary sequence and the per-epoch progress inequality Theorem 5.6's own proof
derives from Lemma 5.14 (see epoch_convergence_bound's hepoch hypothesis), and resolves w1
by extending (5.3.14)'s domain to s≥1 via a fixed "epoch 0" length T0 — w_1 is no longer
left free beyond positivity. finite_sum_variance_reduced_rate instantiates T0:=T1/2=3.5
concretely, reproducing the arithmetic Corollary 5.8's own proof is internally consistent with
(w1=3/4(3.5−1)−1/4⋅7=1/8, matching the closed form (1/8)T1−3/4=1/8) — this was
previously only a documented-but-unresolved observation, not yet a stated hypothesis.
Formalization scope
All five items are stated over a general real normed space [NormedAddCommGroup E] [NormedSpace ℝ E], matching the mirror-descent chunks' general-norm convention (never specialized to Euclidean
space or squared distance) — V is a free two-point function throughout, and each ∇fi,
∇f, Gt are continuous linear functionals E →L[ℝ] ℝ, whose Mathlib operator norm
supplies the dual norm ∥⋅∥∗ with no separate definition needed. This is the trivializing
formalization this mission rules out: hard-coding qi=1/m (uniform sampling) or V(x,y)=21∥x−y∥2 (Euclidean Bregman divergence) would understate both LQ's dependence on the sampling
distribution (the whole point of Lemma 5.12's bound) and the general-norm apparatus the rest of
this book series shares.
Ψ(x_0)-Ψ(x^*) and V(x_0,x^*) are kept as two syntactically distinct terms throughout — never
conflated or bounded one by the other — matching Corollary 5.8's own two separate coefficients.
Corollary 5.8's own explicit constants (8/2S−1, 11/4, 16LQ) are stated verbatim rather
than left as an unspecified O(⋅), per Hard Rule 6.
Left out of scope, for time: the gradient-computation-count complexity bound (Eq. (5.3.19), an
O(⋅) statement about total oracle calls, not a convergence-rate inequality on Ψ) and
§5.3.2's strongly-convex case (Theorem 5.7, a geometric-decay bound Δs≤ρΔs−1
under μ>0) are natural continuations reusing this mission's variance_reduced_progress_bound
milestone, not attempted here.
Prior art
q=finite sum, q=variance reduction, q=SVRG, q=component function, q=variance reduced gradient, and q=mirror descent finite sum were all searched on 2026-09-18. The only
topically-adjacent hit across all six queries is ShiOptRates.Stochastic.variance_purchase_ classical ("Classical variance reduction is cost-neutral..."), which models plain minibatch SGD
on a smooth objective with an i.i.d.-noise oracle characterized by a single scalar variance
σ^2 and a minibatch-size trade-off — no finite-sum structure with m named component
functions, no sampling distribution {qi}, no snapshot/anchor point x~, and a
different question (cost-neutrality of minibatch size vs. this mission's convergence rate for a
fixed variance-reduction scheme). Not reused; every item in this mission is drafted fresh.
Selected references
G. Lan, First-Order and Stochastic Optimization Methods for Machine Learning, Springer Series
in the Data Sciences, Springer 2020, Chapter 5, §5.3. https://doi.org/10.1007/978-3-030-39568-1
R. Johnson, T. Zhang, "Accelerating stochastic gradient descent using predictive variance
reduction," Advances in Neural Information Processing Systems (NeurIPS), 2013 (the SVRG
estimator this section's gradient estimator generalizes to the composite mirror-descent
setting).
A. Nemirovski, A. Juditsky, G. Lan, A. Shapiro, "Robust stochastic approximation approach to
stochastic programming," SIAM Journal on Optimization, 19(4), 2009, pp. 1574-1609.
First-Order and Stochastic Optimization Methods for Machine Learning III: Stochastic Mirror DescentTextbook
Motivation
Machine learning's canonical training objective — minimize an expected or empirical risk over a
data distribution — is almost never observed exactly: at each step an algorithm sees only a noisy
gradient sample (a minibatch gradient, a single-example gradient, a simulation draw). Stochastic
mirror descent (Nemirovski, Juditsky, Lan & Shapiro 2009) is the modern, general-norm answer to
"what happens to first-order convergence guarantees when the gradient itself is a random
variable": it takes the deterministic mirror-descent scheme of the previous chapter and replaces
the exact subgradient with an unbiased stochastic estimate, and asks for both an expected
convergence rate and, when the noise is well-behaved, an explicit probability-of-large-deviation
guarantee. This is the theoretical backbone of stochastic gradient descent as used in practice.
Setting
Fix a nonempty closed convex set X in a real normed space E, and a convex f:X→R
with f∗:=minx∈Xf(x) and x∗ an arbitrary minimizer, exactly as in Chapter 3. A
stochastic oracleG(x,ξ), queried at a point x with a fresh random sample ξ, returns
an estimate of a subgradient g(x)∈∂f(x): E[G(x,ξ)]=g(x) (unbiasedness),
∥g(x)∥∗≤M (a dual-norm Lipschitz bound, Eq. (4.1.7)), and E[∥G(x,ξ)−g(x)∥∗2]≤σ2 (a second-moment/variance bound). The stochastic
mirror-descent update is exactly Chapter 3's mirror-descent update with Gt:=G(xt,ξt) in
place of the deterministic gt: xt+1:=argminx∈Xγt⟨Gt,x⟩+V(xt,x) (Eq. (4.1.6)), where V is the Bregman divergence of a fixed distance-generating
function ν.
Lemma 3.4, invoked for the stochastic update: the same three-point inequality as the
deterministic mirror-descent update, restated with the stochastic gradient functional Gt in
place of gt — the book's own remark ("It can be easily seen that the result in Lemma 3.4
holds with gt replaced by Gt") is exactly what licenses treating this as the same
algebraic fact for a fixed sample path.
Lemma 4.1: the martingale-difference deviation bound, a Chernoff-type concentration
inequality for a conditionally sub-Gaussian martingale-difference sequence — the chapter's
general-purpose probabilistic tool, proved independently of the optimization setting.
Every constant is exactly the book's; M2+σ2 (not a generic O(⋅)) is the goal's own
noise-dependent constant, taken verbatim.
Significance
This is the first mission in the series to leave the purely deterministic, real-analytic setting
of Chapters 2-3 and formalize a genuinely probabilistic convergence guarantee: an expectation
taken over an entire random algorithm trajectory ξ1,…,ξk, not merely over a single
random variable. Getting the goal theorem's statement right requires being explicit about exactly
which quantities are random (the iterates xt, hence f(xˉsk) and V(xs,x∗)) and which
are deterministic constants fixed in advance (M,σ,γt), and about the precise
mathematical content of "the stochastic gradient's bias vanishes after conditioning on the past" —
Lemma 4.1 is included specifically because it is the general machine that makes that vanishing
rigorous, independent of the optimization application.
No result matching stochastic mirror descent, Assumption 4's sub-Gaussian/light-tail condition, or
this martingale-difference concentration lemma exists on the platform as of 2026-09-18 (q= stochastic gradient, q=stochastic mirror descent, q=martingale, q=sub-Gaussian — see
Prior art below for what these queries actually returned).
Difficulty
The central difficulty is disentangling which facts in the chapter's proof genuinely need
measure theory and which do not. The per-step algorithmic relations — xt+1's minimality,
f's subgradient inequality at xt, the dual-norm bound on g — hold for every sample path
individually and are formalized pointwise in ω, exactly as chunk 03-deterministic
formalizes its deterministic analogues; only the second-moment bound and the final expectation
inequality are genuine integrals. The one place this pointwise treatment cannot simply mirror the
deterministic case is the noise cross-term E[γt⟨δt,xt−x∗⟩]=0:
in the book's proof this vanishes because δt=Gt−g(xt) is conditionally mean-zero given
the past and xt is a function of the past (the martingale-difference property, via the tower
property of conditional expectation) — a genuinely non-pointwise fact. Rather than thread an
explicit filtration through the goal theorem's own statement (which Lemma 4.1 already does, as
the chapter's dedicated home for that machinery), the goal theorem takes this post-tower-property
consequence directly as a named hypothesis (hcross); see Formalization scope.
Formalization scope
stochastic_mirror_iterate_three_point and stochastic_mirror_descent_bound are stated over a
general real normed space [NormedAddCommGroup E] [NormedSpace ℝ E], matching chunk
03-deterministic's general-norm milestones (mirror_iterate_three_point/mirror_descent_bound)
rather than the Euclidean/inner-product specialization of that chunk's §3.1 items — Chapter 4's
own stochastic mirror descent is presented directly in the general-norm framework of §3.2, with no
Euclidean-only warm-up. V is left a free two-point function (never hard-coded to a squared
Euclidean distance), and the stochastic gradient Gt and the subgradient selector g are
continuous linear functionals E →L[ℝ] ℝ, whose Mathlib operator norm supplies the dual norm
∥⋅∥∗ with no separate definition needed — the same trivializing formalization chunk
03-deterministic rules out (specializing V to the Euclidean case) applies here and is ruled
out the same way.
martingale_difference_deviation_bound (Lemma 4.1) is a standalone probabilistic result,
formalized with Mathlib's MeasureTheory.Filtration and condExp machinery: the sequence
ξ[t]'s generated filtration, ζt's Ft-measurability, and the two
conditional-expectation hypotheses (conditional mean zero, conditional sub-Gaussian tail) are all
literal translations of the book's own E|ξ[t-1] notation.
Left out of scope, for time: Assumption 4 (the light-tail/sub-Gaussian oracle assumption),
Proposition 4.1 (the large-deviation bound under Assumption 4, which chains Lemma 4.1's
concentration bound with the constant stepsize policy (4.1.11) and a second Markov-inequality
argument on ∑γt2∥δt∥∗2), Lemma 4.2 and Theorem 4.2 (the smooth-f case,
§4.1.2, requiring a separate recursion and averaging convention xtav). All four are natural
continuations reusing this mission's stochastic_mirror_iterate_three_point and/or
martingale_difference_deviation_bound; a later mission or an amendment to this one could add
them without touching what is here. Per Hard Rule 7 (faithfulness over coverage), a genuinely
faithful formalization of Proposition 4.1 in particular — which needs Assumption 4's own
conditional-MGF hypothesis threaded consistently with Lemma 4.1's, plus the constant-stepsize
substitution and a second concentration argument — was judged to need more time than this
session's budget allowed to do without shortcuts; it is named here rather than approximated.
Selected references
G. Lan, First-Order and Stochastic Optimization Methods for Machine Learning, Springer Series
in the Data Sciences, Springer 2020, Chapter 4, §4.1. https://doi.org/10.1007/978-3-030-39568-1
A. Nemirovski, A. Juditsky, G. Lan, A. Shapiro, "Robust stochastic approximation approach to
stochastic programming," SIAM Journal on Optimization, 19(4), 2009, pp. 1574-1609.
H. Robbins, S. Monro, "A stochastic approximation method," Annals of Mathematical Statistics,
22(3), 1951, pp. 400-407 (origin of stochastic approximation).
Introduction to Online Convex Optimization IX: From Online Convex Optimization to PAC LearningTextbook
Motivation
Every algorithm in Chapters I–VIII minimizes regret, an online, adversarial performance
measure with no reference to a data-generating distribution. Chapter 9 asks what regret
minimization buys in the classical statistical learning setting, where examples are drawn i.i.d.
from a fixed distribution and the goal is a hypothesis that generalizes well to unseen data. The
chapter's answer is a black-box reduction: run any OCO algorithm on the sequence of losses induced
by i.i.d. training examples, average its iterates, and the sublinear-regret guarantee converts
directly into a PAC generalization bound — with no algorithm-specific analysis required.
Setting
A hypothesis h predicts labels from examples x∈X; its generalization error against a
distribution D over labeled pairs (x,y) is error(h)=E(x,y)∼D[ℓ(h(x),y)] for a loss function ℓ. Section 9.1's Theorem 9.1 (No Free Lunch) shows
this goal is hopeless without restricting to a hypothesis class H: for any learning algorithm
and any sample size m, there is a domain, a zero-error concept, and a distribution against which
the algorithm's learned hypothesis is wrong at least 1/10 of the time with probability at least
1/10. Definitions 9.2–9.3 (PAC and agnostic PAC learnability) and Theorem 9.4 (finite classes
are agnostically PAC learnable) set up the target the chapter's reduction achieves for a much
broader class of hypothesis sets.
Section 9.2's reduction (Algorithm 29) takes any OCO algorithm A and a convex hypothesis class
H⊆Rd: draw T i.i.d. labeled examples, feed A the loss function
ft(h)=ℓ(h(xt),yt) at each round, and output the running average hˉ=T1∑t=1Tht of A's iterates.
Formalization targets
Theorem 9.1 (No Free Lunch, milestone)
For any domain X with ∣X∣=2m>4 and any algorithm A:(sample of size m)→(X→Bool), there is a concept C and a distribution D with error(C)=0
and PrS∼Dm[error(A(S))≥1/10]≥1/10.
Theorem 9.5 is a genuine reduction theorem, in the strongest sense the book uses that phrase in
this manuscript: it needs no property of A beyond a regret bound, so every sublinear-regret
algorithm in Chapters III–VIII (online gradient descent, RFTL, the bandit and projection-free
algorithms) is, via this one theorem, automatically also an agnostic PAC learning algorithm for
its hypothesis class — with an explicit, finite-sample generalization bound, not merely an
asymptotic guarantee. This is also the book's only chapter connecting OCO to classical statistical
learning theory, making Theorem 9.5 the bridge result the rest of the manuscript's machinery feeds
into. No prior art was found on the platform for PAC learning, no-free-lunch, or generalization
bounds in this sense (planning search: q=PAC, q=no+free+lunch, q=generalization — the one
"no free lunch" hit found, PRNGCompression.prng_no_free_lunch, is an unrelated
Kolmogorov-complexity result, not a substitute); this mission drafts both results fresh.
Difficulty
Theorem 9.1's proof (the probabilistic method) computes an expectation over a uniformly random
conceptC and a uniformly random sampleS simultaneously, shows this joint expectation of
the learned hypothesis's error is at least 1/4, and only then extracts (i) the existence of a
single bad concept via linearity of expectation, and (ii) a probability bound via Markov's
inequality on the error as a random variable over samples for that fixed concept — a genuinely
two-stage probabilistic argument, not a direct combinatorial construction. Theorem 9.5's proof (not
included in the excerpted milestone pages, continuing past PDF p. 180 into §9.2.1's Azuma's
inequality machinery) builds a martingale from the sequence of per-round loss deviations and
applies a concentration inequality to convert the algorithm's regret bound (a statement about the
sum of realized losses) into a high-probability statement about hˉ's expected loss under
D — the gap between "regret is small" and "generalization error is small" is exactly what the
martingale/concentration argument closes.
Formalization scope
GeneralizationError/GeneralizationErrorZeroOne give the two loss regimes the chapter uses:
a general parametrized real-valued hypothesis (matching the linear-hypothesis convention hw(x)=w⊤x of §9.1.3, generalized via an explicit pred evaluation map since the book's own
notation "h(x)" for h∈H⊆Rd implicitly identifies a parameter vector with
its induced predictor) and the zero-one loss for Bool-labeled concepts (Theorem 9.1's own
setting). IsAgnosticReductionRun formalizes Algorithm 29's construction directly, including its
round-0 convention (h_1 ← A(∅), matching the series' standing convention for an empty history)
and the i.i.d. sampling assumption made explicit via ProbabilityTheory.iIndepFun and identical
marginal law D. Theorem 9.5's own regret hypothesis (hA) states "an OCO algorithm whose regret
is guaranteed to be bounded by RegretT(A)" as a genuine property of A — holding for every cost
sequence and horizon — matching the book's phrasing exactly, not a one-off fact about the single
realized (random) cost sequence this particular run produces. The loss ℓ is assumed bounded in
[0,1], the chapter's implicit standing assumption (matching the zero-one loss and bounded
hinge-loss examples of §9.1.3) needed for the concentration argument behind the
√(8log(2/δ)/T) term; see MODERATION_NOTES.md.
Not formalized: Definitions 9.2–9.3 (PAC/agnostic-PAC learnability) and Theorem 9.4 (finite-class
PAC learnability), per BRIEF.md's explicit guidance that Theorem 9.4's proof is not
self-contained on these pages but spread across the whole chapter, culminating in Theorem 9.5
itself — treating it as background context rather than a separate formalization target avoids
either reconstructing that proof or drafting a numbered result whose "proof" would just be a
forward reference to this mission's own goal. Theorem 9.5's optional corollary form (the sample
complexity bound T = O((1/ε²)log(1/δ) + T_ε(A))) is likewise not drafted, per BRIEF.md's
"otherwise keep the milestone to the displayed inequality." §9.2.1's Azuma's inequality survey
(background probability theory, available in Mathlib's Probability/Martingale/) is not itself a
formalization target.
Selected references
E. Hazan, Introduction to Online Convex Optimization, 2nd ed., arXiv:1909.05207v3, Chapter 9.
V. Vapnik, A. Chervonenkis, "On the uniform convergence of relative frequencies of events to
their probabilities," Theory of Probability and its Applications 16(2), 1971, 264-280.