Distributed optimization of multi-class SVMs

Maximilian Alber, Julian Zimmert, Ürün Doǧan, Marius Kloft

Introduction

In modern machine learning, the challenge of multi-class classification has grown significantly as datasets scale to tens of thousands of categories. A classic example is the indexing of large-scale encyclopedic articles or web directories, where a single document might belong to one of 30,000 potential classes.

Traditionally, Support Vector Machines (SVMs) handle this via the One-vs-Rest (OVR) strategy. In OVR, a separate binary classifier is trained for each class. While computationally convenient and easily parallelizable, OVR often falls short in accuracy because it fails to model the inter-class relationships during training. The alternative—"All-in-One" multi-class SVMs (MC-SVMs)—considers all classes simultaneously. However, these models, such as the Weston-Watkins (WW) or Lee-Lin-Wahba (LLW) formulations, suffer from a computational complexity that scales quadratically ($O(C^2)$) with the number of classes ($C$). This bottleneck has historically limited their application to small-scale problems.

This paper presents a breakthrough in scaling these complex models using distributed optimization algorithms, enabling "All-in-One" SVMs to compete on an unprecedented scale.

Distributed All-in-One Formulations

The researchers developed novel distributed versions of two prominent MC-SVM formulations to overcome the $O(C^2)$ complexity.

1. Lee, Lin, and Wahba (LLW)

The LLW formulation is theoretically robust but difficult to decouple. The authors introduced an auxiliary variable into the dual optimization problem. This mathematical "trick" effectively decouples the objective function, allowing the global problem to be broken down into class-specific subproblems. Each subproblem can then be solved independently across different nodes in a computational cluster, significantly reducing the per-node workload.

2. Weston and Watkins (WW)

The WW formulation presented a more intricate challenge due to the dependencies between class pairs. To solve this, the authors utilized a concept from graph theory: 1-factorization. By treating the classes as nodes in a complete graph, the optimization process is organized like a round-robin tournament. In each iteration (or "round"), every class is paired with exactly one other class. This allows the system to optimize $C/2$ pairs of classes in parallel across the cluster without memory conflicts or race conditions.

Implementation and Scalability

The implementation leverages a hybrid parallel architecture. OpenMPI is used for communication between distributed nodes, while OpenMP handles parallel processing across multiple cores within each node.

Unlike many contemporary "big data" approaches that rely on stochastic gradient descent or other approximations—which can be noisy and sensitive to hyperparameter tuning—this method provides an exact solver. It is guaranteed to reach the true mathematical optimum of the SVM objective function, ensuring the highest possible model fidelity.

Experimental Evaluation

The solvers were validated using both standard UCI repository benchmarks and the massive Large Scale Hierarchical Text Classification (LSHTC) corpus. The LSHTC datasets provided a rigorous test of scalability:

  • LSHTC-small: 1,139 classes.
  • LSHTC-large: 12,294 classes.
  • LSHTC-2011: 27,875 classes.

Key Findings: Accuracy and Sparsity

The experiments revealed that "All-in-One" models (specifically WW and Crammer-Singer variants) consistently outperformed the OVR baseline in terms of classification accuracy on text data.

Perhaps more surprisingly, the Weston-Watkins model produced significantly sparser models. On the LSHTC-large dataset, the WW model was nearly ten times leaner than the OVR model. This sparsity is a critical advantage for real-world deployment, as it leads to faster inference times and lower memory requirements on production servers.

Performance and Speedup

The algorithms demonstrated near-linear speedup. By doubling the number of computational nodes, the training time was roughly halved. This indicates that the communication overhead between machines was kept to a minimum, even when dealing with the high-dimensional, sparse feature vectors typical of text classification. On the LSHTC-2011 dataset, the WW solver outperformed standard implementations by up to two orders of magnitude in specific distributed configurations.

Conclusion and Future Work

This work demonstrates that "All-in-One" MC-SVMs are not only theoretically superior but also practically viable for massive datasets when paired with distributed optimization. While the LLW formulation showed slower convergence at extreme scales, the WW and Crammer-Singer approaches proved highly efficient.

Future research may focus on reducing the memory footprint per node, as current implementations require each node to store the entire model. Additionally, the 1-factorization strategy holds promise for other multi-class problems beyond SVMs. To support further research, the authors have released their implementation, XCSVM, as an open-source project on GitHub.

Summary updated

BibTeX
@inproceedings{alber2017distributed,
  author = {Maximilian Alber and Julian Zimmert and Ürün Doǧan and Marius Kloft},
  title = {{Distributed optimization of multi-class SVMs}},
  booktitle = {PLoS},
  year = {2017},
  doi = {10.1371/journal.pone.0178161},
}
Figure