A hierarchical method for multi-class support vector machines

Volkan Vural, Jennifer G. Dy

TL;DR

The "Divide-by-2" (DB2) framework extends Support Vector Machines (SVMs) to multi-class problems by organizing them into a hierarchical binary decision tree. By using only $N-1$ classifiers, DB2 achieves significantly faster testing and training times—especially on unbalanced datasets—while maintaining accuracy comparable to standard "one-against-one" and "one-against-rest" approaches.

The Multi-Class SVM Bottleneck

Support Vector Machines were originally designed for binary classification (distinguishing between two groups). To handle $N$ classes, researchers typically use two strategies:

  1. One-against-rest (OAR): Training $N$ classifiers, each comparing one class against all others. This is slow to train because every classifier must process the entire dataset.
  2. One-against-one (OAO): Training $N(N-1)/2$ classifiers for every possible pair of classes. While each classifier is trained on a smaller subset of data, the sheer number of classifiers makes testing slow as the number of classes grows.

The authors identify a critical gap: there is a need for a method that is computationally efficient in both training and testing without losing the "structural risk minimization" benefits that make SVMs so powerful.

The Divide-by-2 (DB2) Methodology

The authors propose Divide-by-2 (DB2), which hierarchically splits the $N$ classes into two subsets at each node of a tree until only individual classes remain. This results in a tree with exactly $N-1$ binary SVM classifiers.

Decision tree structure of the DB2 method

Key components of the DB2 approach include:

  • Splitting Criteria: How do you decide which classes go into group A and which into group B? The paper explores three methods:
  • k-means: Grouping classes based on their mean vectors.
  • Spherical Shells: Grouping classes based on their distance from the global data origin.
  • Balanced Subsets: Dividing classes so that the number of samples in each subset is roughly equal, which optimizes for speed.
  • Testing: To classify a new point, you simply traverse the tree from the root. At each node, the SVM decision function sends the point left or right until it reaches a leaf node (a specific class).
  • Adaptive Approach: Instead of using the same kernel (e.g., a standard RBF kernel) for the entire tree, the authors propose selecting the optimal kernel and parameters for each specific node in the hierarchy.

Datasets Evaluated

The authors evaluated DB2 on six datasets with varying characteristics:

  • UCI Repository: Glass (6 classes), Vowel (11 classes), and Segment (7 classes).
  • Medical Data: HRCT (High-resolution computed tomography of lungs, 5 classes).
  • Satellite Data: Modis (15 classes) and "SmallModis" (a 4-class subset).
  • Note: The Modis datasets are particularly important because they are unbalanced, with one class being much larger than the others. This skew perfectly highlights DB2's efficiency.

Key Insights and Advantages

  • Efficiency through Hierarchy: Because DB2 uses a tree structure, testing a sample only requires $O(\log N)$ evaluations in a balanced tree, compared to $O(N^2)$ for OAO.
  • The "Unbalanced Data" Advantage: In OAO, a massive class participates in $N-1$ different classifiers. In DB2, if the massive class is separated at the root node, it never has to be processed by the remaining $N-2$ classifiers. This leads to a massive reduction in training time for skewed datasets.
  • Theoretical Error Bounds: Unlike OAR or OAO, the tree structure of DB2 allows the authors to derive a formal generalization error bound using Vapnik-Chervonenkis (VC) analysis for directed acyclic graphs.
  • Kernel Flexibility: The "Adaptive Approach" recognizes that the boundary between "Animals vs. Plants" might require a different kernel than "Dogs vs. Cats." Tailoring the kernel to the specific split improves overall accuracy.

Performance and Results

CPU time comparison showing DB2's efficiency
  • Testing Speed: DB2 was the fastest in testing across almost all datasets. For the "Glass" dataset, DB2 took 2.1 seconds to test, compared to 6.3 seconds for OAO and 6.8 seconds for OAR.
  • Training Speed: On the unbalanced "SmallModis" dataset, DB2 (3658s) was faster than OAO (4165s) and significantly faster than OAR (23256s). As the number of data samples grows, DB2's computational advantage becomes increasingly apparent.
  • Accuracy: DB2's accuracy was comparable to state-of-the-art methods. When using the Adaptive Kernel approach, DB2 actually outperformed the others on several datasets (e.g., achieving 80.2% on Glass vs. 76.6% for OAO).

Limitations and Future Work

  • Splitting Sensitivity: The performance of DB2 is highly dependent on how the classes are initially grouped. If the first split is "poor" (i.e., the groups are not easily separable), the error can propagate down the tree.
  • Feature Selection: The authors suggest that future work should explore using different feature sets at different levels of the hierarchy (e.g., using coarse features at the root and fine-grained features at the leaves).
  • Optimized Grouping: They propose investigating more sophisticated ways to group classes, such as using discriminant analysis or incorporating kernel functions directly into the clustering step.

Summary updated

BibTeX
@inproceedings{vural2004hierarchical,
  author = {Volkan Vural and Jennifer G. Dy},
  title = {{A hierarchical method for multi-class support vector machines}},
  booktitle = {International Conference on Machine Learning},
  year = {2004},
  doi = {10.1145/1015330.1015427},
}
Figure