Tutorials › Statistical Learning (Graduate) › The Product Bound On AdaBoost Training Error

Boosting and Margin Bounds · Tutorial 818 of 989

The Product Bound On AdaBoost Training Error

See why AdaBoost’s training-error bound is controlled by the product of its normalization constants, and how that product yields an exponential bound in terms of round-wise edges.

Advanced 10 min read

What You'll Learn

  • Define the weighted error and normalization constant at each AdaBoost round
  • Derive the exact identity between empirical exponential loss and the product of normalization constants
  • Bound the fraction of training examples with nonpositive margins
  • Derive the edge-based exponential training-error bound
  • Calculate the bound for explicit rounds and distinguish the bound from the actual error rate
  • Avoid misapplying the bound when a learner has error above one half

Why Normalization Constants Control Training Error

AdaBoost repeatedly chooses a classifier that performs well under a changing distribution on the training examples. The normalization constant at each update records how much exponential loss remains after that round’s reweighting. Multiplying these constants gives an exact expression for the final empirical exponential loss, and that loss in turn bounds the fraction of training examples classified incorrectly.

This is a training-sample statement: it concerns the examples used to fit the ensemble. It does not, by itself, guarantee a particular test error or generalization performance.

Setup and Definitions

Consider a fixed training set \((x_i,y_i)_{i=1}^n\), with labels \(y_i\in\{-1,+1\}\). At round \(t\), the weak classifier is \(h_t\), also taking values in \(\{-1,+1\}\), and its coefficient is \(\alpha_t\geq 0\). The score after \(T\) rounds and its signed margin on example \(i\) are \(F_T(x_i)=\sum_{t=1}^T\alpha_t h_t(x_i)\) and \(y_iF_T(x_i)\), respectively. A positive signed margin means the score has the correct sign; a negative one means it has the wrong sign.

Start with uniform weights \(D_1(i)=1/n\). At each round, define the weighted error \(\varepsilon_t\), choose a finite coefficient \(\alpha_t\), and update the weights by exponential reweighting. The normalizer \(Z_t\) is the constant that makes the updated weights sum to one.

Definition: At round \(t\), the weighted error and normalization constant are $$ \varepsilon_t=\sum_{i=1}^n D_t(i)\,\mathbf{1}\{y_i\ne h_t(x_i)\},\qquad Z_t=\sum_{i=1}^n D_t(i)\exp\!\bigl(-\alpha_t y_i h_t(x_i)\bigr). $$ The AdaBoost update is $$ D_{t+1}(i)=\frac{D_t(i)\exp\!\bigl(-\alpha_t y_i h_t(x_i)\bigr)}{Z_t}. $$

The usual discrete AdaBoost choice assumes \(0<\varepsilon_t<1\) and sets \(\alpha_t=\tfrac12\log((1-\varepsilon_t)/\varepsilon_t)\). If the weak classifier has error below one half, this coefficient is positive. A classifier with error above one half can instead be flipped, replacing \(h_t\) by \(-h_t\). We will use the usual weak-learner convention \(0<\varepsilon_t\leq 1/2\), with finite coefficients. The equal-error case gives \(\alpha_t=0\).

Worked Examples

Worked Example: Computing a Round’s Normalizer

Suppose the current weights on four observations are \(D_t=(0.1,0.2,0.3,0.4)\), and a rule misclassifies only the fourth observation. Its weighted error is \(\varepsilon_t=0.4\). With the discrete AdaBoost coefficient, $$ \alpha_t=\frac12\log\!\left(\frac{0.6}{0.4}\right) =\frac12\log(1.5)\approx 0.2027. $$

Correctly classified observations contribute \(e^{-\alpha_t}\) to the normalizer’s exponential factor; the misclassified one contributes \(e^{\alpha_t}\). Therefore $$ Z_t=0.6e^{-\alpha_t}+0.4e^{\alpha_t} =0.6\sqrt{\frac{2}{3}}+0.4\sqrt{\frac{3}{2}} \approx 0.9798. $$ The weights before normalization sum to \(0.6\sqrt{2/3}\approx0.4899\) on the three correctly classified observations and \(0.4\sqrt{3/2}\approx0.4899\) on the misclassified observation. Dividing their combined sum, approximately \(0.9798\), normalizes the next distribution.

Worked Example: A Two-Round Product

Take four training examples with positive labels. On round 1, let \(h_1\) misclassify only example 4. Its uniform-weight error is \(1/4\), so \(\alpha_1=\tfrac12\log 3\) and \(Z_1=2\sqrt{(1/4)(3/4)}=\sqrt{3}/2\). After the update, the three correctly classified examples each have weight \(1/6\), and example 4 has weight \(1/2\).

Suppose \(h_2\) misclassifies only example 3. Its error under these new weights is \(1/6\), giving \(\alpha_2=\tfrac12\log 5\) and \(Z_2=2\sqrt{(1/6)(5/6)}=\sqrt{5}/3\). The product is $$ Z_1Z_2=\frac{\sqrt{3}}{2}\frac{\sqrt{5}}{3} =\frac{\sqrt{15}}{6}\approx0.6455. $$ For a direct check, the final signed margins are \(\alpha_1+\alpha_2\) on examples 1 and 2, \(\alpha_1-\alpha_2\) on example 3, and \(-\alpha_1+\alpha_2\) on example 4. Thus the empirical exponential loss is $$ \frac14\left(2e^{-\alpha_1-\alpha_2} +e^{-\alpha_1+\alpha_2} +e^{\alpha_1-\alpha_2}\right) =\frac14\left(\frac{2}{\sqrt{15}}+\sqrt{\frac{5}{3}}+\sqrt{\frac{3}{5}}\right) =\frac{\sqrt{15}}{6}. $$ The calculation agrees with the product of the two normalizers.

The Product Identity and Training-Error Bound

The key fact is that the distribution at any round is the original uniform distribution tilted by the ensemble score accumulated so far. Normalization at each update makes the proportionality constant the reciprocal of the product of the earlier \(Z_t\)'s.

Theorem: For any finite sequence of rounds using the update above, let \(F_T(x)=\sum_{t=1}^T\alpha_t h_t(x)\). Then $$ \frac1n\sum_{i=1}^n \exp\!\bigl(-y_iF_T(x_i)\bigr) =\prod_{t=1}^T Z_t. $$ Consequently, the fraction of examples with \(y_iF_T(x_i)\leq0\) is at most \(\prod_{t=1}^T Z_t\). In particular, the fraction of training errors under any sign-based prediction rule that counts a zero-score tie as an error is at most this product.

Proof. We first establish the weights’ explicit form. At round 1, \(D_1(i)=1/n\). If \(D_t(i)=\exp(-y_iF_{t-1}(x_i))/(n\prod_{s=1}^{t-1}Z_s)\), then the update gives $$ D_{t+1}(i) =\frac{\exp(-y_iF_{t-1}(x_i))\exp(-\alpha_t y_i h_t(x_i))} {n\left(\prod_{s=1}^{t-1}Z_s\right)Z_t} =\frac{\exp(-y_iF_t(x_i))}{n\prod_{s=1}^{t}Z_s}. $$ The base case and this induction prove the formula for \(D_{T+1}(i)\). Since the updated weights sum to one, $$ 1=\sum_{i=1}^nD_{T+1}(i) =\frac{1}{n\prod_{t=1}^T Z_t} \sum_{i=1}^n\exp\!\bigl(-y_iF_T(x_i)\bigr). $$ Rearranging proves the identity. If \(y_iF_T(x_i)\leq0\), then \(\exp(-y_iF_T(x_i))\geq1\). Therefore $$ \frac1n\sum_{i=1}^n\mathbf{1}\{y_iF_T(x_i)\leq0\} \leq \frac1n\sum_{i=1}^n\exp\!\bigl(-y_iF_T(x_i)\bigr) =\prod_{t=1}^T Z_t. $$ A mistaken prediction with a nonzero score has negative signed margin. A zero-score example is included on the left, so the inequality also covers any convention that treats a zero-score prediction as an error. \(\square\)

Under the discrete AdaBoost coefficient, \(Z_t\) has a simple expression in terms of weighted error. Correct predictions have \(y_i h_t(x_i)=+1\), and errors have \(y_i h_t(x_i)=-1\). Grouping the terms in its definition therefore gives $$ Z_t=(1-\varepsilon_t)e^{-\alpha_t}+\varepsilon_t e^{\alpha_t}. $$ When \(0<\varepsilon_t<1\) and \(\alpha_t=\tfrac12\log((1-\varepsilon_t)/\varepsilon_t)\), this becomes $$ Z_t=2\sqrt{\varepsilon_t(1-\varepsilon_t)}. $$ This also shows why the coefficient is chosen in this form: for fixed \(0<\varepsilon_t<1\), the expression \((1-\varepsilon_t)e^{-\alpha}+\varepsilon_t e^\alpha\) is minimized at that coefficient. Differentiating with respect to \(\alpha\) gives \(-(1-\varepsilon_t)e^{-\alpha}+\varepsilon_t e^\alpha\); setting this equal to zero yields \(e^{2\alpha}=(1-\varepsilon_t)/\varepsilon_t\), and the second derivative is positive.

Corollary (edge-based training-error bound): Suppose each round has weighted error \(\varepsilon_t=\tfrac12-\gamma_t\), where \(0\leq\gamma_t<\tfrac12\), and uses the discrete AdaBoost coefficient. Then $$ \frac1n\sum_{i=1}^n\mathbf{1}\{y_iF_T(x_i)\leq0\} \leq \prod_{t=1}^T\sqrt{1-4\gamma_t^2} \leq \exp\!\left(-2\sum_{t=1}^T\gamma_t^2\right). $$

Proof. Substituting \(\varepsilon_t=\tfrac12-\gamma_t\) gives \(Z_t=2\sqrt{(\tfrac12-\gamma_t)(\tfrac12+\gamma_t)} =\sqrt{1-4\gamma_t^2}\). For \(0\leq u<1\), \(\log(1-u)\leq-u\): indeed, the function \(g(u)=\log(1-u)+u\) has \(g(0)=0\) and derivative \(g'(u)=-u/(1-u)\leq0\). Hence \(\sqrt{1-u}\leq e^{-u/2}\). Apply this with \(u=4\gamma_t^2\) to each factor and multiply the resulting inequalities: \(\prod_t Z_t\leq\prod_t e^{-2\gamma_t^2} =e^{-2\sum_t\gamma_t^2}\). Combining this with the theorem proves the claim. \(\square\)

Worked Example: Turning Round-Wise Edges Into a Bound

Suppose three rounds have errors \(0.3,0.4,0.25\), so their edges relative to one half are \(0.2,0.1,0.25\). The exact product of the normalizers is $$ \sqrt{1-4(0.2)^2}\sqrt{1-4(0.1)^2}\sqrt{1-4(0.25)^2} =\sqrt{0.84}\sqrt{0.96}\sqrt{0.75} =\sqrt{0.6048}\approx0.7777. $$ The edge-based exponential bound is $$ \exp\!\left(-2(0.2^2+0.1^2+0.25^2)\right) =\exp(-0.225)\approx0.7985. $$ Thus the theorem bounds the fraction with nonpositive margins by at most \(0.7777\), and the simpler edge-only expression gives the slightly looser bound \(0.7985\). Neither number is necessarily the observed training-error fraction; each is an upper bound.

Interpreting the Bound and Avoiding a Pitfall

Each \(Z_t\) is at most one when \(\varepsilon_t\leq1/2\), so the product cannot increase as additional such rounds are added. The edge bound quantifies one way it can decrease: rounds with larger \(\gamma_t\) contribute more to the exponent. It is a deterministic bound for the fitted training sample and the stated updates, not a promise that the ensemble will generalize.

Common mistake: It is tempting to say that any chosen rule with error below one half gives a factor less than one, or to insert an error above one half directly into the edge formula. The normalization factor depends on the coefficient as well as on the error. With the discrete AdaBoost coefficient, a rule above one half has a negative coefficient; it is not the stipulated nonnegative weak-learner step. Flip the rule first, or analyze the coefficient and normalizer actually used. Also, a product bound below one does not mean the training error equals that product: the theorem gives an upper bound, and it can be loose.

If a round has zero weighted error, the displayed optimal coefficient is infinite, so the finite-coefficient update as stated does not apply. In the usual finite-sample setting, all current weights are positive when previous coefficients are finite. Thus zero weighted error then means the rule classifies every training example correctly, and the training error can already be zero; there is no need to assign an infinite coefficient to use the product-bound argument.

Check Your Understanding

Use the definitions and bounds above to answer the following questions.

  1. Why does the empirical exponential loss equal the product of the normalizers rather than merely being bounded by it?
  2. If a round has weighted error \(0.4\), what is its edge, and what is its optimal normalization constant?
  3. What does the indicator bound say about examples with signed margin exactly zero?
  4. For edges \(\gamma_1,\ldots,\gamma_T\), explain why the exponential edge bound is no smaller than the product bound.
  5. Why should a rule with weighted error \(0.7\) not be inserted unchanged into the nonnegative-edge version of the corollary?
Clinical Biostats