Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proof of Theorem 11: the replace-one term is at most β1+β2\beta_1 + \beta_2β1​+β2​

Proved
StabGen.Hypothesis.replace_one_pointwise_bound

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmic-stabilitylearning-theoryp2o-batch-pfp1ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let DDD be a probability distribution on Z=X×YZ = X \times YZ=X×Y, let the cost satisfy 0≤c(y′,y)≤M0 \le c(y', y) \le M0≤c(y′,y)≤M, and let AAA be a symmetric deterministic learning algorithm whose losses are measurable. Suppose that, at sample size mmm, AAA has hypothesis stability β1\beta_1β1​ (Definition 3) and pointwise hypothesis stability β2\beta_2β2​ (Definition 4). Let S=(z1,…,zm)∼DmS = (z_1, \dots, z_m) \sim D^mS=(z1​,…,zm​)∼Dm, let zi′∼Dz'_i \sim Dzi′​∼D be independent of SSS, and let SiS^iSi be SSS with ziz_izi​ replaced by zi′z'_izi′​. Then for every index iii,

ES,zi′[ ∣ℓ(AS,zi)−ℓ(ASi,zi)∣ ]≤β1+β2.\mathbb E_{S,z'_i}\bigl[\,|\ell(A_S, z_i) - \ell(A_{S^i}, z_i)|\,\bigr] \le \beta_1 + \beta_2 .ES,zi′​​[∣ℓ(AS​,zi​)−ℓ(ASi​,zi​)∣]≤β1​+β2​.

This converts the replace-one quantity in Lemma 9, eq. (8), into the two remove-one stability notions of the paper.

Formalization Note The paper prints the bound 2β22\beta_22β2​. Its argument splits the quantity, by the triangle inequality, into ES[∣ℓ(AS,zi)−ℓ(AS∖i,zi)∣]≤β2\mathbb E_S[|\ell(A_S,z_i) - \ell(A_{S^{\setminus i}},z_i)|] \le \beta_2ES​[∣ℓ(AS​,zi​)−ℓ(AS∖i​,zi​)∣]≤β2​ and ES,zi′[∣ℓ(AS∖i,zi)−ℓ(ASi,zi)∣]\mathbb E_{S,z'_i}[|\ell(A_{S^{\setminus i}},z_i) - \ell(A_{S^i},z_i)|]ES,zi′​​[∣ℓ(AS∖i​,zi​)−ℓ(ASi​,zi​)∣]. In the second term ziz_izi​ is not in SiS^iSi and (Si)∖i=S∖i(S^i)^{\setminus i} = S^{\setminus i}(Si)∖i=S∖i, so it is an instance of Definition 3 and is bounded by β1\beta_1β1​, not β2\beta_2β2​. The statement here is the bound the argument proves; it agrees with the printed one when β1=β2\beta_1 = \beta_2β1​=β2​. Expectation over (S,zi′)(S, z'_i)(S,zi′​) is the integral against Dm⊗DD^m \otimes DDm⊗D.

Preamble
import Mathlib
import Definitions.Def_FoundationsML_Stability_Loss
import Definitions.Def_FoundationsML_Stability_EmpiricalError
import Definitions.Def_FoundationsML_Stability_GeneralizationError
import Definitions.Def_StabGen_Hypothesis_Setting
import Definitions.Def_StabGen_Hypothesis_Stability

open MeasureTheory
Formal statement
namespace StabGen.Hypothesis

open FoundationsML.Stability

theorem replace_one_pointwise_bound {X Y Y' : Type*} [MeasurableSpace X] [MeasurableSpace Y]
    (D : Measure (X × Y)) [IsProbabilityMeasure D] (L : Y' → Y → ℝ) (M : ℝ)
    (hL : ∀ (y' : Y') (y : Y), 0 ≤ L y' y ∧ L y' y ≤ M)
    (A : LearningAlgorithm X Y Y')
    (hA : ∀ n : ℕ, Measurable (fun p : (Fin n → X × Y) × (X × Y) =>
      Loss L (A (trainingSet p.1)) p.2))
    (m : ℕ) (β₁ β₂ : ℝ) (h₁ : HypothesisStable D L A m β₁)
    (h₂ : PointwiseHypothesisStable D L A m β₂) (i : Fin m) :
    ∫ p : (Fin m → X × Y) × (X × Y),
        |Loss L (A (trainingSet p.1)) (p.1 i)
          - Loss L (A (trainingSet (replaceAt p.1 i p.2))) (p.1 i)|
      ∂((Measure.pi fun _ : Fin m => D).prod D)
    ≤ β₁ + β₂ := by sorry

end StabGen.Hypothesis
Source
Bousquet & Elisseeff, Stability and Generalization, JMLR 2 (2002), p. 506, proof of Theorem 11 (first display; printed bound 2β2 corrected to β1 + β2)
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me