RPC-Bench / parse /train /-_FVMKvxVCQo1 /-_FVMKvxVCQo1.md
ZHANGYUXUAN-zR's picture
Add files using upload-large-folder tool
6a080cc verified
|
Raw
History Blame Contribute Delete
62.8 kB
# The return of ADABOOST.MH: multi-class Hamming trees
# Balazs K ´ egl ´
BALAZS.KEGL $@$ GMAIL.COM
LAL/LRI, University of Paris-Sud, CNRS, 91898 Orsay, France
# Abstract
Within the framework of ADABOOST.MH, we propose to train vector-valued decision trees to optimize the multi-class edge without reducing the multi-class problem to $K$ binary one-againstall classifications. The key element of the method is a vector-valued decision stump, factorized into an input-independent vector of length $K$ and label-independent scalar classifier. At inner tree nodes, the label-dependent vector is discarded and the binary classifier can be used for partitioning the input space into two regions. The algorithm retains the conceptual elegance, power, and computational efficiency of binary ADABOOST. In experiments it is on par with support vector machines and with the best existing multi-class boosting algorithm AOSOLOGITBOOST, and it is significantly better than other known implementations of ADABOOST.MH.
and Singer’s seminal paper (Schapire & Singer, 1999), which proposed, among other interesting extensions, ADABOOST.MH. The main idea of the this approach is to use vector-valued base classifiers to build a multi-class discriminant function of $K$ outputs (for $K$ -class classification). The weight vector, which plays a crucial role in binary ADABOOST, is replaced by a weight matrix over instances and labels. The simplest implementation of the concept is to use $K$ independent one-against-all classifiers in which base classifiers are only loosely connected through the common normalization of the weight matrix. This setup works well with single decision stumps, but in most of the practical problems, boosting stumps is suboptimal compared to boosting more complex base classifiers such as trees. Technically, it is possible to build $K$ one-against-all binary decision trees in each iteration, but this approach, for one reason or another, has not produced state-of-the-art results. As a consequence, several recent papers concentrate on replacing the boosting objective and the engine that optimizes this objective (Li, 2009a;b; Zhu et al., 2009; Sun et al., 2012; Mukherjee & Schapire, 2013).
# 1. Introduction
ADABOOST (Freund & Schapire, 1997) is one of the most influential supervised learning algorithms of the last twenty years. It has inspired learning theoretical developments and also provided a simple and easily interpretable modeling tool that proved to be successful in many applications (Caruana & Niculescu-Mizil, 2006). It is especially the method of choice when any-time solutions are required on large data sets, so it has been one of the most successful techniques in recent large-scale classification and ranking challenges (Dror et al., 2009; Chapelle et al., 2011).
The original ADABOOST paper of Freund and Schapire (Freund & Schapire, 1997), besides defining binary ADABOOST, also described two multi-class extensions, ADABOOST.M1 and ADABOOST.M2. Both required a quite strong performance from the base learners, partly defeating the purpose of boosting, and saw limited practical success. The breakthrough came with Schapire
The main misconception that comes back in several papers is that ADABOOST.MH has to train $K$ parallel oneagainst-all classifiers in each iteration. It turns out that the original setup is more general. For example, staying within the classical ADABOOST.MH framework, Kegl & ´ Busa-Fekete (2009) trained products of simple classifiers and obtained state-of-the-art results on several data sets. In this paper, we describe multi-class Hamming trees, another base learner that optimizes the multi-class edge without reducing the problem to $K$ binary classifications. The key idea is to factorize general vector-valued classifiers into an input-independent vector of length $K$ , and labelindependent scalar classifier. It turns out that optimizing such base classifiers using decision stumps as the scalar component is almost as simple as optimizing simple binary stumps on binary data. The technique can be intuitively understood as optimizing a binary cut and an output code at the same time. The main consequence of the setup is that now it is easy to build trees of these classifiers by simply discarding the label-dependent vector and using the binary classifier for partitioning the input space into two regions.
The algorithm retains the conceptual elegance, power, and computational efficiency of binary ADABOOST. Algorithmically it cannot fail (the edge is always positive) and in practice it almost never overfits. Inheriting the flexibility of ADABOOST.MH, it can be applied directly (without any modification) to multi-label and multi-task classification. In experiments (carried out using an open source package of Benbouzid et al. (2012) for reproducibility) we found that ADABOOST.MH with Hamming trees performs on par with the best existing multiclass boosting algorithm AOSOLOGITBOOST (Sun et al., 2012) and with support vector machines (SVMs; Boser et al. 1992). It is also significantly better than other known implementations of ADABOOST.MH (Zhu et al., 2009; Mukherjee & Schapire, 2013).
The paper is organized as follows. In Section 2 we give the formal multi-class setup used in the paper and ADABOOST.MH, and show how to train factorized base learners in general. The algorithm to build Hamming trees is described in Section 3. Experiments are described in Section 4 before a brief conclusion in Section 5.
# 2. ADABOOST.MH
In this section we first introduce the general multiclass learning setup (Section 2.1), then we describe ADABOOST.MH in detail (Section 2.2). We proceed by explaining the general requirements for base learning in ADABOOST.MH, and introduce the notion of the factorized vector-valued base learner (Section 2.3). Finally, we explain the general objective for factorized base learners and the algorithmic setup to optimize that objective. (Section 2.4).
# 2.1. The multi-class setup: single-label and multi-label/multi-task
For the formal description of ADABOOST.MH, let the training data be $\mathcal { D } \ = \ \big \{ ( \mathbf { x } _ { 1 } , \mathbf { y } _ { 1 } ) , \dotsc , ( \mathbf { x } _ { n } , \mathbf { y } _ { n } ) \big \} _ { . }$ , where $\mathbf { x } _ { i } \in \mathbb { R } ^ { d }$ are observation vectors, and $\mathbf { y } _ { i } \in \{ \pm 1 \} ^ { \mathrm { \tilde { K } } }$ are label vectors. Sometimes we will use the notion of an $n \times d$ observation matrix of $\mathbf { X } = \left( \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { n } \right)$ and an $n \times K$ label matrix $\mathbf { Y } = ( \mathbf { y } _ { 1 } , \ldots , \mathbf { y } _ { n } )$ instead of the set of pairs $\mathcal { D }$ .1 In multi-class classification, the single label $\ell ( \mathbf { x } )$ of the observation $\mathbf { x }$ comes from a finite set. Without loss of generality, we will suppose that $\ell \in \mathcal { L } = \{ 1 , \ldots , K \}$ . The label vector $\mathbf { y }$ is a one-hot representation of the correct class: the $\ell ( { \mathbf { x } } ) { \mathrm { t h } }$ element of $\mathbf { y }$ will be 1 and all the other elements will be $- 1$ . Besides expressing faithfully the architecture of a multi-class neural network or multi-class ADABOOST, this representation has the advantage to be generalizable to multi-label or multi-task learning when an observation x can belong to several classes. To avoid confusion, from now on we will call $\mathbf { y }$ and $\ell$ the label and the label index of x, respectively. For emphasizing the distinction between multi-class and multi-label classification, we will use the term single-label for the classical multi-class setup, and reserve multi-class to situations when we talk about the three setups in general.
The goal of learning is to infer a vector-valued multi-class discriminant function f $: \mathcal { X } \mathbb { R } ^ { K }$ . 2 The single-label output of the algorithm is then $\ell _ { \mathbf { f } } ( \mathbf { x } ) = \arg \operatorname* { m a x } _ { \ell } f _ { \ell } ( \mathbf { x } )$ . The classical measure of the performance of the multiclass discriminant function f is the single-label one-loss $L _ { \mathbb { I } } ( \mathbf { f } , ( \mathbf { x } , \boldsymbol { \ell } ) ) = \mathbb { I } \left\{ \boldsymbol { \ell } \neq \ell _ { \mathbf { f } } ( \mathbf { x } _ { i } ) \right\}$ , which defines the singlelabel training error
$$
{ \widehat { R } } _ { \mathbb { I } } ( \mathbf { f } ) = { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } \mathbb { I } \left\{ \ell ( \mathbf { x } _ { i } ) \neq \ell _ { \mathbf { f } } ( \mathbf { x } _ { i } ) \right\} . ^ { 3 }
$$
Another, perhaps more comprehensive, way to measure the perfloss $\mathbf { f }$
$L _ { \mathrm { H } } \big ( \mathbf { f } , ( \mathbf { x } , \mathbf { y } ) , \mathbf { w } \big ) ^ { * } \ = \ \dot { \sum _ { \ell = 1 } ^ { K } } \overline { { { w _ { \ell } } } } \mathbb { I } \left\{ \mathrm { s i g n } \big ( f _ { \ell } ( \mathbf { x } ) \big ) \neq y _ { \ell } \right\}$ where $\mathbf { w } = \left[ w _ { \ell } \right]$ is an $\mathbb { R } ^ { K }$ -valued “user-defined” weight vector over labels. The corresponding empirical risk (training error) is
$$
\widehat { R } _ { \mathrm { H } } ( \mathbf { f } , \mathbf { W } ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } w _ { i , \ell } \mathbb { I } \left\{ \mathrm { s i g n } \big ( f _ { \ell } ( \mathbf { x } _ { i } ) \big ) \neq y _ { i , \ell } \right\} ,
$$
where $\mathbf { W } = \left[ w _ { i , \ell } \right]$ is an $n \times k$ weight matrix over data points and labels.
In the multi-label/multi-task setup, when, for example, it is equally important to predict that a song is “folk” as predicting that it is sung by a woman, the Hamming loss with uniform weights $w _ { \ell } = 1 / K , \ \ell = 1 , \dots , K$ is a natural measure of performance: it represents the uniform error rate of missing any class sign $y _ { \ell }$ of a given observation $\mathbf { x }$ . In single-label classification, w is usually set asymmetrically to
$$
w _ { \ell } = { \left\{ \begin{array} { l l } { { \frac { 1 } { 2 } } } & { { \mathrm { ~ i f ~ } } \ell = \ell ( \mathbf { x } ) { \mathrm { ~ } } ( { \mathrm { i . e . , ~ i f ~ } } y _ { \ell } = 1 ) , } \\ { { \frac { 1 } { 2 ( K - 1 ) } } } & { { \mathrm { ~ o t h e r w i s e ~ } } ( { \mathrm { i . e . , ~ i f ~ } } y _ { \ell } = - 1 ) . } \end{array} \right. }
$$
The idea behind this scheme is that it will create $K$ wellbalanced one-against-all binary classification problems: if we start with a balanced single-label multi-class problem, that is, if each of the $K$ classes have $n / K$ examples in $\mathcal { D }$ , then for each class $\ell$ , the sum of the weights of the positive examples in the column $\mathbf { w } _ { \cdot , \ell }$ of the weight matrix W will be equal to the sum of the weights of the negative examples. Note that both schemes boil down to the classical uniform weighting in binary classification.
# 2.2. ADABOOST.MH
The goal of the ADABOOST.MH algorithm (Schapire & Singer 1999; Figure 1) is to return a vector-valued discriminant function $\bar { \bf f } ^ { ( T ) } : \mathbb { R } ^ { d } \mathbb { R } ^ { K }$ with a small Hamming loss $\widehat { R } _ { \mathrm { H } } ( \mathbf { f } , \mathbf { W } )$ (2) by minimizing the weighted multi-class exponential margin-based error
$$
\widehat { R } _ { \mathrm { E X P } } \big ( \mathbf { f } ^ { ( T ) } , \mathbf { W } \big ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } w _ { i , \ell } \exp \big ( { - f _ { \ell } ^ { ( T ) } ( \mathbf { x } _ { i } ) y _ { i , \ell } } \big ) .
$$
Since $\exp ( - \rho ) \geq \mathbb { I } \{ \rho < 0 \}$ , (4) upper bounds the Hamming loss final discr $\widehat { R } _ { \mathrm { H } } \big ( \mathbf { f } ^ { ( T ) } , \mathbf { W } \big )$ (2on $\begin{array} { r } { \mathbf { f } ^ { ( T ) } ( \mathbf { x } ) = \sum _ { t = 1 } ^ { T } \mathbf { h } ^ { ( t ) } ( \mathbf { x } ) } \end{array}$ s theas a sum of base classifiers $\mathbf { h } ^ { ( t ) } : \mathcal { X } \mathbb { R } ^ { K }$ 1 returned by a base learner algorithm $\mathbf { B } \operatorname { A S E } \left( \mathbf { X } , \mathbf { Y } , \mathbf { W } ^ { ( t ) } \right)$ in each iteration $t$ .
$$
\boxed { \mathrm { A D A B O O S T . M H ( X , Y , W , B A S E ( \cdot , \cdot , \cdot ) , } T ) }
$$
$$
\mathbf { W } ^ { ( 1 ) } \frac { 1 } { n } \mathbf { W }
$$
$$
\begin{array} { r l } & { \left( \boldsymbol { \alpha } ^ { ( t ) } , \mathbf { v } ^ { ( t ) } , \varphi ^ { ( t ) } ( \cdot ) \right) \gets \mathbf { B A S E } \big ( \mathbf { X } , \mathbf { Y } , \mathbf { W } ^ { ( t ) } \big ) } \\ & { \mathbf { h } ^ { ( t ) } ( \cdot ) \gets \boldsymbol { \alpha } ^ { ( t ) } \mathbf { v } ^ { ( t ) } \varphi ^ { ( t ) } ( \cdot ) } \end{array}
$$
$$
w _ { i , \ell } ^ { ( t + 1 ) } \gets w _ { i , \ell } ^ { ( t ) } \frac { e ^ { - h _ { \ell } ^ { ( t ) } ( \mathbf { x } _ { i } ) y _ { i , \ell } } } { \displaystyle \sum _ { i ^ { \prime } = 1 } ^ { n } \sum _ { \ell ^ { \prime } = 1 } ^ { K } w _ { i ^ { \prime } , \ell ^ { \prime } } ^ { ( t ) } e ^ { - h _ { \ell ^ { \prime } } ^ { ( t ) } ( \mathbf { x } _ { i ^ { \prime } } ) y _ { i ^ { \prime } , \ell ^ { \prime } } } }
$$
# 2.3. Base learning for ADABOOST.MH
The goal of multi-class base learning is to minimize the base objective
$$
Z ^ { ( t ) } = \operatorname* { m i n } _ { \mathbf { h } } Z \bigl ( \mathbf { h } , \mathbf { W } ^ { ( t ) } \bigr ) = \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } w _ { i , \ell } ^ { ( t ) } e ^ { - h _ { \ell } ( \mathbf { x } _ { i } ) y _ { i , \ell } } .
$$
It is easy to show (Schapire & Singer, 1999) that i) the oneerror $\widetilde { R _ { \mathbb { I } } } ( \mathbf { f } ^ { ( T ) } )$ (1) is upper bounded by $\textstyle \prod _ { t = 1 } ^ { T } Z ^ { ( t ) }$ , and so ii) if the standard weak-learning condition ${ \hat { Z } } ^ { ( t ) } \leq 1 - \delta$ holds, $\widehat { R } _ { \mathbb { I } } ( \mathbf { f } )$ becomes zero in $T \sim O ( \log n )$ iterations.
In general, any vector-valued multi-class learning algorithm can be used to minimize (5). Although this goal is clearly defined in (Schapire & Singer, 1999), efficient base learning algorithms have never been described in detail. In most recent papers (Zhu et al., 2009; Mukherjee & Schapire, 2013) where ADABOOST.MH is used as baseline, the base learner is a classical single-label decision tree which has to be grown rather large to satisfy the weaklearning condition, and, when boosted, yields suboptimal results (Section 4). The reason why methods for learning multi-class $\{ \pm 1 \} ^ { K }$ -valued base classifiers had not been developed before is because they have to be boosted: since they do not select a single label, they cannot be used as stand-alone multi-class classifiers.
Although it is not described in detail, it seems that the base classifier used in the original paper of Schapire & Singer (1999) is a vector of $K$ independent decision stumps $\mathbf { h } ( \mathbf { x } ) \ = \ \left( h _ { 1 } ( \mathbf { x } ) , \ldots , h _ { K } ( \mathbf { x } ) \right)$ . These stumps cannot be used as node classifiers to grow decision trees since they do not define a single cut that depends only on the input (see Section 3 for a more detailed discussion). To overcome this problem, we propose base learning algorithms that factorize $\mathbf { h } ( \mathbf { x } )$ into
$$
\mathbf { h } ( \mathbf { x } ) = \alpha \mathbf { v } \varphi ( \mathbf { x } ) ,
$$
where $\alpha \in \mathbb { R } ^ { + }$ is a positive real valued base coefficient, $\mathbf { v }$ is an input-independent vote vector of length $K$ , and $\varphi ( \mathbf { x } )$ is a label-independent scalar classifier. In discrete ADABOOST.MH, both components are binary, that is, ${ \textbf { v } } \in$ $\{ \pm 1 \} ^ { K }$ and $\varphi ( \mathbf { x } ) : \mathbb { R } ^ { d } \{ \pm 1 \}$ . The setup can be extended to real-valued classifiers $\varphi ( \mathbf { x } ) \ : \ \mathbb { R } ^ { d } \ \ \mathbb { R }$ , also known as confidence-rated classifiers, and it is also easy to make the vote vector $\mathbf { v }$ real-valued (in which case, without the loss of generality, $\alpha$ would be set to 1). Both variants are known under the name of real ADABOOST.MH. Although there might be slight differences in the practical performance of real and discrete ADABOOST.MH, here we decided to stick to the discrete case for the sake of simplicity.
# 2.4. Casting the votes
To start, we show how to set $\alpha$ and $\mathbf { v }$ in general if the scalar base classifier $\varphi$ is given. The intuitive semantics of (6) is the following. The binary classifier $\varphi ( \mathbf { x } )$ cuts the input space into a positive and a negative region. In binary classification this is the end of the story: we need $\varphi ( \mathbf { x } )$ to be well-correlated with the binary class labels $y$ . In multiclass classification it is possible that $\varphi ( \mathbf { x } )$ correlates with some of the class labels $y _ { \ell }$ and anti-correlates with others. This free choice is expressed by the binary “votes” $v _ { \ell } \in \{ \pm 1 \}$ . We say that $\varphi ( \mathbf { x } )$ votes for class $\ell$ if $v _ { \ell } = + 1$ and it votes against class $\ell$ if $v _ { \ell } = - 1$ . As in binary classification, $\alpha$ expresses the overall quality of the classifier $\mathbf { v } \varphi ( \mathbf { x } )$ : $\alpha$ is monotonically decreasing with respect to the weighted error of $\mathbf { v } \varphi ( \mathbf { x } )$ .
The advantage of the setup is that, given the binary classifier $\varphi ( \mathbf { x } )$ , the optimal vote vector $\mathbf { v }$ and the coefficient $\alpha$ can be set in an efficient way. To see this, first let us define the weighted per-class error rate
$$
\mu _ { \ell - } = \sum _ { i = 1 } ^ { n } w _ { i , \ell } \mathbb { I } \left\{ \varphi ( \mathbf { x } _ { i } ) \neq y _ { i , \ell } \right\} ,
$$
and the weighted per-class correct classification rate
$$
\mu _ { \ell + } = \sum _ { i = 1 } ^ { n } w _ { i , \ell } \mathbb { I } \left\{ \varphi ( \mathbf { x } _ { i } ) = y _ { i , \ell } \right\}
$$
for each class $\ell = 1 , \ldots , K$ . With this notation, $Z ( \mathbf { h } , \mathbf { W } )$ simplifies to (see Appendix A)
$$
Z ( \mathbf { h } , \mathbf { W } ) = { \frac { e ^ { \alpha } + e ^ { - \alpha } } { 2 } } - { \frac { e ^ { \alpha } - e ^ { - \alpha } } { 2 } } \sum _ { \ell = 1 } ^ { K } v _ { \ell } { \big ( } \mu _ { \ell + } - \mu _ { \ell - } { \big ) } .
$$
The quantity
$$
\gamma _ { \ell } = v _ { \ell } \bigl ( \mu _ { \ell + } - \mu _ { \ell - } \bigr ) = \sum _ { i = 1 } ^ { n } w _ { i , \ell } v _ { \ell } \varphi ( \mathbf { x } _ { i } ) y _ { i , \ell }
$$
is called the classwise edge of $\mathbf { h } ( \mathbf { x } )$ . The full multi-class edge of the classifier is then
$$
\begin{array} { l } { { \displaystyle \gamma = \gamma ( \mathbf { v } , \varphi , \mathbf { W } ) = \sum _ { \ell = 1 } ^ { K } \gamma _ { \ell } = \sum _ { \ell = 1 } ^ { K } v _ { \ell } \big ( \mu _ { \ell + } - \mu _ { \ell - } \big ) } } \\ { { \displaystyle \ = \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } w _ { i , \ell } v _ { \ell } \varphi ( \mathbf { x } _ { i } ) y _ { i , \ell } } . } \end{array}
$$
With this notation, the classical (Freund & Schapire, 1997) binary coefficient $\alpha$ is recovered: it is easy to see that (9) is minimized when
$$
\alpha = \frac { 1 } { 2 } \log \frac { 1 + \gamma } { 1 - \gamma } .
$$
With this optimal coefficient, (9) becomes $Z ( \mathbf { h } , \mathbf { W } ) \ =$ $\sqrt { 1 - \gamma ^ { 2 } }$ , so $Z ( \mathbf { h } , \mathbf { W } )$ is minimized when $\gamma$ is maximized. From (11) it then follows that $Z ( \mathbf { h } , \mathbf { W } )$ is minimized if $v _ { \ell }$ agrees with the sign of $\left( \mu _ { \ell + } - \mu _ { \ell - } \right)$ , that is,
$$
v _ { \ell } = { \left\{ \begin{array} { l l } { 1 } & { { \mathrm { ~ i f ~ } } \mu _ { \ell + } > \mu _ { \ell - } } \\ { - 1 } & { { \mathrm { ~ o t h e r w i s e } } } \end{array} \right. }
$$
for all classes $\ell = 1 , \ldots , K$
The setup of factorized base classification (6) has another important consequence: the preservation of the weaklearning condition. Indeed, if $\varphi ( \mathbf { x } )$ is slightly better then a coin toss, $\gamma$ will be positive. Another way to look at it is to say that if a $( \varphi , \mathbf { v } )$ combination has a negative edge $\gamma < 0$ , then the edge of its complement (either $( - \varphi , \mathbf { v } )$ or $( \varphi , - \mathbf { v } ) )$ will be $- \gamma > 0$ . To understand the significance of this, consider a classical single-label base classifier $h \ : \ \mathcal { X } \ \to \ \mathcal { L } \ = \ \{ 1 , . . . , K \}$ , required by ADABOOST.M1. Now if $h ( \mathbf { x } )$ is slightly better than a coin toss, all one can hope for is an error rate slightly lower than $\textstyle { \frac { K - 1 } { K } }$ (which is equivalent to a. To achieve the error of edge slightly higher than(zero edge), required for $\textstyle { \frac { 2 - K } { K } } )$ $\frac { 1 } { 2 }$ continuing boosting, one has to come up with a base learner which is significantly better than a coin toss.
There is a long line of research on output codes similar in spirit to our setup. The boosting engine in these works is usually slightly different from ADABOOST.MH since it attempts to optimize the multi-class hinge loss, but the factorization of the multi-class base classifier is similar to (6). Formally, the vote vector v in this framework is one column in an output code matrix. In the simplest setup this matrix is fixed beforehand by maximizing the error correcting capacity of the matrix (Dietterich & Bakiri, 1995; Allwein et al., 2001). A slightly better solution (Schapire, 1997; Guruswami & Sahai, 1999; Sun et al., 2005) is to wait until the given iteration to pick $\mathbf { v }$ by maximizing
$$
\mathbf { v } ^ { * } = \underset { \mathbf { v } } { \arg \operatorname* { m a x } } \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } w _ { i , \ell } \mathbb { I } \left\{ v _ { \ell } \neq v _ { \ell ( \mathbf { x } _ { i } ) } \right\} ,
$$
and then to choose the optimal binary classifier $\varphi$ with this fixed vote (or code) vector $\mathbf { v } ^ { * }$ (although in practice it seems to be better to fix $\mathbf { v }$ to a random binary vector; Sun et al. 2005). The state of the art in this line of research is to iterate between optimizing $\varphi$ with a fixed $\mathbf { v }$ and then picking the best v with a fixed $\varphi$ (Li, 2006; Kegl & Busa-Fekete ´ , 2009; Gao & Koller, 2011).
It turns out that if $\varphi$ is a decision stump, exhaustive search for both the best binary cut (threshold) and the best vote vector can be carried out using one single sweep in $\Theta ( n K )$ time. The algorithm is a simple extension of the classical binary decision stump learner; for the sake of completeness, we provide the pseudocode in Appendix B. The computational efficiency of this learning algorithm combined with the factorized form (6) of the classifier allows us to build multiclass Hamming trees in an efficient manner, circumventing the problem of global maximization of the edge with respect to $\varphi$ and $\mathbf { v }$ .
# 3. Hamming trees
Classification trees (Quinlan, 1986) have been widely used for multivariate classification since the 80s. They are especially efficient when used as base learners in ADABOOST (Caruana & Niculescu-Mizil, 2006; Quinlan, 1996). Their main disadvantage is their variance with respect to the training data, but when averaged over $T$ different runs, this problem largely disappears. The most commonly used tree learner is C4.5 of Quinlan (1993). Whereas this tree implementation is a perfect choice for binary ADABOOST, it is suboptimal for ADABOOST.MH since it outputs a single-label classifier with no guarantee of a positive multi-class edge (11). Although this problem can be solved in practice by building large trees, it seems that using these large single-class trees is suboptimal (Section 4).
The main technical difficulty of building trees out of generic $\{ \pm 1 \} ^ { K }$ -valued multi-class classifiers $\mathbf { h } ( \mathbf { x } )$ is that they do not necessarily implement a binary cut ${ \bf x } \mapsto \{ \pm 1 \}$ , and partitioning the data into all the possibly $2 ^ { K }$ children at a tree node leads to rapid overfitting. Factorizing the multiclass classifier $\mathbf { h } ( \mathbf { x } )$ into an input-independent vote vector $\mathbf { v }$ and a label-independent binary classifier $\varphi ( x )$ as in (6) solves this problem. Base classifiers are trained as usual at each new tree leaf. In case this leaf remains a leaf, the full classifier $\mathbf { h } ( \mathbf { x } )$ is used for instances $\mathbf { x }$ that arrive to this leaf. If it becomes an inner node, the vote vector $\mathbf { v }$ is discarded, and the partitioning of the data set is based on solely the binary classifier $\varphi ( x )$ . An advantage of this formalization is that we can use any multi-class base classifier of the form (6) for the tree cuts, so the Hamming tree algorithm can be considered as a “meta learner” which can be used on the top of any factorized base learner.
Formally, a binary classification tree with $N$ inner nodes $( N + 1$ leaves) consists of a list of $N$ base classifiers $\pmb { 5 } = ( \mathbf { h } _ { 1 } , \ldots , \mathbf { h } _ { N } )$ of the form $\mathbf { h } _ { j } ( \mathbf { x } ) = \alpha _ { j } \mathbf { v } _ { j } \varphi _ { j } ( \mathbf { x } )$ and two index lists ${ \sf I } = \left( { \sf I } _ { 1 } , \ldots , { \sf I } _ { N } \right)$ and ${ \mathfrak { r } } = ( \mathfrak { r } _ { 1 } , \ldots , \mathfrak { r } _ { N } )$ with $\mathfrak { l } , \mathfrak { r } \in \mathsf { \Gamma } ( \mathbb { N } \cup \{ \mathrm { N U L L } \} ) ^ { N }$ . $\mathfrak { l } _ { j }$ and $\mathfrak { r } _ { j }$ represent the indices of the left and right children of the $j$ th node of the tree, respectively. The node classifier in the $j$ th node is defined
recursively as
$$
\mathfrak { h } _ { j } ( \mathbf { x } ) = \left\{ \begin{array} { l l } { - \mathbf { v } _ { j } } & { \mathrm { i f } \varphi _ { j } ( \mathbf { x } ) = - 1 \wedge \mathrm { I } _ { j } = \mathrm { N U L } } \\ & { \mathrm { ( l e f t ~ l e f ) } , } \\ { \mathbf { v } _ { j } } & { \mathrm { i f } \varphi _ { j } ( \mathbf { x } ) = + 1 \wedge \mathbf { r } _ { j } = \mathrm { N U L } } \\ & { \mathrm { ( r i g h t ~ l e a f ) } , } \\ { \mathfrak { h } _ { \mathrm { I } _ { j } } ( \mathbf { x } ) } & { \mathrm { i f } \varphi _ { j } ( \mathbf { x } ) = - 1 \wedge \mathrm { I } _ { j } \neq \mathrm { N U L } } \\ & { \mathrm { ( l e f t ~ i n e r n o d e ) } , } \\ { \mathfrak { h } _ { \mathrm { r } _ { j } } ( \mathbf { x } ) } & { \mathrm { i f } \varphi _ { j } ( \mathbf { x } ) = + 1 \wedge \mathbf { r } _ { j } \neq \mathrm { N U L } } \\ & { \mathrm { ( r i g h t ~ i n e r n o d e ) } . } \end{array} \right.
$$
The final tree classifier $\mathbf { h } _ { \mathfrak { H } , \mathfrak { t } , \mathfrak { r } } ( \mathbf { x } ) = \alpha \mathfrak { h } _ { 1 } ( \mathbf { x } )$ itself is not a factorized classifier (6).4 In particular, $\mathbf { h } _ { \mathcal { S } , \mathfrak { l } , \mathfrak { r } } ( \mathbf { x } )$ uses the local vote vectors $\mathbf { v } _ { j }$ determined by each leaf instead of a global vote vector. On the other hand, the coefficient $\alpha$ is unique, and it is determined in the standard way
$$
\alpha = \frac { 1 } { 2 } \log \frac { 1 + \gamma ( \mathfrak { h } _ { 1 } , \mathbf { W } ) } { 1 - \gamma ( \mathfrak { h } _ { 1 } , \mathbf { W } ) }
$$
based on the edge of the tree classifier ${ \mathfrak { h } } _ { 1 }$ . The local coefficients $\alpha _ { j }$ returned by the base learners are discarded (along with the vote vectors in the inner nodes).
Finding the optimal $N$ -inner-node tree is a difficult combinatorial problem. Most tree-building algorithms are therefore sub-optimal by construction. For ADABOOST this is not a problem: we can continue boosting as long as the edge is positive. Classification trees are usually built in a greedy manner: at each stage we try to cut all the current leaves $j$ by calling the base learner of the data points reaching the $j$ th leaf, then select the best node to cut, convert the old leaf into an inner node, and add two new leaves. The difference between the different algorithms is in the way the best node is selected. Usually, we select the node that improves a gain function the most. In ADABOOST.MH the natural gain is the edge (11) of the base classifier. Since the data set $( \mathbf { X } , \mathbf { Y } )$ is different at each node, we include it explicitly in the argument of the full multi-class edge
$$
\gamma ( \mathbf { v } , \varphi , \mathbf { X } , \mathbf { Y } , \mathbf { W } ) = \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } \mathbb { I } \left\{ x _ { i } \in \mathbf { X } \right\} w _ { i , \ell } v _ { \ell } \varphi ( \mathbf { x } _ { i } ) y _ { i , \ell } .
$$
Note that in this definition we do not require that the weights of the selected points add up to 1. Also note that this gain function is additive on subsets of the original data set, so the local edges in the leaves add up to the edge of the full tree. This means that any improvement in the local edge directly translates to an improvement of the tree edge. This is a crucial property: it assures that the edge of the tree is always positive as long as the local edges in the inner nodes are positive, so any weak binary classifier $\phi ( \mathbf { x } )$ can be used to define the inner cuts and the leaves.
The basic operation when adding a tree node with a scalar binary classifier (cut) $\varphi$ is to separate the data matrices $\mathbf { X }$ , $\mathbf { Y }$ , and W according to the sign of classification $\varphi ( \mathbf { x } _ { i } )$ for all $\mathbf { x } _ { i } \in \mathbf { X }$ . The pseudocode is straightforward, but for the sake of completeness, we include it in the supplementary (Appendix C, Figure 5).
Building a tree is usually described in a recursive way but we find the iterative procedure easier to explain, so our pseudocode in Figure 2 contains this version. The main idea is to maintain a priority queue, a data structure that allows inserting objects with numerical keys into a set, and extracting the object with the maximum key (Cormen et al., 2009). The key will represent the improvement of the edge when cutting a leaf. We first call the base learner on the full data set (line 1) and insert it into the priority queue with its edge $\gamma ( \mathbf { v } , \varphi , \mathbf { X } , \mathbf { Y } , \mathbf { W } )$ (line 3) as the key. Then in each iteration, we extract the leaf that would provide the best edge improvement among all the leaves in the priority queue (line 7), we partition the data set (line 11), call the base learners on the two new leaves (line 12), and insert them into the priority queue using the difference between the old edge on the partitioned data sets and the new edges of the base classifiers in the two new leaves (line 13). When inserting a leaf into the queue, we also save the sign of the cut (left or right child) and the index of the parent, so the index vectors l and $\mathfrak { r }$ can be set properly in line 8.
When the priority queue is implemented as a heap, both the insertion and the extraction of the maximum takes ${ \cal O } ( \log N )$ time (Cormen et al., 2009), so the total running time of the procedure is $O \big ( N ( T _ { \mathrm { B a s E } } + n + \log N ) \big )$ , where $T _ { \mathrm { B A S E } }$ is the running time of the base learner. Since $N$ cannot be more than $n$ , the running time is $O \big ( N ( T _ { \mathrm { B a S E } } + n ) \big )$ . If the base learners cutting the leaves are decision stumps, the total running time is $O ( n K d N )$ . In the procedure we have no explicit control over the shape of the tree, but if it happens to be balanced, the running time can further be improved to $O ( n K d \log N )$ .
# 4. Experiments
Full reproducibility was one of the key motivations when we designed our experimental setup. All experiments were done using the open source multiboost software of Benbouzid et al. (2012), version 1.2. In addition, we will make public all the configuration files, train/test/validation cuts, and the scripts that we used to set up the hyperparameter validation.
We carried out experiments on five mid-sized (isolet, letter, optdigits, pendigits, and USPS) and nine small (balance, blood, wdbc, breast, ecoli, iris, pima, sonar, and wine) data sets from the UCI repository. The five sets were chosen to overlap with the selections of most of the recent multi-class boosting papers (Kegl & ´ Busa-Fekete, 2009; Li, 2009a;b; Zhu et al., 2009; Sun et al., 2012; Mukherjee & Schapire, 2013), The small data sets were selected for comparing ADABOOST.MH with SVMs using Gaussian kernels, taking the results of a recent paper (Duch et al., 2012) whose experimental setup we adopted. All numerical results (multi-class test errors $\widehat { R } _ { \mathbb { I } } ( \mathbf { f } )$ (1) and test learning curves) are available at https://www.lri.fr/˜kegl/research/ multiboostResults.pdf, one experiment per page for clarity. Tables 1 and 2 contain summaries of the results.
Table 2. Test error percentages on small benchmark data sets.
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>AB.MH</td><td rowspan=1 colspan=1>SVM</td></tr><tr><td rowspan=1 colspan=1>balance</td><td rowspan=1 colspan=1>6.0±4.0</td><td rowspan=1 colspan=1>10.0±2.0</td></tr><tr><td rowspan=1 colspan=1>blood</td><td rowspan=1 colspan=1>22.0±4.0</td><td rowspan=1 colspan=1>21.0± 5.0</td></tr><tr><td rowspan=1 colspan=1>wdbc</td><td rowspan=1 colspan=1>3.0± 2.0</td><td rowspan=1 colspan=1>2.0±3.0</td></tr><tr><td rowspan=1 colspan=1>breast</td><td rowspan=1 colspan=1>34.0 ±13.0</td><td rowspan=1 colspan=1>37.0±8.0</td></tr><tr><td rowspan=1 colspan=1>ecoli</td><td rowspan=1 colspan=1>15.0±6.0</td><td rowspan=1 colspan=1>16.0±6.0</td></tr><tr><td rowspan=1 colspan=1>iris</td><td rowspan=1 colspan=1>7.0±6.0</td><td rowspan=1 colspan=1>5.0±6.0</td></tr><tr><td rowspan=1 colspan=1>pima</td><td rowspan=1 colspan=1>24.0±5.0</td><td rowspan=1 colspan=1>24.0±4.0</td></tr><tr><td rowspan=1 colspan=1>sonar</td><td rowspan=1 colspan=1>13.0±10.0</td><td rowspan=1 colspan=1>14.0±8.0</td></tr><tr><td rowspan=1 colspan=1>wine</td><td rowspan=1 colspan=1>2.0±3.0</td><td rowspan=1 colspan=1>3.0±4.0</td></tr></table>
Hyperparameter optimization is largely swept under the rug in papers describing alternative multi-class boosting methods. Some report results with fixed hyperparameters (Zhu et al., 2009; Sun et al., 2012) and others give the full table of test errors for a grid of hyperparameters (Kegl & Busa- ´ Fekete, 2009; Li, ${ 2 0 0 9 \mathrm { a } ; \mathrm { b } }$ ; Mukherjee & Schapire, 2013). Although the following procedure is rather old, we feel the need to detail it for promoting a more scrupulous comparison across papers.
For the small data sets we ran $1 0 \times 1 0$ cross-validation (CV) to optimize the hyperparameters and the estimate the generalization error. For the number of inner nodes we do a grid search (we also considered using the “one sigma” rule for biasing the selection towards smaller trees, but the simple minimization proved to be better). For robustly estimating the optimal stopping time we use a smoothed test error. For the formal description, let $\widehat { R } ^ { ( t ) }$ be the average test error (1) of the ten validation runs after $t$ iterations. We run ADABOOST.MH for $T _ { \mathrm { m a x } }$ iterations, and compute the optimal stopping time using the minimum of the smoothed test error using a linearly growing sliding window, that is,
$$
T ^ { * } = \operatorname * { a r g m i n } _ { T : T _ { \mathrm { m i n } } < T \leq T _ { \mathrm { m a x } } } \frac { 1 } { T - \lfloor 0 . 8 T \rfloor } \sum _ { t = \lfloor 0 . 8 T \rfloor } ^ { T } \widehat { R } ^ { ( t ) } ,
$$
where $T _ { \mathrm { m i n } }$ was set to a constant 50 to avoid stopping too early due to fluctuations. For selecting the best number of inner nodes $N$ , we simply minimized the smoothed test
1 $( \alpha , \mathbf { v } , \varphi ( \cdot ) ) \gets \mathrm { B A S E } ( \mathbf { X } , \mathbf { Y } , \mathbf { W } )$ 2 S ← PRIORITYQUEUE $\triangleright O ( \log N )$ insertion and extraction of maximum key
3 $\begin{array} { r l } & { \mathrm { I N S E R T } \left( S , \left( \mathbf { v } , \varphi ( \cdot ) , \mathbf { X } , \mathbf { Y } , \mathrm { N U L L } , 0 \right) , \gamma ( \mathbf { v } , \varphi , \mathbf { X } , \mathbf { Y } , \mathbf { W } ) \right) \quad \textrm { \textrm { s } } k e y = e d g e \gamma } \\ & { \textit { \textbf { c } } , } \end{array}$
4 H ← () . initialize classifier list
5 for $j 1$ to $N$
6 $[ \boldsymbol { \mathbf { \rho } } _ { j } \gets \boldsymbol { \mathbf { \tau } } _ { j } \gets \mathrm { N U L L }$ . initialize child indices
7 $( \mathbf { v } _ { j } , \varphi _ { j } ( \cdot ) , \mathbf { X } _ { j } , \mathbf { Y } _ { j } , \bullet , j _ { \mathrm { p } } ) \mathrm { E X T R A C T M A X } ( S )$ . best node in the priority queue
8 if $\bullet = -$ then ${ \mathfrak { l } } _ { j _ { \mathrm { p } } } \gets j$ else if ${ \bullet } = +$ then ${ \mathfrak { r } } _ { j _ { \mathrm { p } } } \gets j$ . child index of parent
9 $\begin{array} { r l } { \mathfrak { H } \mathrm { A P P E N D } \big ( \mathfrak { H } , \mathbf { v } _ { j } \varphi _ { j } ( \cdot ) \big ) } & { { } \triangleright a d d i n g \mathbf { h } _ { j } ( \cdot ) = \mathbf { v } _ { j } \varphi _ { j } ( \cdot ) t o \tilde { \mathfrak { H } } } \end{array}$
10 $( \mathbf { X } _ { - } , \mathbf { Y } _ { - } , \mathbf { W } _ { - } , \mathbf { X } _ { + } , \mathbf { Y } _ { + } , \mathbf { W } _ { + } ) \xleftarrow - \mathrm { C U T D A T A S E T } \big ( \mathbf { X } _ { j } , \mathbf { Y } _ { j } , \mathbf { W } , \varphi _ { j } ( \cdot ) \big )$
11 f $\mathbf { \dot { o } r } \bullet \in \{ - , + \}$ . insert children into priority queue
12 $( \alpha _ { \bullet } , \mathbf { v _ { \bullet } } , \varphi _ { \bullet } ( \cdot ) ) \mathrm { B A S E } ( \mathbf { X _ { \bullet } } , \mathbf { Y _ { \bullet } } , \mathbf { W _ { \bullet } } )$
13 $\mathrm { I N S E R T } \big ( S , \big ( \mathbf { v _ { * } } , \varphi _ { \bullet } ( \cdot ) , \mathbf { X _ { \bullet } } , \mathbf { Y _ { \bullet } } , \bullet , j \big ) , \gamma ( \mathbf { v _ { * } } , \varphi _ { \bullet } , \mathbf { X _ { \bullet } } , \mathbf { Y _ { \bullet } } , \mathbf { W _ { \bullet } } ) - \gamma ( \mathbf { v } _ { j } , \varphi _ { j } , \mathbf { X _ { \bullet } } , \mathbf { Y _ { \bullet } } , \mathbf { W _ { \bullet } } ) \big )$ . key = edge improvement over parent edge 1 1 + γ(h1, W)
14 α = 2 log 1 − γ(h1, W) . standard coefficient of the full tree classifier ${ \mathfrak { h } } _ { 1 }$ (14) 2
15 return α, H, l, r
Figure 2. The pseudocode of the Hamming tree base learner. $N$ is the number of inner nodes. The algorithm returns a list of base classifiers ${ \mathfrak H }$ , two index lists l and $\mathfrak { r }$ , and the base coefficient $\alpha$ . The tree classifier is then defined by (14).
Table 1. Test error percentages on mid-sized benchmark data sets.
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>isolet</td><td rowspan=1 colspan=1>letter</td><td rowspan=1 colspan=1>optdigits</td><td rowspan=1 colspan=1>pendigits</td><td rowspan=1 colspan=1>USPS</td></tr><tr><td rowspan=1 colspan=1>ADABoosT.MH w Hamming trees</td><td rowspan=1 colspan=1>3.5±0.5</td><td rowspan=1 colspan=1>2.1±0.2</td><td rowspan=1 colspan=1>2.0±0.3</td><td rowspan=1 colspan=1>2.1±0.3</td><td rowspan=1 colspan=1>4.5±0.5</td></tr><tr><td rowspan=1 colspan=1> ADABoosT.MH w Hamming prod. (Kégl &amp; Busa-Fekete, 2009)</td><td rowspan=1 colspan=1>4.2±0.5</td><td rowspan=1 colspan=1>2.5±0.2</td><td rowspan=1 colspan=1>2.1 ± 0.4</td><td rowspan=1 colspan=1>2.1±0.2</td><td rowspan=1 colspan=1>4.4±0.5</td></tr><tr><td rowspan=1 colspan=1>AOSOLOGITBoOST J= 20,v = 0.1 (Sun et al.,2012)</td><td rowspan=1 colspan=1>3.5 ± 0.5</td><td rowspan=1 colspan=1>2.3±0.2</td><td rowspan=1 colspan=1>2.1 ± 0.3</td><td rowspan=1 colspan=1>2.4± 0.3</td><td rowspan=1 colspan=1>4.9±0.5</td></tr><tr><td rowspan=1 colspan=1>ABCLOGITB0OSTJ= 20,v= 0.1 (Li,2009b)</td><td rowspan=1 colspan=1>4.2±0.5</td><td rowspan=1 colspan=1>2.2±0.2</td><td rowspan=1 colspan=1>3.1± 0.4</td><td rowspan=1 colspan=1>2.9±0.3</td><td rowspan=1 colspan=1>4.9±0.5</td></tr><tr><td rowspan=1 colspan=1>ABCMARTJ= 20,v=0.1(Li,2009a)</td><td rowspan=1 colspan=1>5.0±0.6</td><td rowspan=1 colspan=1>2.5±0.2</td><td rowspan=1 colspan=1>2.6±0.4</td><td rowspan=1 colspan=1>3.0± 0.3</td><td rowspan=1 colspan=1>5.2±0.5</td></tr><tr><td rowspan=1 colspan=1>LOGITB0OST J= 20,v = 0.1 (Li,2009b)</td><td rowspan=1 colspan=1>4.7± 0.5</td><td rowspan=1 colspan=1>2.8±0.3</td><td rowspan=1 colspan=1>3.6±0.4</td><td rowspan=1 colspan=1>3.1± 0.3</td><td rowspan=1 colspan=1>5.8±0.5</td></tr><tr><td rowspan=1 colspan=1>SAMME w single-label trees (Zhu etal., 2009)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.3±0.2</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.5 ± 0.3</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>ADABoosT.MH w single-label trees (Zhu et al., 2009)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.6± 0.3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.8±0.3</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>ADABoosT.MM (Mukherjee &amp; Schapire,2013)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.5± 0.2</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.7 ± 0.3</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>ADABoosT.MH w single-label trees (Mukherjee &amp; Schapire,2013)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>9.0±0.5</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>7.0± 0.4</td><td rowspan=1 colspan=1></td></tr></table>
error over a predefined grid
$$
N ^ { * } = \operatorname* { m i n } _ { N \in \mathcal { N } } \widehat { R } ^ { ( T _ { N } ^ { * } ) } ( N )
$$
where $T _ { N } ^ { * }$ and $\widehat { R } ^ { ( t ) } ( N )$ are the optimal stopping time (15) and the test error, respectively, in the run with $N$ inner nodes, and $\mathcal { N }$ is the set of inner nodes participating in the grid search. Then we re-run ADABOOST.MH on the joined training/validation set using the selected hyperparameters $N ^ { * }$ and $T _ { N ^ { * } } ^ { * }$ . The error $\widetilde { R _ { i } }$ in the ith training/test fold is then computed on the held-out test set. In the tables we report the mean error and the standard deviation. On the medium-size data sets we ran $1 \times 5$ CV (using the designated test sets where available) following the same procedure. In this case the report the binomial standard deviation $\sqrt { \widehat { R } ( 1 - \widehat { R } ) / n }$ . Further details and the description and explanation of some slight variations of this experimental setup are available at https://www.lri.fr/˜kegl/ research/multiboostResults.pdf.
On the small data sets, Duch et al. (2012) used the exact same protocol, so, although the folds are not the same, the results are directly comparable. The error bars represent the standard deviation of the test errors over the ten test folds not divided by $\sqrt { 1 0 }$ , contrary to common practice, since the training set of the folds are highly correlated. The large error bars are the consequence of the small size and the noisiness of these sets. They make it difficult to establish any significant trends. We can safely state that ADABOOST.MH is on par with SVM (it is certainly not worse, “winning” on six of the nine sets), widely considered one of the the best classification methods for small data sets.
Even though on the mid-sized data sets there are dedicated test sets used by most of the experimenters, comparing ADABOOST.MH to alternative multi-class boosting techniques is somewhat more difficult since none of the papers do proper hyperparameter tuning. Most of the papers report results with a table of errors given for a set of hyperparameter choices, without specifying which hyperparameter choice would be picked by proper validation. For methods that are non-competitive with ADABOOST.MH (SAMME of Zhu et al. (2009) and ADABOOST.MM of Mukherjee & Schapire (2013)) we report the post-validated best error which may be significantly lower than the error corresponding to the hyperparameter choice selected by proper validation. For methods where this choice would unfairly bias the comparison (AOSOLOGITBOOST (Sun et al., 2012), ABCLOGITBOOST, LOGITBOOST, and ABCMART (Li, 2009a;b)), we chose the best overall hyperparameter $\textit { J } = \ 2 0$ and $\nu ~ = ~ 0 . 1$ , suggested by the Li $( 2 0 0 9 \mathrm { a } ; \mathrm { b } )$ . At https://www.lri.fr/˜kegl/ research/multiboostResults.pdf (but not in Table 1) we give both errors for some of the methods. Proper hyperparameter-validation should put the correct test error estimates between those two limits. Since ADABOOST.MH with decision products (Kegl & Busa- ´ Fekete, 2009) is also implemented in multiboost (Benbouzid et al., 2012), for this method we re-ran experiments with the protocol described above.
The overall conclusion is that AOSOLOGITBOOST (Sun et al., 2012) and ADABOOST.MH with Hamming trees are the best algorithms (ADABOOST.MH winning on all the five data sets but within one standard deviation). ADABOOST.MH with decision products (Kegl & Busa- ´ Fekete, 2009) and ABCLOGITBOOST are slightly weaker, as also noted by (Sun et al., 2012). SAMME (Zhu et al., 2009) and ADABOOST.MM (Mukherjee & Schapire, 2013) perform below the rest of the methods on the two data sets shared among all the papers (even though we give post-validated results). Another important conclusion is that ADABOOST.MH with Hamming trees is significantly better then other implementations of ADABOOST.MH in (Zhu et al., 2009; Mukherjee & Schapire, 2013), assumably implemented using single-label trees (the errors reported by Mukherjee & Schapire (2013) are especially conspicuous).
ADABOOST.MH with Hamming trees also achieves good results on image recognition problems. On MNIST, boosting trees of stumps over pixels with eight inner nodes and about 50000 iterations has a test error of $1 . 2 5 \%$ , making it one of the best no-domain-knowledge “shallow” classifiers. Using stumps over Haar filters (Viola & Jones, 2004), boosted trees with four inner nodes and 10000 iterations achieves a test error of $0 . 8 5 \%$ , comparable to classical convolutional nets (LeCun et al., 1998).
ADABOOST.MH with Hamming trees, usually combined with calibration (Platt, 2000; Niculescu-Mizil & Caruana, 2005) and model averaging, has been also successful in recent data challenges. On the Kaggle emotions data challenge, although not competitive with deep learning techniques, out-of-the-box ADABOOST.MH with Hamming trees over Haar filters finished 17th place with a test error of $5 7 \%$ . In the Yahoo! Learning-to-Rank Challenge (Chapelle et al., 2011) it achieved top ten performances with results not significantly different from the winning scores. Finally, in the recent INTERSPEECH Challenge it won the Emotion sub-challenge and it was runner up in the Social Signals sub-challenge.
# 5. Conclusion
In this paper we introduced Hamming trees that optimize the multi-class edge prescribed by ADABOOST.MH without reducing the multi-class problem to $K$ binary oneagainst-all classifications. We showed that without this restriction, often considered mandatory, ADABOOST.MH is one of the best off-the-shelf multi-class classification algorithms. The algorithm retains the conceptual elegance, power, and computational efficiency of binary ADABOOST.
Using decision stumps at the inner nodes and at the leaves of the tree is a natural choice due to the efficiency of the learning algorithm, nevertheless, the general setup described in this paper allows for using any binary classifier. One of the avenues investigated for future work is to try stronger classifiers, such as SVMs, as binary cuts. The formal setup described in Section 2.1 does not restrict the algorithm to single-label problems; another direction for future work is to benchmark it on standard multi-label and sequence-to-sequence classification problems (Dietterich et al., 2008).
# References
Allwein, E. L., Schapire, R. E., and Singer, Y. Reducing multiclass to binary: a unifying approach for margin classifiers. Journal of Machine Learning Research, 1: 113–141, 2001.
Benbouzid, D., Busa-Fekete, R., Casagrande, N., Collin, F.-D., and Kegl, B. MultiBoost: a multi-purpose boost- ´ ing package. Journal of Machine Learning Research, 13: 549–553, 2012.
Boser, B., Guyon, I., and Vapnik, V. A training algorithm for optimal margin classifiers. In Fifth Annual Workshop on Computational Learning Theory, pp. 144–152, 1992.
Caruana, R. and Niculescu-Mizil, A. An empirical comparison of supervised learning algorithms. In Proceedings
of the 23rd International Conference on Machine Learning, pp. 161–168, 2006.
Chapelle, O., Chang, Y., and Liu, T.Y. (eds.). Yahoo! Learning-to-Rank Challenge, volume 14 of JMLR W&CP, 2011.
Cormen, T., Leiserson, C., and Rivest, R. Introduction to Algorithms. MIT Press, 2009.
Dietterich, T. G. and Bakiri, G. Solving multiclass learning problems via error-correcting output codes. Journal of Artificial Intelligence Research, 2:263–286, 1995.
Dietterich, T. G., Hao, Guohua, and Ashenfelter, A. Gradient tree boosting for training conditional random fields. Journal of Machine Learning Research, 9:2113–2139, 2008.
Dror, G., Boulle, M., Guyon, I., Lemaire, V., and Vogel, D. ´ (eds.). Proceedings of KDD-Cup 2009 competition, volume 7 of JMLR Workshop and Conference Proceedings, 2009.
Duch, W., Jankowski, N., and Maszczyk, T. Make it cheap: Learning with $O ( n d )$ complexity. In International Joint Conference on Neural Networks (IJCNN), pp. 1–4, 2012.
Freund, Y. and Schapire, R. E. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55:119– 139, 1997.
Gao, T. and Koller, D. Multiclass boosting with hinge loss based on output coding. In International Conference on Machine Learning, 2011.
Guruswami, V. and Sahai, A. Multiclass learning, boosting, and error-correcting codes. In Conference on Computational Learning Theory, 1999.
Kegl, B. and Busa-Fekete, R. Boosting products of base ´ classifiers. In International Conference on Machine Learning, volume 26, pp. 497–504, Montreal, Canada, 2009.
LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. Gradientbased learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
Li, Ling. Multiclass boosting with repartitioning. In International Conference on Machine Learning, 2006.
Li, P. ABC-Boost: Adaptive base class boost for multiclass classification. In International Conference on Machine Learning, 2009a.
Li, P. ABC-LogitBoost for multi-class classification. Technical Report arXiv:0908.4144, Arxiv preprint, 2009b.
Mukherjee, I. and Schapire, R. E. A theory of multiclass boosting. Journal of Machine Learning Research, 14: 437–497, 2013.
Niculescu-Mizil, A. and Caruana, R. Obtaining calibrated probabilities from boosting. In Proceedings of the 21st International Conference on Uncertainty in Artificial Intelligence, pp. 413–420, 2005.
Platt, J. Probabilistic outputs for support vector machines and comparison to regularized likelihood methods. In Smola, A.J., Bartlett, P., Schoelkopf, B., and Schuurmans, D. (eds.), Advances in Large Margin Classifiers, pp. 61–74. MIT Press, 2000.
Quinlan, J. Induction of decision trees. Machine Learning, 1(1):81–106, 1986.
Quinlan, J. C4.5: Programs for Machine Learning. Morgan Kaufmann, 1993.
Quinlan, J. Bagging, boosting and C4.5. In Proceedings of the 13th National Conference on Artificial Intelligence, pp. 725–730, 1996.
Schapire, R. E. Using output codes to boost multiclass learing problems. In International Conference on Machine Learning, 1997.
Schapire, R. E. and Singer, Y. Improved boosting algorithms using confidence-rated predictions. Machine Learning, 37(3):297–336, 1999.
Sun, P., Reid, M. D., and Zhou, J. AOSO-LogitBoost: Adaptive one-vs-one LogitBoost for multi-class problem. In International Conference on Machine Learning (ICML), 2012.
Sun, Y., Todorovic, S., Li, J., and Wu, D. Unifying the error-correcting and output-code AdaBoost within the margin framework. In International Conference on Machine Learning, 2005.
Viola, P. and Jones, M. Robust real-time face detection. International Journal of Computer Vision, 57:137–154, 2004.
Zhu, J., Zou, H., Rosset, S., and Hastie, T. Multi-class AdaBoost. Statistics and its Interface, 2:349–360, 2009.
A. Showing (9)
$$
\begin{array} { r l } { Z _ { 1 } \mathbf { h } _ { N } \boldsymbol { u } } & { = \underbrace { \frac { 1 } { \sqrt { 2 } } \frac { \epsilon _ { \mathrm { N } } } { \epsilon _ { \mathrm { N } } } \boldsymbol { u } _ { 1 } \cdot \boldsymbol { u } _ { N } ^ { \mathrm { o r } } \{ \alpha \mathbf { h } _ { \mathrm { o l d } } ^ { \mathrm { o p } } ( x , y ) \boldsymbol { \Lambda } _ { 1 } ^ { \mathrm { o r } } \geq \frac { \epsilon _ { \mathrm { N } } ^ { \mathrm { o r } } \gamma _ { 1 } } { \omega _ { 1 } ^ { 2 } } , \alpha \epsilon _ { \mathrm { N } } \gamma _ { 1 } ^ { \mathrm { o r } } \{ \alpha \mathbf { h } _ { \mathrm { o l d } } ^ { \mathrm { o p } } ( x , y ) \boldsymbol { \Lambda } _ { 1 } ^ { \mathrm { o r } } \} , } \\ & { = \quad \sum _ { i = 1 } ^ { \infty } \Bigg \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \} , \Bigg . } \\ & { = \quad \frac { 1 } { \sqrt { 2 } } \omega _ { 1 } } ( \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) - \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \} , } \\ & { \quad - \sum _ { i = 1 } ^ { \infty } \{ \beta _ { 1 } ^ { \mathrm { o p } } \boldsymbol { u } _ { i } ^ { \mathrm { o p } } ( x , y ) + \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \{ \alpha \mathbf { h } _ { i } ^ { \mathrm { o r } } ( x , y ) \} , } \\ & = \quad \sum _ { i = 1 } ^ { \infty } \{ \alpha _ { i } ^ \end{array}
$$
(16) comes from the definition (6) of $\mathbf { h }$ and (17) follows from the definitions (7) and (8) of $\mu _ { \ell - }$ and $\mu _ { \ell + }$ . In the final step (18) we used the fact that
$$
\sum _ { \ell = 1 } ^ { K } \left( \mu _ { \ell + } + \mu _ { \ell - } \right) = \sum _ { i = 1 } ^ { n } \sum _ { \ell = 1 } ^ { K } w _ { i , \ell } = 1 .
$$
# B. Multi-class decision stumps
The simplest scalar base learner used in practice on numerical features is the decision stump, a one-decision two-leaf decision tree of the form
$$
\varphi _ { j , b } ( \mathbf { x } ) = \left\{ { \begin{array} { r l } { 1 } & { { } { \mathrm { ~ i f ~ } } x ^ { ( j ) } \geq b , } \\ { - 1 } & { { } { \mathrm { ~ o t h e r w i s e } } , } \end{array} } \right.
$$
where $j$ is the index of the selected feature and $b$ is the decision threshold. If the feature values $\big ( x _ { 1 } ^ { ( j ) } , \dots , x _ { n } ^ { ( j ) } \big )$ are preordered before the first boosting iteration, a decision stump maximizing the edge (11) (or minimizing the energy $( 1 6 ) ^ { 5 }$ ) can be found very efficiently in $\Theta ( n d K )$ time.
The pseudocode of the algorithm is given in Figure 3. STUMPBASE first calculates the edge vector $\gamma ^ { ( 0 ) }$ of the constant classifier ${ \bf h } ^ { ( 0 ) } ( { \bf x } ) \equiv { \bf 1 }$ which will serve as the initial edge vector for each featurewise edge-maximizer. Then it loops over the features, calls BESTSTUMP to return the best featurewise stump, and then selects the best of the best by minimizing the energy (16). BESTSTUMP loops over all (sorted) feature values $s _ { 1 } , \ldots , s _ { n - 1 }$ . It considers all thresholds $b$ halfway between two non-identical feature values $s _ { i } \neq s _ { i + 1 }$ . The main trick (and, at the same time, the bottleneck of the algorithm) is the update of the classwise edges in lines 4-5: when the threshold moves from $\begin{array} { r } { b = \frac { s _ { i - 1 } + s _ { i } } { 2 } } \end{array}$ to $\textstyle b = { \frac { s _ { i } + s _ { i + 1 } } { 2 } }$ , the classwise edge $\gamma _ { \ell }$ of ${ \bf 1 } \varphi ( { \bf x } )$ (that is, $\mathbf { v } \varphi ( \mathbf { x } )$ with $\mathbf { v } = \mathbf { 1 } $ ) can only change by $\pm w _ { i , \ell }$ , depending on the sign $y _ { i , \ell }$ (Figure 4). The total edge of $\mathbf { v } \varphi ( \mathbf { x } )$ with optimal votes (13) is then the sum of the absolute values of the classwise edges of ${ \bf 1 } \varphi ( { \bf x } )$ (line 7).
<table><tr><td>STUMPBASE(X, Y,W)</td><td></td></tr><tr><td>1 forl←1 to K&gt;for all classes n &gt; 2 20</td><td>↑ Wi,lyi,l&gt; classwise edges (1O) of constant classifier h(O)(x) = 1</td></tr><tr><td>3 for j←1 to d</td><td>i=1 D all (numerical) features</td></tr><tr><td>4</td><td>s ← SORT(𝑥x(),..,x)) sort the jth column of X</td></tr><tr><td>5</td><td>(vj,bj,γj) ← BEsTSTUMP(s,Y,W,γ(0))D best stump per feature</td></tr><tr><td>6 αj←</td><td>1+Yj log base coefficient (12) 2 1-Yj</td></tr><tr><td>7</td><td> j* ← arg min Z(αjVjj,b,W)&gt; best stump across features</td></tr><tr><td>J return (αj*,Vj*,j*,b*(·))</td><td></td></tr><tr><td>BESTSTUMP(s,Y,W, γ(0))</td><td></td></tr><tr><td></td><td></td></tr><tr><td>1</td><td>γ*← γ(0)best edge vector</td></tr><tr><td>2</td><td>γ ← γ(o)initial edge vector</td></tr><tr><td>3</td><td>for i← 1to n-1 &gt;for all points in order s1 ≤...≤ sn-1</td></tr><tr><td>4</td><td>for l ← 1 to K&gt;for all classes</td></tr><tr><td>5</td><td></td></tr><tr><td></td><td>Ye ← Ye - 2wi,lyi,l &gt; update classwise edges of stump with v = 1</td></tr><tr><td>6</td><td>if si Si+1 then&gt; no threshold if identical coordinates Si = Si+1</td></tr><tr><td>7</td><td>if∑=1 lel &gt;∑ε-1l|thenfound beter stump</td></tr><tr><td>8</td><td>γ* ←γupdate best edge vector</td></tr><tr><td></td><td></td></tr><tr><td>9</td><td>6*←Si+si+1 update best threshold 2</td></tr><tr><td>10</td><td>forl ←1 to Kfor all classes</td></tr><tr><td>11</td><td>U ← sign(γe) D set vote vector according to (13)</td></tr><tr><td></td><td></td></tr><tr><td>12</td><td>ifγ*=γ(0) did not beat the constant classifier</td></tr><tr><td>13</td><td>return (v*,-O,llγ*lli)D constant classifier with optimal votes</td></tr><tr><td></td><td></td></tr><tr><td>14</td><td>else</td></tr><tr><td></td><td></td></tr><tr><td>15</td><td></td></tr><tr><td></td><td>return (v*,b*,llγ*ll1))&gt;best stump</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
# C. Cutting the data set
The basic operation when adding a tree node with a scalar binary classifier (cut) $\varphi$ is to separate the data matrices X, Y, and W according to the sign of the classification $\varphi ( \mathbf { x } _ { i } )$ for all $\mathbf { x } _ { i } \in \mathbf { X }$ . Figure 5 contains the pseudocode of this simple operation.
![](images/6f525edd3d65aa159a624c63bf871c52a5c96d6c549bf8d437780aec0c6d7dd8.jpg)
Figure 4. Updating the edge $\gamma _ { \ell }$ in line 5 of BESTSTUMP. If $y _ { i , \ell } = 1$ , then $\gamma _ { \ell }$ decreases by $2 w _ { i , \ell }$ , and if $y _ { i } = - 1$ , then $\gamma _ { \ell }$ increases by 2wi,\`.
![](images/e8b070048778b8e7c5b3a8494b7eecdc749148db839d4bed3eb669c61546ed7a.jpg)
Figure 5. The basic operation when adding a tree node is to separate the data matrices X, $\mathbf { Y }$ , and W according to the sign of classification $\varphi ( \mathbf { x } _ { i } )$ for all $\mathbf { x } _ { i } \in \mathbf { X }$ .