Understanding Machine Learning VII: Boosting and AdaBoostTextbook
Motivation
Boosting answers a question raised by Kearns and Valiant: can a learner that is only slightly better than random guessing be turned into one that is arbitrarily accurate? Chapter 10 of Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms (doi:10.1017/CBO9781107298019) defines γ-weak learnability (Definition 10.1), the PAC requirement with the accuracy replaced by the fixed value , and presents AdaBoost, the algorithm of Freund and Schapire that, given weak hypotheses, reweights the training set round by round and outputs a weighted majority vote. The chapter's main result (Theorem 10.2) is that the training error of AdaBoost's output decreases as in the number of rounds. Since the output is a halfspace over the predictions of base hypotheses, the chapter then bounds the VC-dimension of that class (Lemma 10.3), so that the number of rounds becomes a knob for the bias–complexity tradeoff. Example 10.1 shows a concrete weak learner, ERM over decision stumps for the class of 3-piece classifiers on the line, and the chapter remarks that, statistically, weak learnability is no easier than strong learnability: a class of infinite VC-dimension is not weakly learnable either.
Setting
The framework is that of Missions I and IV: binary classification over a domain with the 0–1 loss, distributions over with a labeling function , learners as functions of the sample, the VC-dimension, and ERM. Labels and hypotheses are Boolean, with values obtained through , , and is true exactly when . A γ-weak learner for with the function returns, for every , every and every measurable realizable by , a hypothesis with with probability at least once ; the failure event is bounded in outer measure as in Definition 3.1.
AdaBoost is formalized as a deterministic function of the sample and of the sequence of weak hypotheses that the weak learner returned. The distributions are defined by recursion: is uniform, , , and ; the output after rounds is . Rounds are indexed from , so is the book's . The class of Equation (10.4) consists of the functions with . Decision stumps over are the threshold functions and their negations ; a 3-piece classifier is outside and inside, with .
Formalization targets
Goal: Theorem 10.2
If and every round has , then the empirical 0–1 risk of AdaBoost's output after rounds is at most .
Milestones
§10.1. A class of infinite VC-dimension is not γ-weak-learnable for any (domain with measurable singletons, measurable hypotheses).
Example 10.1. There is one sample-size function with which every ERM learner over the decision stumps is a -weak learner for the 3-piece classifiers.
Exercise 10.3. For a nonempty sample and , the error of under is exactly .
Lemma 10.3. If and , then .
Further item: Exercise 10.4 (1), for .
Significance
Theorem 10.2 is the reason AdaBoost works and the template for every analysis of boosting: a potential function, here , bounds the 0–1 training error and contracts by the factor at every round. Lemma 10.3 supplies the other half of the picture, an estimation-error bound growing only like up to logarithms, so that Theorem 6.8 turns the pair into a generalization guarantee for boosting. The remark of §10.1 places weak learning in the statistical landscape of Part I: the VC-dimension characterizes it too, and the gain of boosting is computational.
Nothing here is machine-checked. Two points where the book's text needs care are built into the statements. The weight is undefined when , and the algorithm's normalization then divides by ; in Lean the logarithm of a negative number is , so with the formal algorithm would ignore a perfect weak hypothesis and the bound could fail. The theorems therefore assume , which is the case in which the book's formulas are defined. And the book's derivation of "infinite VC-dimension implies not weakly learnable" from the lower bound of Theorem 6.8 at uses that bound outside the range in which Chapter 28 proves it; the statement itself is true, by the -point form of the No-Free-Lunch argument (Exercise 5.3 of Mission III) and Lemma B.1.
Difficulty
Exercise 10.4 (1) is a one-line embedding of into with the weights and is the entry point. Exercise 10.3 is the computation of the book: after the update, the weight of the mistakes of is and the weight of the correct examples is , and with these are equal. Theorem 10.2 needs, by induction on the round, the closed form of the distribution, the pointwise bound for the sign convention used, the telescoping product (10.2), the identity , the monotonicity of on and . Lemma 10.3 counts dichotomies: Sauer's lemma bounds the restrictions of to a shattered set by , choosing of them gives , the halfspaces of contribute by Theorem 9.2, and the inequality is solved with Lemma A.1; the finite-VC lower bound handles small , and the numeric slack of the book's chain must be checked. Example 10.1 combines a geometric observation, that one of the three regions of a 3-piece classifier has mass at most and a stump agrees with the other two, with the agnostic guarantee for ERM over the stumps from Theorem 6.7, applied with accuracy ; the best stump may only approach error because constant functions are not stumps, and the slack absorbs this. The §10.1 remark is the argument sketched above.
Formalization scope
AdaBoost is a function of the sample and of the returned weak hypotheses; the weak learner's randomness and its failure probability (Remark 10.2) are not modelled, and Theorem 10.2 is the deterministic statement the book proves. Rounds are indexed from . The output uses negative, consistently with Mission VI. The class is a set of functions, so Lemma 10.3 is a statement about the VC-dimension of Mission IV, with the bound taken in through the integer part of the real right-hand side and the natural logarithm. Decision stumps are closed under negation, as the book's ; constant functions are not stumps. The efficient ERM for decision stumps (§10.1.1), the face-recognition features (§10.4), Exercises 10.1, 10.2, 10.4 (2)–(3) and 10.5 are not stated. The claims of §10.3 that piecewise-constant classifiers with pieces lie in and that this class shatters points depend on treating as a stump and on the sign convention; with real thresholds, does not shatter three points under either convention, so these claims are not stated.
Trivializing readings are excluded: the weak-error hypotheses are strict where the book's formulas require it, the VC bounds are in , and the weak-learner guarantee quantifies over all distributions and all realizable labelings. Welcome contributions: the closed form of , the contraction identity for , and the dichotomy count behind Lemma 10.3.
Selected references
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press, 2014, Chapter 10. doi:10.1017/CBO9781107298019
- Y. Freund, R. E. Schapire, A decision-theoretic generalization of on-line learning and an application to boosting, Journal of Computer and System Sciences 55(1), 1997. doi:10.1006/jcss.1997.1504
- R. E. Schapire, The strength of weak learnability, Machine Learning 5(2), 1990. doi:10.1007/BF00116037
- M. Kearns, L. Valiant, Cryptographic limitations on learning Boolean formulae and finite automata, Journal of the ACM 41(1), 1994. doi:10.1145/174644.174647
- R. E. Schapire, Y. Freund, Boosting: Foundations and Algorithms, MIT Press, 2012.