Boosting: AdaBoost and Gradient Boosting
Anchor (Master): Hastie, Tibshirani & Friedman 2009 The Elements of Statistical Learning 2e §10.4-10.13 (exponential loss, gradient boosting, shrinkage, subsampling) and Ch. 16 (the margin view of ensembles); Friedman 2001 Ann. Statist. 29 (gradient boosting machine); Schapire, Freund, Bartlett & Lee 1998 Ann. Statist. 26 (margin theory of voting methods)
Intuition Beginner
Boosting builds a strong predictor out of many weak ones, hired one at a time. A weak learner is a rule that is only a little better than a coin flip — a shallow decision tree, sometimes a single yes/no question. On its own it is useless. But boosting runs a hiring process: it keeps a committee, sees where the committee currently gets things wrong, and hires the next weak rule specifically to handle those hard cases.
The trick is the weights. Every training case carries a weight that says how much it matters right now. At the start all cases matter equally. After each new rule joins, the cases it got wrong have their weight raised and the cases it got right have their weight lowered. So the next rule is trained on a reweighted dataset where the still-unsolved cases shout the loudest. Each rule chases the mistakes left behind by the ones before it.
When a rule is finished, it gets a vote in the final committee, and a good rule that made few weighted mistakes gets a louder vote than a barely-better-than-chance one. To predict a new case, every rule votes, the votes are added up with their weights, and the sign of the total is the answer. A flock of stumps, each near-useless, becomes a sharp classifier.
A useful contrast: bagging also combines many trees, but it grows them all in parallel on shuffled copies of the data and averages them to cancel out their noise. Boosting is sequential and corrective — it lowers the committee's mistakes, not just its jitter.
Visual Beginner
Picture three rounds on a scatter of plus and minus points. Round one draws a vertical line; a few points land on the wrong side, and we redraw them bigger. Round two draws a horizontal line aimed at those enlarged points; it fixes them but slips on others, which now grow. Round three cleans up again. No single line separates the data, but the weighted vote of the three does.
| Round | Who gets bigger weight | What the new rule targets |
|---|---|---|
| 1 | everyone equal | the best single split |
| 2 | round-1 mistakes | the points line 1 missed |
| 3 | round-2 mistakes | the points line 2 missed |
| Final | — | weighted vote of all three |
Reading across the panels: the data never changes, only the spotlight on it does, and the final boundary is built from rules that each saw a different version of the difficulty.
Worked example Beginner
Ten training points. A weak learner here is a single threshold rule. We run one round of boosting and read off the new vote and weights.
Start: all ten points have weight (they sum to ). The best weak rule we can find misclassifies exactly three of the ten points.
Step 1. Weighted error. The three wrong points each carry weight , so the weighted error is . The seven correct points contribute nothing to the error.
Step 2. The rule's vote. A rule that is right more often than wrong earns a positive vote, computed as . A perfect rule () would earn an enormous vote; a coin-flip rule () earns a vote of .
Step 3. Re-weight. Multiply each wrong point's weight by and leave the right points as they are. The three wrong points go from to each.
Step 4. Renormalize so the weights sum to again. The new total is . Dividing through, each wrong point now has weight and each right point .
What this tells us: after one round the three hard points carry each — more than double the of the easy ones — so the next weak rule is pulled toward fixing exactly the points the first rule missed, while the first rule keeps its vote in the final committee.
Check your understanding Beginner
Formal definition Intermediate+
Let the training sample be with , and let be a class of base ("weak") classifiers . Boosting produces an additive ensemble and predicts , where the and coefficients are chosen sequentially.
AdaBoost. Maintain weights on the sample, initialised . At round :
- Fit , with weighted error .
- Set the vote (a factor relative to the Freund-Schapire constant absorbs the symmetric coding; both conventions give the same classifier).
- Update and renormalise to sum to one. Since when correct and when wrong, this multiplies wrong points by and right points by .
The output is and .
Forward stagewise additive modelling. Given a loss and a basis , build where, at each step, , never revisiting the earlier terms. The margin of at a point is ; positive margin means correct classification with confidence .
Exponential loss. . Its population risk is , and AdaBoost is forward stagewise additive modelling under this loss (proved below).
Gradient boosting. For a differentiable loss , define the empirical risk as a function of the vector . The pseudo-residual at round is the negative gradient
a base learner (typically a regression tree) is fit by least squares to , and the update is with line-searched step and shrinkage (learning rate) .
The notation here — for indicators, , the margin , and the empirical risk — is recorded in _meta/NOTATION.md.
Counterexamples to common slips Intermediate+
"AdaBoost minimises the training misclassification rate directly." It does not. Each round minimises a weighted error to choose , but the quantity the whole procedure descends is the exponential loss , a smooth surrogate. The misclassification rate is only an upper-bounded by-product (the training-error theorem), not the objective.
"Exponential loss and binomial deviance give the same boosting algorithm." They share the same population minimiser (the half-log-odds), but exponential loss penalises large negative margins as , far more aggressively than deviance's . On mislabelled data this makes AdaBoost less robust; gradient boosting with deviance is the standard fix.
"More rounds always help, because boosting cannot overfit." The margin theory explains why test error often keeps falling after training error hits zero, but boosting can and does overfit — with noisy labels, deep base trees, or a vast number of rounds. Shrinkage, shallow trees, and early stopping are needed; the no-overfitting claim is a tendency, not a theorem.
Key theorem with proof Intermediate+
The signature result is that AdaBoost's training error is squeezed to zero exponentially fast, as long as every weak learner does a little better than chance. This is the quantitative payoff of reweighting, and it is what justifies calling a collection of barely-useful rules a strong learner.
Theorem (AdaBoost training-error bound; Freund-Schapire). Run AdaBoost for rounds, let be the weighted error at round , and let be the round- normalising constant (before renormalisation). Then the training misclassification rate of satisfies
In particular, if every weak learner satisfies , the training error is at most . [Freund 1997]
Proof. Unrolling the weight recursion from and writing each renormalisation factor as ,
Because the final weights are a probability vector, , so . The misclassification indicator is dominated by the exponential loss: if then and , so . Averaging gives
the first inequality of the claim. To evaluate , split the sum over correctly and incorrectly classified points. With weights normalised so , the wrong points carry total weight and the right points , and on wrong points, on right points, so
Minimising over : gives , i.e. — exactly the AdaBoost vote. Substituting back, and , so
Writing , , so . The elementary inequality at gives , and the product telescopes to .
Bridge. The choice was not an arbitrary scoring rule: the proof shows it is the unique value that minimises the round's normalising constant , and minimising each round is exactly greedy minimisation of , the exponential loss. This is the foundational reason the algorithm of reweighting-and-voting and the analysis of exponential-loss descent are one object, and it is exactly the equivalence the Advanced results prove in full as forward stagewise additive modelling. The telescoping identity generalises the single-round weight update into a closed form for the cumulative margin, which builds toward the population analysis where minimising pins to half the log-odds. The exponential bound appears again in the margin theory of 45.07.06, where the same domination is sharpened to control not just the sign of the margin but its distribution; putting these together, the bridge is that boosting drives the empirical margin distribution upward, and the training-error theorem is the crudest reading of that fact.
Exercises Intermediate+
Advanced results Master
AdaBoost is one algorithm read two ways: as reweight-and-vote and as coordinate-wise descent on exponential loss. The theory beyond the training-error bound concerns what that descent estimates, why it generalises beyond the point of zero training error, and how the same construction extends from one loss to all differentiable losses.
Theorem 1 (AdaBoost is forward stagewise additive modelling under exponential loss). With , the forward stagewise update has solution: is the minimiser of the weighted misclassification error with weights , and , after which the weights update multiplicatively as [Hastie 2009]. Thus the AdaBoost weights are the exponential-loss residual weights, and the AdaBoost vote is the stagewise-optimal coefficient. AdaBoost performs no explicit reweighting "by design"; the reweighting is the gradient of exponential loss.
Theorem 2 (population minimiser and the log-odds). The minimiser of the population exponential risk is , half the log-odds [Hastie 2009]. Inverting, , so the boosted score, after monotone transformation, is an estimate of the class-probability log-odds; the same minimiser is shared by the binomial deviance , which is why deviance is the robust drop-in replacement that penalises gross misclassification only linearly rather than exponentially. The sign of is the Bayes classifier, so exponential loss is classification-calibrated (Fisher-consistent).
Theorem 3 (gradient boosting as steepest descent in function space). Treat as a function of the vector . The unconstrained steepest-descent step is , with gradient components . Restricting the step to the span of a base-learner class, gradient boosting fits — the least-squares projection of the negative gradient onto — and sets with line search and shrinkage [Friedman 2001]. This is functional gradient descent (cross-ref the first-order optimisation theory of 44.06): the only departures from textbook steepest descent are that the gradient lives in over the training inputs and the step is forced into so it generalises off-sample.
Theorem 4 (margin distribution and resistance to overfitting). Define the normalised margin of the voting classifier as . For voting classifiers, with probability over the sample, for all simultaneously,
where is a complexity measure (e.g. the VC dimension of ); the bound does not depend on the number of rounds [Schapire 1998]. Because AdaBoost continues to increase the margins of training points after the training error reaches zero, the right-hand side keeps decreasing, which is the margin-theoretic account of why test error often falls past the zero-training-error point. The account is partial: boosting can overfit when labels are noisy or base learners too rich, and the margin bound is loose; shrinkage, shallow trees, subsampling, and early stopping remain necessary regularisers.
Synthesis. The central insight is that AdaBoost is exponential-loss minimisation by coordinate descent over the dictionary of weak learners, and every operational feature follows from that one identification. The vote is the stagewise-optimal step (Theorem 1), the reweighting is the loss gradient, and the training-error theorem is just the statement that greedy descent on drives the surrogate — and hence the misclassification rate it dominates — to zero. Putting these together with the population analysis, minimising exponential risk pins the boosted score to half the log-odds (Theorem 2), so boosting is not merely a classifier but a probability estimator, and this is exactly the fact that generalises AdaBoost to gradient boosting: once boosting is descent on a loss, any differentiable loss will do, and the pseudo-residual fit of Theorem 3 is the foundational reason a single framework covers regression, robust regression, and classification. The bridge to generalisation is the margin distribution (Theorem 4): the training-error bound controls only the sign of the margin, while the margin theory controls its spread, and boosting's empirical tendency to keep enlarging margins after zero training error is what the round-independent bound formalises. This is dual to bagging's variance reduction proved for trees in 45.08.04: bagging averages independent high-variance, low-bias trees to cut variance, whereas boosting adds dependent high-bias, low-variance stumps to cut bias, and the two occupy opposite corners of the bias-variance plane while sharing trees as their base object.
Full proof set Master
Proposition 1 (telescoping of the weights; the empirical exponential loss equals ). With and the AdaBoost update renormalised by , one has , hence .
Proof. By induction on . At , with empty product and . Assume . The renormalised update is , and substituting the inductive hypothesis with gives . Summing over and using (the weights are renormalised to a probability vector) yields .
Proposition 2 (per-round factor and the exponential bound). Each for , so .
Proof. With normalised round weights, ; substituting gives (the back-substitution of Exercise 3). Then , so . The inequality with gives , whence , and the product bound follows. Combined with Proposition 1 and the domination , the training error is at most .
Proposition 3 (exponential-loss population minimiser). For with and , the pointwise minimiser of is .
Proof. Conditioning on , . Then , vanishing where , i.e. ; confirms the global minimum (the objective is strictly convex in ). Inverting, . The Bayes rule coincides with , so exponential loss is classification-calibrated.
Proposition 4 (gradient-boosting step is the least-squares projection of the negative gradient). Let and . The base learner is the element of most aligned with the negative gradient in the empirical inner product, and a positive step along it decreases to first order whenever .
Proof. The negative gradient of at has components . For a step with , a first-order expansion gives , where is the Euclidean inner product over the training points. Decreasing at first order requires . Minimising over maximises relative to , i.e. selects the base learner best aligned with the negative gradient; the orthogonality conditions of the least-squares fit make the projection of onto . So long as that projection is non-zero, and the line-searched step strictly decreases .
Connections Master
The base learners boosting combines are the trees of
45.08.04: boosting reweights or refits shallow trees (stumps and small trees at the low- end of the cost-complexity chain), and the instability and high-variance profile established there is precisely the property that makes deep trees wrong for boosting and right for bagging, so this unit specialises the tree object of the prior unit into a sequential, bias-reducing ensemble.Boosting reduces bias where bagging and random forests reduce variance, the two facing pages of the bias-variance decomposition: the correlated-average variance formula proved for trees in
45.08.04explains bagging's gain, while the additive forward-stagewise construction here explains boosting's complementary attack on bias, so the same decomposition organises both ensembles and assigns each its corner of the bias-variance plane.The margin-distribution bound of Theorem 4 is the boosting instance of the margin generalisation theory of
45.07.06: the elementary domination used in the training-error proof is the seed of the uniform margin bounds there, and the boosting story — test error falling past zero training error — is the empirical phenomenon those bounds were built to explain.Gradient boosting is functional gradient descent, an instance of the first-order optimisation methods of [44.06]: the empirical risk is descended by steepest steps projected onto a base-learner class, with the learning rate playing the role of a fixed step size and stochastic subsampling mirroring the mini-batching of stochastic gradient methods, so the convergence and step-size intuition from convex optimisation transfers directly to the boosting iteration.
Historical & philosophical context Master
Boosting began as a question in computational learning theory: Kearns and Valiant (1989) asked whether a "weak" PAC-learning algorithm — one only slightly better than chance — could always be boosted into a "strong" one with arbitrarily small error. Schapire (1990) answered yes with the first boosting algorithm, and Freund (1995) simplified it to boost-by-majority. The practical breakthrough was Freund and Schapire's AdaBoost (1995; full version 1997) [Freund 1997], which adapted to the weak learners' errors without knowing their edge in advance and came with the exponential training-error bound proved above; it won the 2003 Gödel Prize.
The statistical recasting followed. Friedman, Hastie, and Tibshirani (2000) identified AdaBoost as forward stagewise additive modelling under exponential loss with the half-log-odds population minimiser, moving boosting from a margin-game in learning theory into the regression-modelling framework of The Elements of Statistical Learning [Hastie 2009]. Friedman (2001) generalised the construction to arbitrary differentiable losses as a gradient boosting machine [Friedman 2001], the lineage that runs through MART to the regularised, second-order, sparsity-aware implementations of XGBoost (Chen and Guestrin 2016), LightGBM, and CatBoost that dominate tabular-data competitions. The apparent paradox that AdaBoost keeps improving test error after training error reaches zero prompted the margin theory of Schapire, Freund, Bartlett, and Lee (1998) [Schapire 1998] and a long debate, including Breiman's (1999) counterexamples, over whether margins fully explain the phenomenon; the resolution is that boosting enlarges the margin distribution but is not immune to overfitting, which is why shrinkage and subsampling became standard.
Bibliography Master
@article{freundschapire1997,
author = {Freund, Yoav and Schapire, Robert E.},
title = {A decision-theoretic generalization of on-line learning and an application to boosting},
journal = {Journal of Computer and System Sciences},
volume = {55},
number = {1},
pages = {119--139},
year = {1997}
}
@article{friedman2001gbm,
author = {Friedman, Jerome H.},
title = {Greedy function approximation: a gradient boosting machine},
journal = {Annals of Statistics},
volume = {29},
number = {5},
pages = {1189--1232},
year = {2001}
}
@article{friedmanhastietibshirani2000,
author = {Friedman, Jerome and Hastie, Trevor and Tibshirani, Robert},
title = {Additive logistic regression: a statistical view of boosting},
journal = {Annals of Statistics},
volume = {28},
number = {2},
pages = {337--407},
year = {2000}
}
@article{schapire1998margins,
author = {Schapire, Robert E. and Freund, Yoav and Bartlett, Peter and Lee, Wee Sun},
title = {Boosting the margin: a new explanation for the effectiveness of voting methods},
journal = {Annals of Statistics},
volume = {26},
number = {5},
pages = {1651--1686},
year = {1998}
}
@article{schapire1990strength,
author = {Schapire, Robert E.},
title = {The strength of weak learnability},
journal = {Machine Learning},
volume = {5},
number = {2},
pages = {197--227},
year = {1990}
}
@inproceedings{chenguestrin2016xgboost,
author = {Chen, Tianqi and Guestrin, Carlos},
title = {{XGBoost}: a scalable tree boosting system},
booktitle = {Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
pages = {785--794},
year = {2016}
}
@book{hastie2009esl,
author = {Hastie, Trevor and Tibshirani, Robert and Friedman, Jerome},
title = {The Elements of Statistical Learning: Data Mining, Inference, and Prediction},
edition = {2},
publisher = {Springer},
year = {2009}
}