AdaBoost: Reweighted Examples, Margins and Exponential Loss
Published:
Focus later learners on current mistakes
Bagging fits perturbed models largely independently. Boosting fits them sequentially, with each step influenced by the current ensemble. AdaBoost expresses this through observation weights: examples the ensemble handles poorly gain influence on the next weak learner.
This chapter derives the classic binary setting with labels and weak predictions in {−1,+1}. Multiclass extensions and probability-based variants use different formulas. Reproducing a named software estimator requires checking which variant it implements rather than mixing binary and multiclass equations.
Define weighted error and the ensemble
At round t, let normalised observation weights be \(D_t(i)\) and weak classifier \(h_t(x)\in\{-1,+1\}\). Its weighted error is
The classic coefficient and update are
The ensemble score is \(F_T(x)=\sum_t\alpha_t h_t(x)\) and prediction is its sign, with a tie rule at zero. The score is a margin-like quantity, not automatically a calibrated probability.
One round on four observations
Start with equal weights 0.25 and a learner that misclassifies one observation. Its error is 0.25, so \(\alpha=\tfrac12\log3\approx0.5493\).
The mistaken observation is multiplied by \(e^\alpha=\sqrt3\), while each correct one is multiplied by \(e^{-\alpha}=1/\sqrt3\). After normalisation, the mistake has weight 0.5 and each correct observation has weight 1/6.
import math
alpha = 0.5*math.log(3)
raw = [0.25*math.exp(alpha)] + [0.25*math.exp(-alpha)]*3
weights = [value/sum(raw) for value in raw]
assert abs(weights[0]-0.5) < 1e-12
assert all(abs(value-1/6) < 1e-12 for value in weights[1:])
The next learner now sees half the weight on the previously mistaken example. It may correct that example at the expense of others; the additive ensemble combines the sequence rather than keeping only the newest learner.
Derive the coefficient from exponential loss
Consider adding \(\alpha h(x)\) to an existing score F under
The current exponential factors define observation weights. For a fixed h, the next loss is proportional to
Setting its derivative to zero yields \(e^{2\alpha}=(1-\varepsilon)/\varepsilon\), giving the classic coefficient. The reweighting rule is therefore consistent with stagewise minimisation of one loss, not an unrelated heuristic for punishing mistakes.
This derivation also shows why very negative margins dominate: exponential loss grows rapidly when the model confidently predicts the wrong class. That emphasis can be useful for informative hard examples and harmful for corrupted labels.
The weak-learning condition and edge cases
A positive learner vote requires weighted error below one half in this binary setting. At one half, the vote is zero; above one half, a sign-flipped binary learner would improve the error if such flipping is valid for the procedure.
Zero error makes the formula diverge. A practical implementation stops or uses a finite safeguard. Avoid silently substituting an arbitrary epsilon without reporting the stopping behaviour when reproducing a result.
A weak learner must support the changing sample weights, directly or through an appropriate weighted sampling procedure. Repeatedly fitting an unweighted learner ignores the defining mechanism of AdaBoost.
Margins and generalisation
The signed score \(yF(x)\) is positive for a correct classification and larger when the vote is stronger. AdaBoost can continue improving margins after training classification error reaches zero. That helps explain why iteration count and generalisation are not determined solely by the first zero-error point.
It is still wrong to conclude that boosting cannot overfit. Noisy labels, highly expressive learners, small samples and distribution shift can make additional rounds harmful. Inspect validation curves and low-margin examples rather than assuming all difficult cases deserve unbounded influence.
Complexity and practical choices
Decision stumps provide simple weak learners, while deeper trees capture interactions at a higher per-round complexity. Learning-rate shrinkage rescales updates and interacts with the number of rounds; it changes the exact classic optimisation trajectory described above.
Tune learner complexity, learning rate and rounds using the same validation protocol. Compare with random forests and gradient boosting to separate the value of sequential fitting from this particular exponential-loss mechanism.
Report weighted-error behaviour, class imbalance, label audits and probability calibration if scores are used for decisions. The most informative diagnostic is often a list of observations repeatedly receiving high weight, because it reveals whether the algorithm is learning difficult structure or chasing data problems.
Recap
- Calculate weighted error and a complete normalised update.
- Derive the learner coefficient from exponential loss.
- Inspect margins and repeatedly high-weight observations.
- Validate rounds, shrinkage, learner depth and score calibration.
References
- Freund and Schapire. A Decision-Theoretic Generalization of On-Line Learning and an Application to Boosting. JCSS, 1997.
- scikit-learn. Ensemble methods user guide.
