Rademacher Complexity #
Measure-theoretic complexity measure. Upper bounds generalization error. Upper bounded by VC dimension. Bridges to lean-rademacher library (K₂).
Main results #
rademacherCorrelation_abs_le_one: |corr(h,σ,xs)| ≤ 1empiricalRademacherComplexity_le_one: EmpRad ≤ 1rademacherComplexity_le_one: Rad ≤ 1 (population)rademacherComplexity_nonneg: 0 ≤ Radvcdim_bounds_rademacher_quantitative: Rad ≤ √(2d·log(em/d)/m)rademacher_vanishing_imp_pac: uniform Rad vanishing → PACvcdim_finite_imp_rademacher_vanishing: VCDim < ⊤ → Rad → 0
Equations
- rademacherCorrelation h σ xs = if _hm : m = 0 then 0 else 1 / ↑m * ∑ i : Fin m, boolToSign (σ i) * boolToSign (h (xs i))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- RademacherComplexity X C D m = ∫ (xs : Fin m → X), EmpiricalRademacherComplexity X C xs ∂MeasureTheory.Measure.pi fun (x : Fin m) => D
Instances For
Helpers for VCDim → Rademacher bound (Massart + Sauer-Shelah) #
Rademacher MGF bound.
Massart finite lemma: E_σ[max_{j ≤ N} Z_j] ≤ σ√(2 log N).
Helper lemmas for Sauer-Shelah exponential bound #
VCDim → Rademacher bound #
VC dimension upper bounds Rademacher complexity: Rad ≤ √(2d·log(em/d)/m).
The proof decomposes into: (1) Pointwise: EmpRad(xs) ≤ B for all xs [Massart + Sauer-Shelah] (2) Integral: Rad = ∫ EmpRad ≤ ∫ B = B [probability measure]
Step (2) is proved. Step (1) for B ≥ 1 follows from EmpRad ≤ 1. Step (1) for B < 1 requires Massart finite lemma + Sauer-Shelah growth bound.
Rademacher ↔ PAC #
Adversarial Rademacher lower bound on shattered sets. For |T| >= 4m^2 + 1, exists D with Rad_m(C,D) >= 1/2.
Proof: D = uniform on T. Product measure = uniform on T^m. On injective samples from T (shattered): EmpRad = 1 (by empRad_eq_one_of_injective_in_shattered). EmpRad ≥ 0 everywhere (by empRad_nonneg). Birthday bound: P[injective m draws from n ≥ 4m²+1 points] ≥ 1 - m(m-1)/(2n) ≥ 7/8 ≥ 1/2. So ∫ EmpRad ≥ P[injective] · 1 + P[¬injective] · 0 ≥ 1/2.
VCDim finite → Rademacher vanishes uniformly. The bound m₀ depends only on d and ε, NOT on D.