Margin generalization bounds for boosting and AdaBoost #
This module proves the margin-based generalization theory for voting methods and AdaBoost [SFBL98] [MohriRostamizadehTalwalkar2018, Chapter 7]:
- Convex-hull generalization bounds (independent of ensemble size
T). Combining the convex-hull invariance of Rademacher complexity (R̂_S(conv H) = R̂_S(H),CslibFrontier.MachineLearning.Rademacher.ConvexHull) with the fixed-ρand uniform-in-ρmargin bounds (MarginandUniformMargin) yields risk bounds for every scoring functionf ∈ convexHull ℝ Hdirectly in terms of the base classH(R_m(H),R̂_{S_X}(H), or the VC dimension of a binary base classB). None of these bounds depends on the number of base hypotheses combined. - Normalized score of AdaBoost.
normalizedScore S A Tnormalizes-score S A TbytotalVote S A T = ∑ t < T, (rounds S A t).vote S(matchingRademacher/Margin's sign conventionsignVal true = -1,signVal false = +1, and falling back to the stopped round's sign function if some round achieves weighted error0). Whenever every roundt < Treturns a hypothesis inBwith weighted error< 1/2(T > 0),normalizedScore S A Tbelongs toconvexHull ℝ (signClass B), and every point misclassified byadaBoost S A Thas nonpositive signed marginsignVal y * normalizedScore S A T x ≤ 0. Thus the uniform margin bound applies simultaneously to all weak learnersAvalued inB, all round countsT > 0, and all marginsρ ∈ (0, 1]. - AdaBoost empirical margin distribution bound [SchapireFreundBartlettLee1998, Theorem 5].
The fraction of training examples on which
normalizedScore S A Thas margin at mostρis at most∏ t < T, 2 εₜ ^ ((1 - ρ) / 2) (1 - εₜ) ^ ((1 + ρ) / 2). Against edgeγ ∈ (0, 1/2)(εₜ ≤ 1/2 - γ) and margin0 ≤ ρ ≤ 2 γ, this is at most((1 - 2 γ) ^ (1 - ρ) * (1 + 2 γ) ^ (1 + ρ)) ^ (T / 2). For0 ≤ ρ ≤ γ, the base factor is strictly less than1and bounded byexp (-2 γ (γ - ρ)), recovering AdaBoost'sexp (-2 γ² T)training-error bound atρ = 0and driving theρ-margin loss exponentially to zero for allρ < γ. - End-to-end AdaBoost margin generalization bound. Combining the uniform VC margin bound with
the exponential training-margin decay bounds the true error of
adaBoost S A Tsimultaneously for all weak learnersAvalued inB, allT > 0, and allρ ∈ (0, γ].
Sign convention note #
In Cslib.BitString, signVal true = -1 and signVal false = +1. In AdaBoost.lean, score
negates the weighted sum of signVal ((rounds S A t).hyp x) so that 0 < score predicts true.
Here normalizedScore reverses that negation (-score / totalVote) so it equals the convex
combination ∑ t < T, (wₜ / Z) * signVal (hₜ x) ∈ convexHull ℝ (signClass B) matching
Rademacher/Margin's signed margin signVal y * f x.
Main definitions #
Cslib.MachineLearning.Boosting.totalVote: sum∑ t ∈ range T, (rounds S A t).vote Sof vote weights across the firstTrounds.Cslib.MachineLearning.Boosting.normalizedScore: normalized ensemble scoring function inconvexHull ℝ (signClass B).
Main results #
Cslib.MachineLearning.Boosting.convexHull_margin_bound: fixed-ρmargin bound overconvexHull ℝ H[MohriRostamizadehTalwalkar2018, Section 7.3.3, Corollary 7.5, p. 158].Cslib.MachineLearning.Boosting.convexHull_uniform_margin_bound,Cslib.MachineLearning.Boosting.convexHull_uniform_empirical_margin_bound: uniform-in-ρmargin bounds overconvexHull ℝ H[MohriRostamizadehTalwalkar2018, Theorem 5.9 and Lemma 7.4].Cslib.MachineLearning.Boosting.convexHull_signClass_vc_uniform_margin_bound: uniform margin bound forconvexHull ℝ (signClass B)in terms of the VC dimensiondofB[SchapireFreundBartlettLee1998, Theorem 2] [MohriRostamizadehTalwalkar2018, Section 7.3.3, Corollary 7.6 fixed-ρVC bound with uniform-in-ρremark via Theorem 5.9, p. 158].Cslib.MachineLearning.Boosting.normalizedScore_mem_convexHull:normalizedScore S A Tlies inconvexHull ℝ (signClass B).Cslib.MachineLearning.Boosting.adaBoost_uniform_margin_bound_vc:T-independent uniform margin bound for the output classifieradaBoost S A T[SchapireFreundBartlettLee1998, Theorem 2].Cslib.MachineLearning.Boosting.marginCount_normalizedScore_le_prod,Cslib.MachineLearning.Boosting.marginCount_normalizedScore_le_pow,Cslib.MachineLearning.Boosting.marginCount_normalizedScore_le_exp: exponential decay of the empirical margin distribution of AdaBoost [SchapireFreundBartlettLee1998, Theorem 5].Cslib.MachineLearning.Boosting.adaBoost_generalization_bound_of_edge: end-to-end true-error bound for AdaBoost under an edge hypothesisεₜ ≤ 1/2 - γ(forρ ∈ (0, γ]).
References #
- R. E. Schapire, Y. Freund, P. Bartlett, W. S. Lee, Boosting the Margin: A New Explanation for the Effectiveness of Voting Methods, Theorem 2 (uniform VC margin bound, §2.3, author PDF pp. 9–10) and Theorem 5 (empirical margin distribution bound, §3, author PDF p. 12)
- M. Mohri, A. Rostamizadeh, A. Talwalkar, Foundations of Machine Learning, 2nd
ed., Section 5.4, p. 96 (Theorem 5.9) and Section 7.3.3,
pp. 157–160 (Lemma 7.4, Corollary 7.5 fixed-
ρRademacher margin bound, Corollary 7.6 fixed-ρVC margin bound with uniform-in-ρremark via Theorem 5.9, and Theorem 7.7 AdaBoost empirical margin decay) - V. Koltchinskii, D. Panchenko, Empirical margin distributions and bounding the generalization error of combined classifiers
Convex-hull margin bounds (independent of ensemble size) #
Fixed-margin generalization bound for convex combinations
[MohriRostamizadehTalwalkar2018, Section 7.3.3, Corollary 7.5, p. 158]: for a
uniformly bounded base class H : Set (α → ℝ) on a finite domain α, fixed margin ρ > 0,
m > 0 independent draws from D : PMF (α × Bool), and δ > 0, with probability at least
1 - δ every f ∈ convexHull ℝ H satisfies
Pr_D[signVal y * f x ≤ 0] ≤ R̂_{S, ρ}(f) + (2 / ρ) R_m(H) + √(log (1 / δ) / (2 m)).
Uniform margin generalization bound for convex combinations
[MohriRostamizadehTalwalkar2018, Theorem 5.9 and Lemma 7.4] (uniform-in-ρ counterpart of
Corollary 7.5, Section 7.3.3, pp. 157–158): with probability at least 1 - δ, simultaneously for
every f ∈ convexHull ℝ H and every ρ ∈ (0, r],
Pr_D[signVal y * f x ≤ 0] ≤ R̂_{S, ρ}(f) + (4 / ρ) R_m(H)
+ √(log (log₂ (2 r / ρ)) / m) + √(log (2 / δ) / (2 m)).
Data-dependent uniform margin generalization bound for convex combinations
[MohriRostamizadehTalwalkar2018, Theorem 5.9 and Lemma 7.4] (uniform-in-ρ counterpart of
Corollary 7.5, Section 7.3.3, pp. 157–158): same guarantee with the empirical Rademacher complexity
R̂_{S_X}(H) of the base class H on the unlabeled sample.
Uniform VC-dimension margin bound for convex combinations of binary classifiers
[SchapireFreundBartlettLee1998, Theorem 2] [MohriRostamizadehTalwalkar2018, Section 7.3.3,
Corollary 7.6 fixed-ρ VC bound with uniform-in-ρ remark via Theorem 5.9, p. 158]: if every
finite set shattered by C : ConceptClass α Bool has size at most d ≤ m, then on a finite domain
α, with probability at least 1 - δ over S ~ D^m, every f ∈ convexHull ℝ (signClass C) and
every margin ρ ∈ (0, 1] satisfy
Pr_D[signVal y * f x ≤ 0] ≤ R̂_{S, ρ}(f) + (4 / ρ) √(2 d log (e m / d) / m)
+ √(log (log₂ (2 / ρ)) / m) + √(log (2 / δ) / (2 m)).
Normalized AdaBoost score and convex-hull membership #
The normalized scoring function of T rounds of AdaBoost, scaled into [-1, 1] using the
signVal convention (signVal true = -1, signVal false = +1): if some round t < T has
weighted error 0, it returns signVal ∘ hₜ for the first such round; otherwise it returns
-score S A T / totalVote S A T, i.e., ∑ t < T, (wₜ / Z) · signVal (hₜ x).
When some round t < T achieves weighted error 0, normalizedScore is the sign of that
first consistent round's hypothesis.
When no round t < T has weighted error 0, normalizedScore equals
-score S A T / totalVote S A T.
Total vote weight is strictly positive when T > 0 and every round has weighted error in
(0, 1/2).
When T > 0 and every round t < T chooses a hypothesis in C with weighted error < 1/2,
normalizedScore S A T lies in convexHull ℝ (signClass C).
Every point misclassified by adaBoost S A T has nonpositive signed margin under
normalizedScore S A T (provided 0 < totalVote S A T when no round has zero error).
Uniform T-independent margin bound for AdaBoost
[SchapireFreundBartlettLee1998, Theorem 2] [MohriRostamizadehTalwalkar2018, Section 7.3.3,
Corollary 7.6 fixed-ρ VC bound with uniform-in-ρ remark via Theorem 5.9, p. 158]: on a finite
domain α, for a base class
C : ConceptClass α Bool with every shattered finite set of size at most
d ≤ m, with probability at least 1 - δ over S ~ D^m, every weak learner A whose
first T > 0 rounds lie in C with weighted errors < 1/2 and every margin ρ ∈ (0, 1]
satisfy
Pr_D[adaBoost S A T x ≠ y] ≤ R̂_{S, ρ}(normalizedScore S A T)
+ (4 / ρ) √(2 d log (e m / d) / m) + √(log (log₂ (2 / ρ)) / m) + √(log (2 / δ) / (2 m)).
Note the bound does not depend on the number of boosting rounds T.
Empirical margin distribution of AdaBoost (Schapire–Freund–Bartlett–Lee 1998, Thm. 5) #
Exponential upper bound for the per-round margin factor: for 0 < γ < 1/2 and 0 ≤ ρ ≤ γ,
√((1 - 2 γ) ^ (1 - ρ) * (1 + 2 γ) ^ (1 + ρ)) ≤ exp (-2 γ (γ - ρ)). At ρ = 0, this recovers
exp (-2 γ²).
AdaBoost empirical margin distribution bound, product form
[SchapireFreundBartlettLee1998, Theorem 5]: for any ρ < 1, if every round t < T has weighted
error εₜ < 1/2 (so positive vote weight wₜ > 0, and if some round hits εₜ = 0 every point
has margin +1), the fraction of sample points with signed margin at most ρ under
normalizedScore S A T is at most
∏ t < T, 2 εₜ ^ ((1 - ρ) / 2) (1 - εₜ) ^ ((1 + ρ) / 2).
AdaBoost empirical margin distribution bound, edge form
[SchapireFreundBartlettLee1998, Theorem 5]: if every round t < T has weighted error at most
1/2 - γ with 0 < γ < 1/2, then for every margin ρ ∈ [0, 2 γ],
Pr_{i ∼ S}[yᵢ · normalizedScore(xᵢ) ≤ ρ] ≤ ((1 - 2 γ)^(1 - ρ) (1 + 2 γ)^(1 + ρ))^(T / 2).
Exponential decay of AdaBoost's empirical margin loss: if every round t < T has
weighted error at most 1/2 - γ (0 < γ < 1/2), then for every margin ρ ∈ [0, γ], the fraction
of training examples with margin at most ρ is at most exp (-2 γ (γ - ρ) T). Setting ρ = 0
recovers exp (-2 γ² T).
End-to-end margin generalization bound for AdaBoost under an edge assumption
[SchapireFreundBartlettLee1998, Theorems 2 and 5] [MohriRostamizadehTalwalkar2018, Section 7.3.3,
Corollary 7.6 fixed-ρ VC bound with uniform-in-ρ remark via Theorem 5.9 and Theorem 7.7,
pp. 158–160]: combines adaBoost_uniform_margin_bound_vc with
marginCount_normalizedScore_le_exp (R̂_{S, ρ} ≤ #{i | margin ≤ ρ} / m ≤ exp (-2 γ (γ - ρ) T)). On a finite domain α, for a base class C of VC dimension at most
d ≤ m, with probability at least 1 - δ over S ~ D^m, for every weak learner A returning
hypotheses in C with round errors ≤ 1/2 - γ (0 < γ < 1/2), every T > 0, and every margin
ρ ∈ (0, γ],
Pr_D[adaBoost S A T x ≠ y] ≤ exp (-2 γ (γ - ρ) T)
+ (4 / ρ) √(2 d log (e m / d) / m) + √(log (log₂ (2 / ρ)) / m) + √(log (2 / δ) / (2 m)).