Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 29.3(2), lower bound: agnostic multiclass learning needs Ω((d+log⁡(1/δ))/ϵ2)\Omega((d + \log(1/\delta))/\epsilon^2)Ω((d+log(1/δ))/ϵ2) examples

Proved
UnderstandingML.multiclass_agnostic_lower_bound

by Gabewhigham · Sep 25, 2026 · Mathlib 0df444a (Lean v4.33.1)

machine-learningmulticlass

This is the lower half of item 2 of the Multiclass Fundamental Theorem.

Let XXX be a domain with a σ\sigmaσ-algebra containing all singletons, let YYY be a finite label set with k=∣Y∣k = |Y|k=∣Y∣ (also with measurable singletons), and let H⊆YXH \subseteq Y^XH⊆YX be a class of measurable hypotheses with Natarajan dimension Ndim⁡(H)=d\operatorname{Ndim}(H) = dNdim(H)=d (Definition 29.2). The loss is the multiclass 000–111 loss ℓ(h,(x,y))=1[h(x)≠y]\ell(h,(x,y)) = \mathbb{1}[h(x) \ne y]ℓ(h,(x,y))=1[h(x)=y]. Assume d≥2d \ge 2d≥2.

There are absolute constants C1,ϵ0,δ0>0C_1, \epsilon_0, \delta_0 > 0C1​,ϵ0​,δ0​>0 (independent of XXX, YYY, HHH and ddd) such that the following holds. If a learning algorithm AAA (returning hypotheses in HHH) agnostically PAC learns HHH (Definition 3.4) with sample-complexity function mHm_HmH​, then

C1 d+log⁡(1/δ)ϵ2≤mH(ϵ,δ)for all 0<ϵ<ϵ0, 0<δ<δ0.C_1\,\frac{d + \log(1/\delta)}{\epsilon^2} \le m_H(\epsilon,\delta) \qquad \text{for all } 0 < \epsilon < \epsilon_0,\ 0 < \delta < \delta_0 .C1​ϵ2d+log(1/δ)​≤mH​(ϵ,δ)for all 0<ϵ<ϵ0​, 0<δ<δ0​.

The corresponding lower bound on mHUCm^{UC}_HmHUC​ in item 1 follows, since uniform convergence with mHUCm^{UC}_HmHUC​ makes any ERM learner an agnostic PAC learner with mHUC(ϵ/2,δ)m^{UC}_H(\epsilon/2,\delta)mHUC​(ϵ/2,δ) examples.

Formalization Note Agnostic PAC learnability is the generic Definition 3.4 of Mission I, instantiated with the multiclass 000–111 loss; it requires the algorithm's outputs to lie in HHH.

Preamble
import Definitions.Def_UnderstandingML_MulticlassLearnability

open MeasureTheory
open scoped InnerProductSpace
Formal statement
universe u v

namespace UnderstandingML

/-- **Theorem 29.3, part 2 (lower bound)** (p. 403). There are absolute constants
`C₁, ε₀, δ₀ > 0` such that for every measurable class `H` of functions from `X` to a finite label
set `Y` with Natarajan dimension `d ≥ 2`, every learner `A` and every sample-complexity function
`m_H` with which `A` agnostically PAC learns `H` (multiclass 0–1 loss) satisfy
`C₁ (d + log(1/δ))/ε² ≤ m_H(ε, δ)` whenever `0 < ε < ε₀` and `0 < δ < δ₀`. -/
theorem multiclass_agnostic_lower_bound :
    ∃ C₁ ε₀ δ₀ : ℝ, 0 < C₁ ∧ 0 < ε₀ ∧ 0 < δ₀ ∧
      ∀ {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSingletonClass X]
        [MeasurableSpace Y] [MeasurableSingletonClass Y] [Fintype Y]
        (H : Set (X → Y)) (d : ℕ), (∀ h ∈ H, Measurable h) → ndim H = d → 2 ≤ d →
        ∀ (A : Learner (X × Y) (X → Y)) (mH : ℝ → ℝ → ℕ), IsAgnosticPACWith lossMulti H A mH →
          ∀ ε δ : ℝ, 0 < ε → ε < ε₀ → 0 < δ → δ < δ₀ →
            C₁ * (d + Real.log (1 / δ)) / ε ^ 2 ≤ mH ε δ := by sorry

end UnderstandingML
Source
S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, Chapter 29, Theorem 29.3 (The Multiclass Fundamental Theorem), p. 403, item 2 (lower bound on the agnostic sample complexity)

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