Stability and Generalization 1: Polynomial Generalization Bounds from Hypothesis Stability for the Empirical and Leave-One-Out ErrorsResearch Paper
Why stability bounds
A learning algorithm is judged by its generalization error, its expected loss on a fresh example, which cannot be computed because the data distribution is unknown. Practitioners estimate it either by the empirical error on the training set or by the leave-one-out error, which retrains the algorithm once per example. Classical learning theory justifies these estimates through uniform convergence over the whole hypothesis space (VC dimension, covering numbers). That route says nothing useful about algorithms such as nearest-neighbour rules or regularized kernel methods, whose effective hypothesis space is huge or unknown.
An alternative is to bound the deviation through a property of the algorithm itself: how much its output changes when one training example is removed. This idea goes back to Rogers and Wagner (1978) and Devroye and Wagner (1979) for local rules, and Kearns and Ron (1999) gave it a name. Bousquet and Elisseeff (JMLR 2002) systematized it with several stability notions and corresponding bounds; their paper is the standard reference for algorithmic stability in learning theory. This mission formalizes its first family of results, the polynomial bounds of §4.1.
Setting
Let and let be a probability distribution on . A training set consists of examples drawn i.i.d. from . A learning algorithm maps a training set to a hypothesis ; it is deterministic and symmetric, meaning it does not depend on the order of the examples. A cost with defines the loss of a hypothesis at .
For each index , is with removed, and is with replaced by an independent fresh draw . The three error quantities are
Two stability notions (Definitions 3 and 4) control them. has hypothesis stability if for every , and pointwise hypothesis stability if for every .
Formalization targets
Goal: Theorem 11
For , under hypothesis stability and pointwise hypothesis stability , for every , each of the following holds with probability at least over :
Milestones
- Lemma 25 (p. 520), a generalized Rogers–Wagner identity: upper bounds on and by correlations of the loss.
- Lemma 9, (8) and (9) (p. 505): and .
- The replace-one term (proof of Theorem 11): .
- The second-moment bounds (proof of Theorem 11): and .
Significance
Theorem 11 is the weakest-assumption bound in the paper: it requires only average-case stability, not the uniform (worst-case) stability behind the exponential bounds of §4.2. It shows that both the resubstitution and the deleted estimate are within of the risk whenever the stability parameters decay like , with no reference to the size of the hypothesis class. It also extends Devroye and Wagner's leave-one-out analysis for classification to bounded regression losses and to the empirical estimator. Later work on average stability and on generalization of stochastic gradient methods (for example Hardt, Recht and Singer, 2016) starts from these notions.
The result is proved in the paper; as far as is known it has no machine-checked proof. A formal development has two concrete payoffs. First, it fixes the constants: in checking the argument, two printed slips were found (the empirical constant in Theorem 11 and the third term of Lemma 25's first inequality), and the formal statements record the versions that the paper's proof actually establishes. Second, the Lemma 25 and Lemma 9 machinery — exchangeability of i.i.d. samples under renaming, and second-moment control through stability — is reusable for any later stability result.
Difficulty
The obvious route is the Efron–Stein (Steele) variance inequality, Theorem 1 of the paper. It bounds the variance of , not its second moment, and leaves the bias to be handled separately; the paper notes that it gives worse constants. The direct route of Appendix A instead expands and rewrites each correlation term by renaming i.i.d. variables: training points, fresh test points and replacement points are exchanged with one another, and the algorithm is retrained on sets with . Every renaming is a measure-preserving map on a product of copies of , and each must be justified by the symmetry of . Doing this rigorously, rather than as "a matter of renaming", is the core of the work. The leave-one-out case is only sketched in the paper ("it is easy to see"), so its formal proof has to be reconstructed.
Formalization scope
- An algorithm is a function
Multiset (X × Y) → (X → Y'). Symmetry in the training set is built into the type, and the same algorithm acts on sets of every size, as and require. A sample isS : Fin m → X × Ywith law (Measure.pi); fresh points , , are further independent coordinates, via product measures and . - The loss, empirical error and generalization error are the published
FoundationsML.Stabilitydefinitions (Loss,EmpiricalError,GeneralizationError). - The cost satisfies everywhere. The paper's assumption that "all functions are measurable" becomes one hypothesis: for every , is measurable on . Both stability definitions also require their integrands to be integrable. Together these rule out the trivializing reading in which a non-integrable expectation equals Lean's default value and the stability hypotheses hold vacuously.
- "With probability " is stated as a bound on the failure event: for every , separately for each estimator.
- is assumed in Lemmas 9 and 25 and in the two second-moment steps of the proof, because the lemmas refer to two distinct indices. Theorem 11 itself is stated for every , as printed.
- Corrected statements. (i) Theorem 11's empirical bound is stated with , not the printed : the proof bounds a hypothesis-stability term by when it is bounded by . The two coincide when . Accordingly the replace-one milestone is stated as (printed ), and the empirical second-moment bound as (printed ). (ii) Lemma 25's empirical inequality has as its third term, as its proof gives, not the printed leave-one-out term. (iii) The leave-one-out second-moment bound follows from (9), not from (10) as printed.
Contributions are welcome at every level: proofs of the milestones, a general exchangeability lemma for symmetric algorithms on product measures, and Markov/Chebyshev glue for the final step.
Selected references
- O. Bousquet and A. Elisseeff, Stability and Generalization, Journal of Machine Learning Research 2 (2002), 499–526. https://www.jmlr.org/papers/v2/bousquet02a.html
- W. H. Rogers and T. J. Wagner, A finite sample distribution-free performance bound for local discrimination rules, Annals of Statistics 6(3) (1978), 506–514. https://doi.org/10.1214/aos/1176344196
- L. Devroye and T. J. Wagner, Distribution-free performance bounds for potential function rules, IEEE Transactions on Information Theory 25(5) (1979), 601–604. https://doi.org/10.1109/TIT.1979.1056087
- M. Kearns and D. Ron, Algorithmic stability and sanity-check bounds for leave-one-out cross-validation, Neural Computation 11(6) (1999), 1427–1453. https://doi.org/10.1162/089976699300016304
- M. Hardt, B. Recht and Y. Singer, Train faster, generalize better: stability of stochastic gradient descent, ICML 2016. https://arxiv.org/abs/1509.01240