Abstract
In this paper, we evaluate the performance of various parallel optimization methods for Kernel Support Vector Machines on multicore CPUs and GPUs. In particular, we provide the first comparison of algorithms with explicit and implicit parallelization. Most existing parallel implementations for multi-core or GPU architectures are based on explicit parallelization of Sequential Minimal Optimization (SMO)---the programmers identified parallelizable components and hand-parallelized them, specifically tuned for a particular architecture. We compare these approaches with each other and with implicitly parallelized algorithms---where the algorithm is expressed such that most of the work is done within few iterations with large dense linear algebra operations. These can be computed with highly-optimized libraries, that are carefully parallelized for a large variety of parallel platforms. We highlight the advantages and disadvantages of both approaches and compare them on various benchmark data sets. We find an approximate implicitly parallel algorithm which is surprisingly efficient, permits a much simpler implementation, and leads to unprecedented speedups in SVM training.
Introduction
Kernel Support Vector Machines (SVMs) remain a cornerstone of machine learning, yet their training on large-scale datasets is notoriously computationally intensive. As hardware evolution has favored many-core CPUs and massive GPUs, the research community has focused on parallelizing SVM solvers. Traditionally, this has been achieved through explicit parallelization, where developers manually identify and implement parallel tasks within algorithms like Sequential Minimal Optimization (SMO). However, this approach often leads to complex, architecture-specific code that is difficult to maintain. This paper explores an alternative: implicit parallelization, which reformulates the SVM problem to leverage highly optimized, "black-box" linear algebra libraries.
Methodology
The study contrasts two distinct philosophies of parallelization:
- Explicit Parallelization: Represented by tools such as LIBSVM (utilizing OpenMP) and GTSVM. These methods involve hand-parallelizing the decomposition techniques used to solve the SVM dual problem.
- Implicit Parallelization (SP-SVM): The authors propose Sparse Primal SVM (SP-SVM), which reformulates the SVM as a primal optimization problem using squared hinge loss. To manage memory requirements, SP-SVM restricts the solution to a subset of "basis vectors," allowing the algorithm to be expressed primarily through dense matrix-matrix and matrix-vector multiplications. This allows the high-level logic to be implemented in languages like MATLAB or Python, while underlying libraries (e.g., Intel MKL, NVIDIA cuBLAS) handle the heavy parallelization.
Experimental Setup
The performance of these methods was evaluated across seven diverse datasets:
- Adult: Income prediction.
- Covertype/Forest: Forest cover type classification.
- KDDCup99: Network intrusion detection (90% sparse).
- MITFaces & FD: Face detection benchmarks.
- Epsilon: Synthetic classification.
- MNIST8M: Large-scale handwritten digit recognition.
These datasets were selected to represent medium-to-large scales where parallelization overhead is minimized but memory limits are not yet exceeded.
Key Results
The empirical results demonstrate that the implicit SP-SVM approach provides significant performance gains over traditional methods.
As shown in the results table, SP-SVM achieved speedups of up to 193x on multicore CPUs and 601x on GPUs compared to a single-core LIBSVM baseline. On the Epsilon dataset, SP-SVM completed training in under 2 minutes on a GPU, a task that required over 19 hours for the single-core version. Notably, SP-SVM often outperformed GTSVM, a highly optimized explicit GPU solver, by factors of 1.5x to 5x. Crucially, the "approximate" nature of SP-SVM did not significantly compromise accuracy, with test errors remaining within a fraction of a percent of the exact LIBSVM results.
Analysis and Discussion
The success of implicit parallelization can be attributed to several factors:
- Granularity: Unlike explicit methods that parallelize many small, irregular tasks, implicit methods group work into large, dense chunks, which is ideal for modern GPU and multicore architectures.
- Leveraging Optimized Libraries: By using standard BLAS libraries, the implementation benefits from thousands of hours of expert engineering dedicated to low-level performance.
- Portability: The reliance on standard math libraries ensures that the same high-level code can run efficiently across different hardware platforms (e.g., 12-core CPU vs. 448-core GPU) with minimal modification.
Conclusion and Future Work
While highly effective, implicit methods face challenges with memory constraints, as they treat data as dense matrices. Future work should address improving performance on extremely sparse datasets and exploring implicit parallelization for standard hinge loss formulations. Nevertheless, this research demonstrates that reformulating machine learning problems to utilize optimized linear algebra libraries can yield unprecedented speedups while simplifying implementation and improving portability.
Summary updated