Distributed Training of Structured SVM

Ching-Pei Lee, Kai-Wei Chang, Shyam Upadhyay, Dan RotharXiv 2015

Abstract

Training structured prediction models is time-consuming. However, most existing approaches only use a single machine, thus, the advantage of computing power and the capacity for larger data sets of multiple machines have not been exploited. In this work, we propose an efficient algorithm for distributedly training structured support vector machines based on a distributed block-coordinate descent method. Both theoretical and experimental results indicate that our method is efficient.

Introduction

Structured prediction is essential for tasks where outputs are mutually dependent, such as parsing a sentence or identifying objects in an image. However, training these models is notoriously slow and memory-intensive. While standard linear classification (like predicting "spam" vs. "not spam") has well-established distributed algorithms, structured learning lags behind due to three primary hurdles:

  1. The Inference Bottleneck: Finding the best structure for a given input is often the most expensive part of training.
  2. Non-Smooth Objectives: The mathematical functions used in Structured Support Vector Machines (SSVMs) are often non-smooth, making it difficult to apply standard distributed optimization techniques without sacrificing speed.
  3. Feature Inconsistency: Because features are often generated "on-the-fly," different machines might assign different indices to the same feature, leading to synchronization errors.

Methodology

To address these challenges, we introduce BQO-STRUCT, a highly efficient algorithm based on a distributed block-coordinate descent method. The framework partitions training data across $K$ machines, where each machine approximates the global optimization problem locally.

Algorithm 1: The BQO-STRUCT optimization framework.

Key components of the methodology include:

  • Local Sub-problems: Local problems are formulated as smaller SSVM problems, allowing the use of highly optimized single-machine solvers.
  • Communication via allreduce: After local solving, machines synchronize the weight vector ($w$) using an allreduce operation.
  • Line Search: A global line search finds the optimal step size, ensuring efficient movement toward the optimum.
  • Feature Hashing: To solve feature inconsistency, we use a hashing strategy to map features to integer values, ensuring all machines share a common feature space without extra communication overhead.

Experimental Setup

The method was evaluated on two classic Natural Language Processing (NLP) tasks using the Wall Street Journal (WSJ) portion of the Penn Treebank:

  • Part-of-Speech (POS) Tagging: Assigning word categories (noun, verb, etc.) to text.
  • Dependency Parsing (DP): Determining the grammatical structure and relationships between words in a sentence.

Results and Discussion

Our experiments demonstrate that BQO-STRUCT achieves a global linear convergence rate $O(\log(1/\epsilon))$, a significant upgrade over the sublinear rates of previous distributed structured learners. This efficiency reduces the number of expensive inference calls required to reach a high-quality solution.

Comparison of BQO-STRUCT against baseline methods and its scalability across multiple nodes.

Key Findings:

  • Superior Speed: BQO-STRUCT reached higher accuracy significantly faster than other distributed methods like ADMM-Struct and Distributed Perceptron.
  • Near-Linear Speedup: For the computationally heavy Dependency Parsing task, the algorithm achieved nearly linear speedup (e.g., 8 nodes were roughly 8 times faster than a single node).
  • Communication-Inference Trade-off: In structured learning, inference is often the primary bottleneck. BQO-STRUCT allows for a trade-off: by solving local problems more thoroughly, the total number of communication rounds can be reduced.
  • Task Sensitivity: The benefits of distribution are most pronounced when inference is expensive. For POS tagging, which is relatively fast on a single machine, adding more machines provided diminishing returns due to communication overhead.

Conclusion

BQO-STRUCT provides a robust framework for scaling structured prediction. While the cost of allreduce operations may scale with the number of machines, the algorithm's ability to leverage existing single-machine solvers and achieve linear convergence makes it a powerful tool for large-scale NLP tasks. Future work may explore its application in computer vision and other fields with high inference costs.

Summary updated

BibTeX
@misc{lee2015distributed,
  author = {Ching-Pei Lee and Kai-Wei Chang and Shyam Upadhyay and Dan Roth},
  title = {{Distributed Training of Structured SVM}},
  year = {2015},
  eprint = {1506.02620},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1506.02620},
}
Figure