Uniform margin generalization bounds via Rademacher complexity #
The margin generalization bounds in CslibFrontier.MachineLearning.Rademacher.Margin hold for a
margin threshold ρ > 0 fixed before the sample is drawn. Stratifying (0, r] by the geometric
grid ρₙ = r / 2^(n + 1) with failure-probability weights δₙ = δ / ((n + 1) (n + 2))
(∑' n, 1 / ((n + 1) (n + 2)) = 1 by telescoping) and taking a countable union bound upgrades
those fixed-ρ bounds to hold simultaneously for all h ∈ H and all ρ ∈ (0, r]
[MohriRostamizadehTalwalkar2018, Theorem 5.9] [KP02].
For any ρ ∈ (0, r], choosing n : ℕ with r / 2^(n + 1) < ρ ≤ r / 2^n yields:
marginLoss ρₙ u ≤ marginLoss ρ u(marginLossis monotone inρ > 0),2 / ρₙ ≤ 4 / ρ, and(n + 1) (n + 2) ≤ 2 (n + 1)² ≤ 2 (log₂ (2 r / ρ))², solog (1 / δₙ)is bounded by2 log (log₂ (2 r / ρ)) + log (2 / δ).
Splitting the square root with √(a + b) ≤ √a + √b gives:
- with
R_m(H):Pr_D[signVal y * h x ≤ 0] ≤ R̂_{S, ρ}(h) + (4 / ρ) R_m(H) + √(log (log₂ (2 r / ρ)) / m) +√(log (2 / δ) / (2 m)); - with
R̂_{S_X}(H):Pr_D[signVal y * h x ≤ 0] ≤ R̂_{S, ρ}(h) + (4 / ρ) R̂_{S_X}(H) +3 √(log (log₂ (2 r / ρ)) / m) + 3 √(log (4 / δ) / (2 m)).
Main results #
Cslib.MachineLearning.marginLoss_mono_of_pos,Cslib.MachineLearning.empiricalMarginLoss_mono_of_pos: monotonicity of theρ-margin loss inρ > 0.Cslib.MachineLearning.uniform_rademacherComplexity_margin_bound: uniform-in-ρmargin generalization bound viaR_m(H)[MohriRostamizadehTalwalkar2018, Theorem 5.9].Cslib.MachineLearning.uniform_empiricalRademacherComplexity_margin_bound: data-dependent uniform-in-ρmargin generalization bound viaR̂_{S_X}(H).
References #
Monotonicity in the margin parameter #
The ρ-margin loss Φ_ρ(u) is monotone in ρ > 0: a larger margin threshold ρ₂ ≥ ρ₁ > 0
penalizes every point at least as heavily.
Dyadic stratification helpers #
Uniform-in-ρ margin generalization bounds #
Uniform margin generalization bound [MohriRostamizadehTalwalkar2018, Theorem 5.9]
[KP02]: for a uniformly bounded class H : Set (α → ℝ) on a finite domain α,
a scale r > 0, m > 0 independent draws from D : PMF (α × Bool), and δ > 0, with
probability at least 1 - δ every h ∈ H and every ρ ∈ (0, r] simultaneously satisfy
Pr_D[signVal y * h x ≤ 0] ≤ R̂_{S, ρ}(h) + (4 / ρ) R_m(H)
+ √(log (log₂ (2 r / ρ)) / m) + √(log (2 / δ) / (2 m)).
Obtained by a countable union bound over rademacherComplexity_margin_bound at dyadic scales
ρₙ = r / 2^(n + 1) with failure budgets δₙ = δ / ((n + 1) (n + 2)).
Data-dependent uniform margin generalization bound [MohriRostamizadehTalwalkar2018,
Theorem 5.9] [KP02]: for a uniformly bounded class H : Set (α → ℝ) on a
finite domain α, a scale r > 0, m > 0 independent draws from D : PMF (α × Bool), and
δ > 0, with probability at least 1 - δ every h ∈ H and every ρ ∈ (0, r] simultaneously
satisfy
Pr_D[signVal y * h x ≤ 0] ≤ R̂_{S, ρ}(h) + (4 / ρ) R̂_{S_X}(H)
+ 3 √(log (log₂ (2 r / ρ)) / m) + 3 √(log (4 / δ) / (2 m)).
Here S_X is the unlabeled sample fun i => (S i).1. Note the constant 4 / δ arises from
substituting δₙ = δ / ((n + 1) (n + 2)) into log (2 / δₙ).