Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Learn from your mistakes, one rule at a time
A stump (a single yes/no question) is a weak classifier, only a bit better than guessing on hard problems. AdaBoost trains stumps one after another. After each, it makes the examples that were misclassified heavier, so the next stump is forced to pay attention to them. Each stump gets a vote that depends on how well it did, and the weighted vote of many stumps can draw boundaries that no single stump could, such as a circle out of straight cuts.
AdaBoost was the first practical boosting algorithm. It powered the Viola–Jones face detector, the first real-time object detector, in cameras for a decade, and it introduced the ideas behind gradient boosting (XGBoost, LightGBM), today’s strongest tabular models. Its behaviour under label noise is a classic lesson in loss-function choice.
- 1. After each round AdaBoost increases the weight of…
- 2. The final AdaBoost classifier is…
- 3. In the demo, flipped labels…
Level 1: Beginner
★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.One round by hand
Setup. Four points, equal weights 0.25. The current stump gets three right and one wrong, so its weighted error is ε = 0.25.
Vote weight: α = ½ ln((1 − ε)/ε) = ½ ln 3 = 0.549.
Re-weighting. Multiply correct points by e^(−α) = 1/√3 = 0.577 and the wrong point by e^α = √3 = 1.732:
- correct: 0.25 × 0.577 = 0.144 each (three of them, 0.433 in total);
- wrong: 0.25 × 1.732 = 0.433.
Normalising (total 0.866) gives correct points 1/6 each and the wrong point 1/2. After re-weighting, the stump that was just added has weighted error exactly 0.5, no better than a coin flip, so the next stump must find something new.
Training-error bound. After T rounds, training error ≤ Π 2√(εₜ(1 − εₜ)).
- Two rounds with ε = 0.25 each: 2√0.1875 = 0.866 per round, so the bound is 0.866² = 0.75.
- If every εₜ ≤ 0.5 − γ, the bound is at most e^(−2γ²T): training error falls exponentially in T.
The steps in plain English:
- Start with equal weights on all examples.
- Fit a weak learner to minimise the weighted error ε, and give it a vote α = ½ ln((1 − ε)/ε).
- Multiply each example’s weight by e^(−α y h(x)): up if misclassified, down if correct. Renormalise.
- Repeat T times. Predict with the sign of Σ αₜ hₜ(x). Choose T by validation, especially with noisy labels.
- 1. α for ε = 0.2?
- 2. After re-weighting, the misclassified point's share in the example is…
- 3. A weak learner with ε = 0.5 gets vote…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.Exponential loss, Real AdaBoost and SAMME
AdaBoost minimises the exponential loss (Friedman, Hastie and Tibshirani, 2000). Consider L(F) = Σ exp(−yᵢF(xᵢ)). Adding αh to F, the optimal h minimises the weighted error with weights wᵢ ∝ exp(−yᵢF(xᵢ)), and the optimal step is α = ½ ln((1 − ε)/ε). AdaBoost is forward stagewise additive modelling with this loss. Its population minimiser is F*(x) = ½ ln(P(y = 1 | x)/P(y = −1 | x)), half the log-odds.
Real AdaBoost (Schapire and Singer, 1999). Weak learners output real confidences. A stump leaf outputs ½ ln(W₊/W₋), from the weighted class mass in that leaf. This often converges in fewer rounds.
SAMME (Zhu, Zou, Rosset and Hastie, 2009) handles K classes. Use α = ln((1 − ε)/ε) + ln(K − 1), which is positive whenever ε < 1 − 1/K (better than random guessing among K classes). It corresponds to a multiclass exponential loss. SAMME.R is the real-valued version.
Margins (Schapire, Freund, Bartlett and Lee, 1998). The normalised margin is y·Σαₜhₜ(x)/Σαₜ. Test error can keep falling after training error reaches 0, because later rounds increase the margins of training points, and generalisation bounds depend on the margin distribution, not on T.
Label noise. Exponential loss grows exponentially for confidently wrong points, so mislabelled points accumulate huge weight and the ensemble bends toward them (Dietterich, 2000; Long and Servedio, 2010). Remedies: early stopping, shrinkage, or bounded losses (LogitBoost, gradient boosting with logistic loss, BrownBoost).
from sklearn.ensemble import AdaBoostClassifier
from sklearn.tree import DecisionTreeClassifier
ada = AdaBoostClassifier(DecisionTreeClassifier(max_depth=1), n_estimators=300, learning_rate=0.5).fit(X, y)- 1. AdaBoost is forward stagewise additive modelling with…
- 2. SAMME's extra term in α is…
- 3. Real AdaBoost leaves output…
Level 3: Advanced
★★★★☆ Advanced⏱ 30 minGraduate level, with full derivations and proofs.Theory
Weak learnability implies strong learnability. If every weak learner beats chance by γ (εₜ ≤ ½ − γ), AdaBoost’s training error is at most exp(−2γ²T) (Freund and Schapire, 1997). This answered Kearns and Valiant’s question: weak and strong PAC learnability are equivalent.
Generalisation. VC-style bounds grow with T, yet AdaBoost often does not overfit with more rounds on clean data. Margin theory explains this: generalisation error ≤ P_train(margin ≤ θ) + Õ(√(d/(nθ²))), independent of T. Boosting keeps pushing margins up after the training error hits 0. Exercise 2 on clean labels: test error still fell from 0.152 to 0.135 between rounds 300 and 600.
Statistical view. As T → ∞ with weak learners, AdaBoost’s F estimates half the log-odds. But it is not consistent without regularisation such as early stopping (Bartlett and Traskin, 2007; Jiang, 2004). With 10–20% label noise, exercise 2 found a best stopping round of about 230–390, after which test error rose. By then the flipped points held 22–30% of all the weight.
Interview questions.
- Why does AdaBoost struggle with noisy labels? Exponential loss gives misclassified points weight exp(yF), which grows without bound, so the algorithm keeps chasing mislabelled points. Use early stopping or a bounded loss (logistic).
- Stumps or deeper trees? Stumps give an additive model with no interactions. Depth-d trees capture interactions up to order d. Use small depths (1–4) and choose T by validation.
- 1. If every εₜ ≤ ½ − γ, training error is at most…
- 2. Margin theory explains why test error can fall…
- 3. AdaBoost's population minimiser F* equals…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.AdaBoost and label noise
History.
- Kearns and Valiant (1988) asked whether weak learning implies strong learning; Schapire (1990) answered yes with the first boosting algorithm.
- Freund and Schapire (1997) introduced AdaBoost (Gödel Prize, 2003).
- Schapire et al. (1998) gave margin bounds. Friedman, Hastie and Tibshirani (2000) gave the statistical view and LogitBoost.
- Viola and Jones (2001) built real-time face detection with AdaBoost.
- Zhu et al. (2009) introduced SAMME.
Exercise 1. Discrete AdaBoost with stumps on the 10-D sphere problem (n = 1000):
- training error 0.427 → 0.309 → 0.186 → 0.094 after 1, 10, 50 and 200 rounds, always below the bound;
- the exponential loss fell every round;
- test error went from 0.462 (one stump) to 0.177 (200 stumps);
- SAMME reached 0.880 training accuracy on 3 classes.
Exercise 2. Setup: discrete AdaBoost with stumps, n = 1000, clean test labels, 2 repetitions. The table shows test error after T rounds.
| label noise | T = 10 | 50 | 100 | 300 | 600 | best round | weight on flipped points |
|---|---|---|---|---|---|---|---|
| 0% | 0.384 | 0.263 | 0.217 | 0.152 | 0.135 | ≈ 560 | (none) |
| 10% | 0.399 | 0.280 | 0.231 | 0.197 | 0.199 | ≈ 394 | 22% |
| 20% | 0.392 | 0.287 | 0.257 | 0.247 | 0.258 | ≈ 232 | 30% |
- On clean labels AdaBoost kept improving through 600 rounds, consistent with margin theory.
- With 20% noise, test error bottomed out around round 230 and then rose. By the end, the 20% mislabelled points held 30% of the total weight. At 10% noise, 10% of the points held 22% of the weight.
- Lesson: with noisy labels, choose T by validation, or use a bounded loss. Gradient boosting with logistic loss and shrinkage is the usual answer (next pages).
AdaBoost in AI, robotics and aerospace
- Viola–Jones detection: boosted Haar-feature cascades for real-time face, pedestrian and object detection.
- Feature selection: each stump picks one feature, so boosting doubles as a ranking of informative sensors.
- Fault classification from engineered telemetry features with stumps that read as threshold rules.
- A foundation for gradient boosting, which replaced AdaBoost in most tabular work.
References
- Y. Freund, R. E. Schapire (1997). “A decision-theoretic generalization of on-line learning and an application to boosting.” JCSS 55(1).
- J. Friedman, T. Hastie, R. Tibshirani (2000). “Additive logistic regression: a statistical view of boosting.” Annals of Statistics 28(2).
- R. E. Schapire, Y. Freund, P. Bartlett, W. S. Lee (1998). “Boosting the margin.” Annals of Statistics 26(5).
- J. Zhu, H. Zou, S. Rosset, T. Hastie (2009). “Multi-class AdaBoost.” Statistics and Its Interface 2.
- P. Viola, M. Jones (2001). “Rapid object detection using a boosted cascade of simple features.” CVPR.