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

Snacks: a fast large-scale kernel SVM solver

Sofiane Tanji, Andrea Della Vecchia, François Glineur, Silvia Villa · DOI

Abstract

Kernel Support Vector Machines (SVMs) are powerful tools for non-linear classification but suffer from quadratic scaling issues that render them impractical for massive datasets. We present Snacks, a primal kernel SVM solver that integrates Nyström approximation with an accelerated stochastic subgradient method (ASSG). By transforming the non-linear problem into a reduced-dimension linear space and employing a staged optimization strategy, Snacks achieves state-of-the-art training speeds—up to three orders of magnitude faster than traditional solvers—while maintaining competitive accuracy.

1. Introduction

The utility of Kernel SVMs in non-parametric learning is often limited by the "kernel bottleneck." Standard implementations require $O(n^2)$ time and memory complexity relative to the number of data points $n$. For modern datasets containing millions of samples, the memory requirements for an exact kernel matrix can exceed hundreds of gigabytes, far surpassing the capacity of standard hardware. While approximate solvers using random features or Nyström subsampling have been proposed, optimizing these approximations efficiently remains a challenge.

2. Methodology

Snacks addresses the scalability challenge through a two-pronged approach:

2.1 Nyström Approximation

To avoid computing the full $n \times n$ kernel matrix, Snacks utilizes Nyström subsampling. By selecting $m$ representative points ($m \ll n$), the algorithm constructs a low-rank approximation of the kernel. This process effectively creates a "kernel data embedding," mapping the original data into an $m$-dimensional feature space where the problem can be solved as a linear SVM.

2.2 Accelerated Stochastic Subgradient (ASSG)

The core optimization engine of Snacks is an accelerated variant of the stochastic subgradient method. Unlike standard stochastic subgradient descent (SSG) algorithms like Pegasos, ASSG utilizes a structured outer-inner loop approach. In each "stage" (the outer loop), the algorithm systematically reduces the step size and the radius of the projection ball. This staged convergence allows Snacks to reach the optimal solution significantly faster than traditional first-order methods.

3. Experimental Evaluation

The performance of Snacks was evaluated across five diverse benchmark datasets:

  • ijcnn1 (50k points): Binary classification.
  • a9a (50k points): Census data.
  • MNIST (60k points): Digit classification (7 vs. others).
  • rcv1 (700k points): High-dimensional text classification.
  • SUSY (5 million points): High-energy physics data.

For the largest datasets, such as rcv1 and SUSY, the full kernel matrix is too large for standard RAM, necessitating the use of approximate methods.

4. Key Results

4.1 Computational Efficiency

Snacks demonstrates remarkable speedups over established solvers. On the SUSY dataset (5 million points), Snacks completed training in approximately 1.4 seconds (excluding precomputation). In comparison, ThunderSVM, a high-performance GPU/CPU solver, failed to complete the task within a 24-hour window. On the sparse rcv1 dataset, Snacks outperformed ThunderSVM by a factor of 160x.

4.2 Accuracy and Robustness

Despite the use of low-rank approximations, Snacks maintains high predictive performance. Classification errors remained within 0.1% to 0.5% of the "optimal" error rates produced by exact solvers on smaller data subsets. Furthermore, the algorithm showed significant robustness to hyperparameter variations, including the regularization parameter $\lambda$ and the subspace size $m$.

5. Discussion and Limitations

The primary advantage of Snacks lies in its use of the primal formulation, which facilitates massive parallelization and faster iteration. However, some constraints remain. The kernel embedding must still be stored in memory, which imposes a ceiling on scalability for datasets reaching the billions of points. Additionally, the current implementation relies on uniform sampling for the Nyström approximation; future iterations may incorporate Approximate Leverage Score (ALS) sampling to better handle complex data distributions.

6. Conclusion

Snacks represents a significant step forward in large-scale kernel learning. By combining efficient data embeddings with accelerated stochastic optimization, it provides a practical solution for training non-linear SVMs on millions of data points in seconds, bridging the gap between theoretical complexity and real-world application.

Summary updated

BibTeX
@inproceedings{tanji2023snacks,
  author = {Sofiane Tanji and Andrea Della Vecchia and François Glineur and Silvia Villa},
  title = {{Snacks: a fast large-scale kernel SVM solver}},
  booktitle = {ECC},
  year = {2023},
  url = {https://openreview.net/forum?id=J05140UIJH},
}
Figure