Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Corollary 17.1: Multiclass SVM with λ = √(2ρ²/(B²m)) has E_S[L^Δ_D(h_w)] ≤ E_S[L^{g-hinge}_D(w)] ≤ min_{‖u‖≤B} L^{g-hinge}_D(u) + √(8ρ²B²/m) when ‖Ψ(x,y)‖ ≤ ρ/2

Proved
UnderstandingML.multiclass_svm_bound

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

generalization-boundmulticlassregularizationsupport-vector-machines

Corollary 17.1. Let DDD be a distribution over X×YX \times YX×Y, let Ψ:X×Y→Rd\Psi : X \times Y \to \mathbb{R}^dΨ:X×Y→Rd, and assume that for all x∈Xx \in Xx∈X and y∈Yy \in Yy∈Y we have ∥Ψ(x,y)∥≤ρ/2\|\Psi(x,y)\| \le \rho/2∥Ψ(x,y)∥≤ρ/2. Let B>0B > 0B>0. Consider running Multiclass SVM with λ=2ρ2B2m\lambda = \sqrt{\frac{2\rho^2}{B^2 m}}λ=B2m2ρ2​​ on a training set S∼DmS \sim D^mS∼Dm and let hwh_whw​ be the output of Multiclass SVM. Then

ES∼Dm[LDΔ(hw)]≤ES∼Dm[LDg-hinge(w)]≤min⁡u:∥u∥≤BLDg-hinge(u)+8ρ2B2m,\mathbb{E}_{S \sim D^m}[L^\Delta_D(h_w)] \le \mathbb{E}_{S \sim D^m}[L^{g\text{-}hinge}_D(w)] \le \min_{u : \|u\| \le B} L^{g\text{-}hinge}_D(u) + \sqrt{\frac{8\rho^2B^2}{m}},ES∼Dm​[LDΔ​(hw​)]≤ES∼Dm​[LDg-hinge​(w)]≤u:∥u∥≤Bmin​LDg-hinge​(u)+m8ρ2B2​​,

where LDΔ(h)=E(x,y)∼D[Δ(h(x),y)]L^\Delta_D(h) = \mathbb{E}_{(x,y) \sim D}[\Delta(h(x), y)]LDΔ​(h)=E(x,y)∼D​[Δ(h(x),y)] and LDg-hinge(w)=E(x,y)∼D[ℓ(w,(x,y))]L^{g\text{-}hinge}_D(w) = \mathbb{E}_{(x,y) \sim D}[\ell(w,(x,y))]LDg-hinge​(w)=E(x,y)∼D​[ℓ(w,(x,y))].

Formally: for a finite label set, Δ≥0\Delta \ge 0Δ≥0 with Δ(y,y)=0\Delta(y,y) = 0Δ(y,y)=0, measurable Ψ(⋅,y)\Psi(\cdot, y)Ψ(⋅,y), m≥1m \ge 1m≥1, the RLM learner for the generalized hinge loss (measurable, automatic for the unique minimizer), and the canonical argmax predictor of its output.

Preamble
import Definitions.Def_UnderstandingML_Multiclass

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **Corollary 17.1** (pp. 234–235). Let `D` be a distribution over `X × Y`, `Ψ : X × Y → ℝ^d` with
`‖Ψ(x, y)‖ ≤ ρ/2` for all `x, y`, and `B > 0`. Consider running Multiclass SVM (the RLM rule for
the generalized hinge loss) with `λ = √(2ρ²/(B²m))` on `S ∼ D^m`, and let `h_w` be its output.
Then `E_S[L^Δ_D(h_w)] ≤ E_S[L^{g-hinge}_D(w)] ≤ min_{‖u‖ ≤ B} L^{g-hinge}_D(u) + √(8ρ²B²/m)`.
Stated for a finite label set with `Δ ≥ 0`, `Δ(y, y) = 0`, measurable `Ψ(·, y)`, `m ≥ 1`, and a
measurable RLM learner (automatic for the unique minimizer). -/
theorem multiclass_svm_bound {d : ℕ} {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y]
    [MeasurableSingletonClass Y] [Fintype Y] [Nonempty Y] (Δ : Y → Y → ℝ)
    (hΔ : ∀ y' y, 0 ≤ Δ y' y) (hΔ0 : ∀ y, Δ y y = 0) (Ψ : X → Y → Vec d)
    (hΨ : ∀ y, Measurable (fun x ↦ Ψ x y)) {ρ B : ℝ} (hρ : 0 < ρ) (hB : 0 < B)
    (hbound : ∀ x y, ‖Ψ x y‖ ≤ ρ / 2) (D : Measure (X × Y)) [IsProbabilityMeasure D]
    (A : Learner (X × Y) (Vec d))
    (hA : ∀ (m : ℕ) (S : Fin m → X × Y),
      IsRLM (genHingeLoss Δ Ψ) (Real.sqrt (2 * ρ ^ 2 / (B ^ 2 * m))) S (A m S))
    (hAmeas : ∀ m, Measurable (A m)) (m : ℕ) (hm : 0 < m) :
    ∫ S, risk (deltaLoss Δ Ψ) D (A m S) ∂(iidLaw D m) ≤
        ∫ S, risk (genHingeLoss Δ Ψ) D (A m S) ∂(iidLaw D m) ∧
    ∀ u : Vec d, ‖u‖ ≤ B →
      ∫ S, risk (genHingeLoss Δ Ψ) D (A m S) ∂(iidLaw D m) ≤
        risk (genHingeLoss Δ Ψ) D u + Real.sqrt (8 * ρ ^ 2 * B ^ 2 / m) := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §17.2.5 pp. 234-235, Corollary 17.1 (from Corollary 13.8 and §17.2.4)
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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