Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 14.5 — stability-based learning bound for SVR

Proved
FoundationsML.Stability.svr_stability_bound

by mikedeng1 · Sep 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmic-stabilitygeneralization-boundmachine-learningsupport-vector-machines

Statement (Corollary 14.5, p. 340, PDF p. 357). Assume K(x,x)≤r2K(x,x)\le r^2K(x,x)≤r2 for all x∈Xx\in Xx∈X and that LϵL_\epsilonLϵ​ is bounded by M≥0M\ge0M≥0 for the hypotheses SVR returns. Let hSh_ShS​ be the hypothesis returned by SVR trained on an i.i.d. sample SSS of size mmm. Then, for any δ>0\delta>0δ>0, with probability at least 1−δ1-\delta1−δ:

R(hS)≤R^S(hS)+r2mλ+(2r2λ+M)log⁡(1/δ)2m.R(h_S) \le \hat R_S(h_S) + \frac{r^2}{m\lambda} + \Big(\frac{2r^2}\lambda + M\Big)\sqrt{\frac{\log(1/\delta)}{2m}}.R(hS​)≤R^S​(hS​)+mλr2​+(λ2r2​+M)2mlog(1/δ)​​.

This is the chapter's flagship application: a concrete, explicit stability-based generalization bound for a widely used regression algorithm, obtained by plugging Proposition 14.4's specific β=r2/(mλ)\beta=r^2/(m\lambda)β=r2/(mλ) (from LϵL_\epsilonLϵ​ being 111-Lipschitz, hence 111-admissible) into Theorem 14.2's generic bound.

Formalization Note. A is a choice of minimizer of FSF_SFS​ for the ϵ\epsilonϵ-insensitive loss, for every sample SSS, matching "the hypothesis returned by SVR when trained on … SSS"; the intermediate steps (LϵL_\epsilonLϵ​ is 111-Lipschitz, hence 111-admissible, so Proposition 14.4 gives this β\betaβ) are not re-derived, only the corollary's final statement is drafted. A measurability hypothesis on z ↦ L_ε(ev(A S), z) for every S guards GeneralizationError's Bochner integral, which sits on the left of this corollary's own load-bearing inequality.

Preamble
import Mathlib
import Definitions.Def_FoundationsML_Stability_GeneralizationError
import Definitions.Def_FoundationsML_Stability_EmpiricalError
import Definitions.Def_FoundationsML_Stability_IsRKHSOf
import Definitions.Def_FoundationsML_Stability_IsMinimizer
import Definitions.Def_FoundationsML_Stability_EpsilonInsensitiveLoss

open MeasureTheory
Formal statement
namespace FoundationsML.Stability

/-- Corollary 14.5 (stability-based learning bound for SVR; Mohri, Rostamizadeh & Talwalkar,
*Foundations of Machine Learning*, 2nd ed., MIT Press 2018, p. 340, PDF p. 357). Assume
`K(x,x) ≤ r²` for all `x ∈ X` and that `L_ε` is bounded by `M ≥ 0` for the hypotheses SVR
returns. Let `h_S` be the hypothesis returned by SVR trained on an i.i.d. sample `S` of size
`m`. Then, for any `δ > 0`, with probability at least `1 − δ`,
`R(h_S) ≤ R̂_S(h_S) + r²/(mλ) + (2r²/λ + M) sqrt(log(1/δ)/(2m))`.

**Formalization Note.** `A` is a choice of minimizer of `F_S(h) = R̂_S(h) + λ‖h‖²_K` for the
ε-insensitive loss, for every sample `S` (`hmin`), matching "the hypothesis returned by SVR
when trained on … `S`"; `β = r²/(mλ)` and `M` are plugged directly into the bound of Theorem
14.2, per the book's own proof ("Plugging this expression into the bound of theorem 14.2 yields
the result") — the intermediate steps (`L_ε` is `1`-Lipschitz, hence `1`-admissible, so
Proposition 14.4 gives this `β`) are not re-derived, only the corollary's final statement is
drafted.

**Revision (2026-09-19).** Added `hAmeas : ∀ S, Measurable (Loss (EpsilonInsensitiveLoss ε)
(ev (A S)))`, for the same reason as `stability_generalization_bound`'s own `hAmeas` — this
corollary's `GeneralizationError` also sits on the left of the load-bearing inequality. Also
corrected the citation: Eq. (14.10)/Corollary 14.5 are on printed p. 340 (PDF p. 357), not
p. 339 (PDF p. 356) as originally cited (PDF p. 356 is the tail of Proposition 14.4's proof). -/
theorem svr_stability_bound
    {X H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H]
    [MeasurableSpace (X × ℝ)] (D : Measure (X × ℝ)) [IsProbabilityMeasure D]
    (K : X → X → ℝ) (Φ : X → H) (ev : H → X → ℝ) (hRKHS : IsRKHSOf K Φ ev)
    (r : ℝ) (hr : 0 ≤ r) (hK : ∀ x : X, K x x ≤ r ^ 2)
    (ε : ℝ) (M : ℝ) (hM : 0 ≤ M)
    {m : ℕ} (hm : 0 < m) (lam : ℝ) (hlam : 0 < lam)
    (A : (Fin m → X × ℝ) → H)
    (hmin : ∀ S : Fin m → X × ℝ,
      IsMinimizer (fun g : H => EmpiricalError (EpsilonInsensitiveLoss ε) S (ev g) +
        lam * ‖g‖ ^ 2) (A S))
    (hbound : ∀ S : Fin m → X × ℝ, ∀ z : X × ℝ,
      Loss (EpsilonInsensitiveLoss ε) (ev (A S)) z ≤ M)
    (hAmeas : ∀ S : Fin m → X × ℝ, Measurable (Loss (EpsilonInsensitiveLoss ε) (ev (A S))))
    (δ : ℝ) (hδ : 0 < δ) :
    (1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
      {S : Fin m → X × ℝ | GeneralizationError D (EpsilonInsensitiveLoss ε) (ev (A S)) ≤
        EmpiricalError (EpsilonInsensitiveLoss ε) S (ev (A S)) +
          r ^ 2 / (m * lam) +
          (2 * r ^ 2 / lam + M) * Real.sqrt (Real.log (1 / δ) / (2 * m))}).toReal := by sorry

end FoundationsML.Stability
Source
Mohri, Rostamizadeh & Talwalkar, Foundations of Machine Learning, 2nd ed., MIT Press 2018, p. 340, Corollary 14.5 (PDF p. 357)
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me