AdaBoost #
AdaBoost [FS97] on a finite labelled sample S : Fin m → α × Bool, with a weak
learner A : (Fin m → ℝ) → α → Bool that maps weights on the sample to a hypothesis. Round t
(a Round: weights and hypothesis) has weights Dₜ, weighted error εₜ and vote weight
wₜ = ½ log ((1 - εₜ) / εₜ); the next weights multiply Dₜ i by exp (-wₜ yᵢ hₜ(xᵢ)) (signs
±1, via BitString.signVal) and renormalize (rounds_weights_succ). The output is the sign of
the weighted vote ∑ₜ wₜ hₜ.
The weights are the multiplicative-update distribution of the experts setting
(CslibFrontier/MachineLearning/OnlineLearning/MultiplicativeUpdate.lean) with the sample points
as experts, update factor exp, and the adaptive loss sequence chosen by the weak learner. The
proof of the training-error bound is the potential argument of that file: each misclassified point
has weight at least 1, and the potential is m times the product of the normalizers, each equal
to 2 √(εₜ (1 - εₜ)).
Main definitions #
Round: the state of a round (weights and weak hypothesis), withRound.errorandRound.vote.rounds S A t: roundtof AdaBoost.score S A T: the weighted vote of the firstTrounds.adaBoost S A T: the output ofTrounds.IsWeakLearner S A γ: on every positive distribution onS,Ahas weighted error at most1/2 - γ.
Main results #
rounds_weights_succ: the AdaBoost reweighting step.sum_mul_exp_pointLoss: the normalizer of a round is2 √(ε (1 - ε)).empiricalMiscount_adaBoost_le_prod: the training error is at most∏ₜ 2 √(εₜ (1 - εₜ)).empiricalMiscount_adaBoost_le_exp_sum: the training error is at mostexp (-2 ∑ₜ (1/2 - εₜ)²).empiricalMiscount_adaBoost_le_exp: if everyεₜ ≤ 1/2 - γ, the training error is at mostexp (-2 γ² T).IsWeakLearner.empiricalMiscount_adaBoost_eq_zero: with a weak learner of edgeγandlog m < 2 γ² T, the output is consistent with the sample.
Model and differences from the sources #
[ShalevShwartzBenDavid2014, Theorem 10.2] states the exp (-2 γ² T) bound and proves the product
form on pp. 135–137; [MohriRostamizadehTalwalkar2018, Theorem 7.2] states both through
exp (-2 ∑ₜ (1/2 - εₜ)²) and proves the product form. Differences:
- A round with
εₜ = 0makeswₜinfinite in the sources. Here AdaBoost stops at the first such round and returns its hypothesis, which is consistent with the sample. - The product form assumes
εₜ < 1(atεₜ = 1the factor vanishes but the vote weight in Lean islog 0 / 2 = 0). - A tie in the vote predicts
false. This misclassifies no more points than the sources' count, which treats a tie as an error. - The weak learner is deterministic, with the edge as a hypothesis on the rounds (or on all
positive distributions in
IsWeakLearner); SSBD's weak learner may fail with probabilityδ(Remark 10.2), which a union bound handles outside this statement. - Margin-based generalization bounds for AdaBoost (independent of the number of rounds
T) are provided separately inCslibFrontier.MachineLearning.Boosting.Margin(convexHull_margin_bound,adaBoost_uniform_margin_bound_vc, andadaBoost_generalization_bound_of_edge).
References #
The vote weight ½ log ((1 - ε) / ε) of a weak hypothesis with weighted error ε.
The exponential loss of h at the labelled point z with vote weight w: -w if h labels
z correctly and w otherwise, written with the signs signVal of the prediction and the label.
AdaBoost multiplies the weight of z by exp of this loss.
Defining equation for Round.error.
Defining equation for Round.vote.
The rounds of AdaBoost on the sample S with the weak learner A: round t has the weights
of the multiplicative update with factor exp against the losses lossSeq, which start uniform,
and the hypothesis A returns for them.
The AdaBoost update [ShalevShwartzBenDavid2014, Section 10.2]: the weight of a sample point
is multiplied by exp (-wₜ yᵢ hₜ(xᵢ)), its exponential loss, and the weights are renormalized.
The AdaBoost normalizer [ShalevShwartzBenDavid2014, proof of Theorem 10.2]: under a
distribution D on the sample, if the hypothesis h has weighted error ε with 0 < ε < 1, then
reweighting by the exponential loss with vote weight voteWeight ε multiplies the total weight by
2 √(ε (1 - ε)).
The weighted vote of the first T rounds at x: the total vote weight of the hypotheses
predicting true minus that of the hypotheses predicting false (signVal true = -1).
AdaBoost [FS97] run for T rounds on the sample S with the weak learner
A. If some round before T has weighted error 0, the output is the hypothesis of the first
such round (AdaBoost stops there). Otherwise it is the sign of the weighted vote score, with ties
going to false.
When some round before T has weighted error 0, adaBoost returns the hypothesis of the
first such round.
The cumulative loss at a sample point is the weighted vote times the sign of the label: it is nonnegative exactly where the vote disagrees with the label.
A round with weighted error 0 has a hypothesis consistent with the sample, since every
sample point has positive weight.
The number of sample points where the weighted vote errs is at most the potential of the
multiplicative update, since each such point has weight at least 1.
Exact potential of the exponential multiplicative update in AdaBoost after T rounds,
when every round before T has weighted error in (0, 1).
The AdaBoost training-error bound, product form ([SSBD14], proof of
Theorem 10.2; [MRT18], proof of Theorem 7.2): if every round before T
has weighted error εₜ < 1, the fraction of sample points that the output of T rounds of
AdaBoost misclassifies is at most ∏ₜ 2 √(εₜ (1 - εₜ)). A round with εₜ = 0 stops AdaBoost with
a consistent hypothesis.
The AdaBoost training-error bound in terms of the edges [MohriRostamizadehTalwalkar2018,
Theorem 7.2, (7.3)]: if every round before T has weighted error εₜ < 1, the fraction of sample
points that the output of T rounds misclassifies is at most exp (-2 ∑ₜ (1/2 - εₜ)²).
The AdaBoost training-error bound, exponential form [ShalevShwartzBenDavid2014,
Theorem 10.2; MohriRostamizadehTalwalkar2018, Theorem 7.2, (7.4)]: if every round before T has
weighted error at most 1/2 - γ with γ ≥ 0, the fraction of sample points that the output of
T rounds misclassifies is at most exp (-2 γ² T).
The weak learner A has edge γ on the sample S: for every distribution on the sample with
positive weights, the hypothesis it returns has weighted error at most 1/2 - γ.
Weak learning gives consistency, a consequence of [ShalevShwartzBenDavid2014, Theorem 10.2]:
against a weak learner with edge γ ≥ 0, AdaBoost run for T rounds with log m < 2 γ² T
returns a hypothesis that is consistent with the sample.
Under the hypotheses of empiricalMiscount_adaBoost_eq_zero, the output labels every sample
point correctly.