NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Support Vector Machine Training Algorithm on GPUs

Jiashuai Shi, Zeyi Wen, Bingsheng He, Jian Chen

Abstract

Support Vector Machines (SVMs) are fundamental tools in machine learning, yet their training phase remains computationally expensive for large-scale datasets. While GPU acceleration has been explored, existing implementations often suffer from hardware underutilization and limited support for non-binary classification tasks. This paper presents a streamlined GPU-based SVM training algorithm that utilizes a "working set buffer" strategy to maximize hardware throughput and maintain fast convergence. Experimental results demonstrate that the proposed method consistently outperforms state-of-the-art GPU libraries across various benchmarks, supporting classification, regression, and multi-class problems.

Introduction

Support Vector Machines (SVMs) are widely used due to their robust generalization capabilities. However, as datasets scale into the gigabyte range, the "training tax" of SVMs becomes a significant bottleneck. The core of SVM training involves solving a complex optimization problem, typically via Sequential Minimal Optimization (SMO). While researchers have turned to GPUs to accelerate this process, many existing implementations fail to fully exploit modern hardware or are restricted to specific SVM variants.

This research introduces a highly parallel algorithm designed to address these inefficiencies, offering a versatile solution that scales effectively with modern GPU architectures.

The Bottleneck: Kernel Calculation and Hardware Underutilization

The primary bottleneck in SVM training is the calculation of the kernel matrix—a massive table representing similarities between data points. Because this matrix often exceeds available memory, it must be partially recalculated or cached. Existing GPU-based SVM tools face two primary hurdles:

  1. Underutilization: Many tools calculate kernel rows individually. While memory-efficient, this fails to provide enough parallel work for high-end GPUs, leading to performance plateaus.
  2. Limited Scope: Most GPU implementations are optimized only for binary classification, leaving users who require Support Vector Regression (SVR) or multi-class support with few options.

Proposed Methodology

The authors propose a three-pronged approach to optimize GPU performance:

1. The Working Set Buffer

To maximize GPU utilization, the algorithm selects a larger working set than traditional methods. To prevent the computational waste of calculating rows that might not contribute to convergence, a buffer strategy is employed. In each iteration, the algorithm retains the "best" half of the previous working set and replaces the remaining half with new instances. This ensures high throughput while stabilizing the optimization process.

2. Precomputation over Caching

While CPU-based libraries like LIBSVM rely on complex caching mechanisms, the authors found that simply precomputing the necessary rows for the current working set and storing them in GPU memory is more efficient. This avoids the overhead of managing a complex cache hierarchy on the GPU.

3. Parallel SMO Solver

The implementation features an improved SMO algorithm where each GPU thread optimizes a single instance. This allows the optimization step itself to occur in parallel, further reducing training time.

Experimental Setup

The algorithm was evaluated using five standard benchmarks from the LIBSVM repository, representing a mix of sparse, dense, binary, and multi-class problems.

Table 2: Characteristics of the datasets used in the evaluation, including number of classes, cardinality, and dimensionality.

Experiments were conducted on a workstation equipped with a Tesla P100 GPU, comparing the proposed method against LIBSVM-OpenMP (CPU), gtSVM, and OHD-SVM.

Key Results

The proposed algorithm demonstrated superior performance across all tested datasets, as shown in the training time comparison below.

Table 1: Comparison of training times (in seconds) between the proposed algorithm and existing implementations.

Performance Highlights:

  • Significant Speedups: On the mnist dataset, the new algorithm finished in 26.68 seconds, significantly faster than LIBSVM-OpenMP (429.10s) and gtSVM (34.47s).
  • Consistency and Scaling: On the rcv1 dataset, the algorithm was approximately 2x faster than the previous state-of-the-art GPU implementation (OHD-SVM) and 8x faster than the CPU-based LIBSVM.
  • Versatility: Unlike OHD-SVM, which could not process multi-class datasets like mnist and news20, the proposed algorithm handled them efficiently without modification.

Conclusion

By balancing throughput and convergence through a working set buffer and prioritizing raw parallel throughput over complex caching, the authors achieved a significant leap in SVM training efficiency. This work provides a foundation for high-performance SVM libraries, such as the open-source ThunderSVM, making large-scale machine learning more accessible to researchers and practitioners alike.

Summary updated

BibTeX
@inproceedings{shi2018efficient,
  author = {Jiashuai Shi and Zeyi Wen and Bingsheng He and Jian Chen},
  title = {{Efficient Support Vector Machine Training Algorithm on GPUs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.12163},
}
Figure