Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proof of Theorem 8 — generalization gap at most δM+ϵ\delta M + \epsilonδM+ϵ

Proved
XuMannorRobust.WeakRobust.theorem8_sufficiency_bound

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

generalizationlearning-theoryp2o-batch-p200bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let Z\mathcal ZZ be a measurable space with a probability measure μ\muμ, H\mathcal HH a set of hypotheses, and l:H×Z→[0,M]l : \mathcal H \times \mathcal Z \to [0, M]l:H×Z→[0,M] a loss measurable in its sample argument. Let n≥1n \ge 1n≥1, h∈Hh \in \mathcal Hh∈H, s∈Zn\mathbf s \in \mathcal Z^ns∈Zn and D⊆Zn\mathcal D \subseteq \mathcal Z^nD⊆Zn, and let δ,ϵ≥0\delta, \epsilon \ge 0δ,ϵ≥0. Let t(n)∼μn\mathbf t(n) \sim \mu^nt(n)∼μn. Suppose

  1. Pr⁡(t(n)∉D)≤δ\Pr(\mathbf t(n) \notin \mathcal D) \le \deltaPr(t(n)∈/D)≤δ, and
  2. ∣L(h,s^)−L(h,s)∣≤ϵ|L(h, \hat{\mathbf s}) - L(h, \mathbf s)| \le \epsilon∣L(h,s^)−L(h,s)∣≤ϵ for every s^∈D\hat{\mathbf s} \in \mathcal Ds^∈D.

Then

∣L(h)−L(h,s)∣≤δM+ϵ.\big| \mathcal L(h) - L(h, \mathbf s) \big| \le \delta M + \epsilon.​L(h)−L(h,s)​≤δM+ϵ.

This is the finite-nnn inequality behind the sufficiency half of Theorem 8: applied with h=As∗(n)h = \mathcal A_{\mathbf s^*(n)}h=As∗(n)​, s=s∗(n)\mathbf s = \mathbf s^*(n)s=s∗(n) and the sets Dn\mathcal D_nDn​ of weak robustness, it shows that the generalization gap is eventually at most δM+ϵ\delta M + \epsilonδM+ϵ for arbitrary δ,ϵ>0\delta, \epsilon > 0δ,ϵ>0.

Formalization Note The paper has Pr⁡(t(n)∈Dn)>1−δ\Pr(\mathbf t(n) \in \mathcal D_n) > 1 - \deltaPr(t(n)∈Dn​)>1−δ and a strict bound <ϵ< \epsilon<ϵ in (7); the hypotheses here are the non-strict forms, which are weaker, so the statement is stronger and still the paper's inequality. The probability of the complement is Measure.pi (fun _ : Fin n => μ) Dᶜ, the outer measure when D\mathcal DD is not measurable. Measurability of l(h,⋅)l(h, \cdot)l(h,⋅) is added.

Preamble
import Mathlib
import Definitions.Def_XuMannorRobust_WeakRobust_Setup

open MeasureTheory
Formal statement
namespace XuMannorRobust.WeakRobust

/-- Xu & Mannor 2012, p. 410, proof of Theorem 8 (sufficiency display): if a set `D ⊆ Zⁿ` has
`Pr(t(n) ∉ D) ≤ δ` and every `ŝ ∈ D` has `|L(h, ŝ) − L(h, s)| ≤ ε`, then
`|𝓛(h) − L(h, s)| ≤ δ M + ε`, for a loss measurable with values in `[0, M]` and `n ≥ 1`. -/
theorem theorem8_sufficiency_bound {Z H : Type*} [MeasurableSpace Z] (μ : Measure Z)
    [IsProbabilityMeasure μ] (l : H → Z → ℝ) (M : ℝ)
    (hl_bound : ∀ h z, 0 ≤ l h z ∧ l h z ≤ M) (hl_meas : ∀ h, Measurable (l h))
    {n : ℕ} (hn : 0 < n) (h : H) (s : Fin n → Z) (D : Set (Fin n → Z))
    (δ ε : ℝ) (hδ : 0 ≤ δ) (hε : 0 ≤ ε)
    (hD : Measure.pi (fun _ : Fin n => μ) Dᶜ ≤ ENNReal.ofReal δ)
    (hDε : ∀ t ∈ D, |avgLoss l h t - avgLoss l h s| ≤ ε) :
    |expectedLoss μ l h - avgLoss l h s| ≤ δ * M + ε := by sorry

end XuMannorRobust.WeakRobust
Source
Xu & Mannor, Robustness and Generalization, Mach Learn 86 (2012), DOI 10.1007/s10994-011-5268-1, p. 410, proof of Theorem 8, sufficiency display (bound δM + ϵ)
Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 1, 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