Rademacher and Gaussian Complexities: Risk Bounds and Structural Results 1: With Probability 1 − δ, Expected Loss ≤ Empirical Dominating Cost + R_n(φ̃∘F) + √(8 ln(2/δ)/n) for Every f in FResearch Paper
Motivation
A learning algorithm picks a predictor from a class after looking at training examples, and the quantity of interest is its expected loss on a fresh example. Since depends on the data, its training error is a biased estimate of that loss, and a risk bound quantifies the bias uniformly over the class: with high probability, every has expected loss at most an observable sample average plus a complexity penalty. Classical penalties (VC dimension, covering numbers, fat-shattering dimension) are fixed in advance; data-dependent penalties such as the Rademacher complexity can be estimated from the sample itself and adapt to the distribution, which matters for model selection by complexity regularization.
Bartlett and Mendelson, Rademacher and Gaussian Complexities: Risk Bounds and Structural Results (JMLR 3, 2002, jmlr.org), state such a bound in a general decision-theoretic setting (Theorem 8, p. 467): the loss is any -valued function of an outcome and an action, and the sample average is taken of a dominating cost , which may be Lipschitz and hence amenable to the structural results of the paper's §3 even when is a discontinuous – loss. Multiclass classification with error-correcting output codes is the paper's example. The ingredients — McDiarmid's inequality (McDiarmid, 1989) and symmetrization — are standard; the paper combines them for this setting with a centred cost class. The source is the published JMLR article (pp. 463–482); all page numbers below are its printed pages.
Setting
Let be an input space, an output space and an action space with a distinguished action , each a measurable space. A probability measure on generates independent examples , and is a fresh draw from .
- A loss is ; a cost dominates it if for all .
- is a class of maps ; the expected loss of is .
- The empirical mean of is .
- The centred cost class is .
- For a class of real functions on a space and a sample , the empirical Rademacher complexity is
with independent uniform signs, and the Rademacher complexity is , the expectation over an i.i.d. sample (Definition 2, p. 464). The factor is and the absolute value is inside the supremum.
In Lean these are RadGauss.RiskBound.empiricalRademacher, rademacherComplexity, empMean, supDev (the uniform deviation ), doubleSupDev and phiTildeComp.
Formalization targets
Goal: Theorem 8 (p. 467)
For every integer and every , with probability at least over the sample, every satisfies
The event is uniform over . The constant is the printed one.
Milestones (the steps of the paper's proof)
- Theorem 9 (McDiarmid's inequality), p. 467: for independent, not necessarily identically distributed and with bounded differences ,
- Bounded differences, p. 467: replacing one example changes by at most .
- Concentration, p. 467: with probability at least ,
- Combined bound, p. 468: with probability at least , for all ,
- Symmetrization, p. 468:
The platform's Proved UnderstandingML.representativeness_le_rademacher (Shalev-Shwartz and Ben-David, Lemma 26.2) is included as a supporting reference: it is the middle inequality of milestone 5 in the , absolute-value-free normalization.
Significance
Theorem 8 bounds the expected loss of any predictor in the class, including one selected by the data, by quantities the learner can compute or estimate: the empirical cost and the Rademacher complexity of the centred cost class, which concentrates around its empirical version. Combined with the paper's structural results (§3: contraction by Lipschitz maps, convex hulls, sums), it yields margin bounds for voting methods, neural networks and kernel machines (§4) from complexities of simple base classes. Centring by matters: with the absolute value inside the supremum, can exceed by order even for a single function.
The result is proved in the paper. As far as the platform's catalog shows, it has no machine-checked proof in this normalization; McDiarmid's inequality in the non-identically distributed form, the bounded-difference step and the absolute-value Rademacher symmetrization with factor are not on the platform. A Lean proof would give a reusable risk-bound template for any loss dominated by a bounded cost.
Difficulty
The obvious argument — bound for a fixed by Hoeffding's inequality — does not survive the choice of after seeing the data: the deviation must be controlled uniformly over , and is typically infinite. The supremum over is a single random variable, but its expectation is not obviously small, and relating it to the Rademacher complexity requires a ghost sample and a sign-swap symmetry of the product measure. In a formal development, the supremum of an uncountable family is not automatically measurable; the expectations the argument manipulates must be genuine, not lower integrals, which is why the statements carry explicit measurability hypotheses. McDiarmid's inequality itself, for independent but not identically distributed coordinates, is a martingale-difference concentration argument that is not in Mathlib in this form.
Formalization scope
- Sample and law. A sample is
S : Fin n → X × Y, its law the productMeasure.pi (fun _ => P). "With probability at least , every satisfies …" is encoded by bounding the (outer) measure of by , with . - Complexities in . is an average over all sign vectors (
Fin n → Bool,true) of -valued suprema; is its Lebesgue integral. The goal is stated in , with the real terms embedded byENNReal.ofReal(all are nonnegative). A real supremum or a Bochner integral would silently return on an unbounded class or a non-integrable integrand, making the bound trivially false or vacuous; this is ruled out by the choice of codomain. - Added hypotheses, all implicit in the paper. (at Lean's makes the bound read , which is false); measurability of , and every ; a distinguished action (
[Zero A]). - Measurability guard. The goal and milestones 3–5 assume measurability of exactly the random variables the proof integrates: the uniform deviation , the empirical Rademacher complexity , and the double-sample deviation . These hold, for example, for countable ; the same guard is used by
UnderstandingML.representativeness_le_rademacher. - No printed slip was found in the statements formalized here. In Theorem 9, if every the printed exponent has a zero denominator; Lean reads it as and the bound as , which is true.
- Not formalized: the paper's Theorem 10 and the applications; this mission covers Definition 2 and §2 up to the end of the proof of Theorem 8.
Contributions welcome: a proof of McDiarmid's inequality for Measure.pi (reusable well beyond this mission), the ghost-sample symmetrization with the sign-swap invariance of , and the final assembly.
Selected references
- P. L. Bartlett and S. Mendelson, Rademacher and Gaussian Complexities: Risk Bounds and Structural Results, Journal of Machine Learning Research 3 (2002), 463–482. https://www.jmlr.org/papers/v3/bartlett02a.html
- C. McDiarmid, On the method of bounded differences, Surveys in Combinatorics 1989, London Math. Soc. Lecture Note Series 141, Cambridge University Press, 148–188. https://doi.org/10.1017/CBO9781107359949.008
- S. Shalev-Shwartz and S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press, 2014, Chapter 26. https://doi.org/10.1017/CBO9781107298019
- V. Koltchinskii and D. Panchenko, Empirical margin distributions and bounding the generalization error of combined classifiers, Annals of Statistics 30 (2002), 1–50. https://doi.org/10.1214/aos/1015362183