Abstract
Support vector machines (SVM) can classify data sets along highly non-linear decision boundaries because of the kernel-trick. This expressiveness comes at a price: During test-time, the SVM classifier needs to compute the kernel inner-product between a test sample and all support vectors. With large training data sets, the time required for this computation can be substantial. In this paper, we introduce a post-processing algorithm, which compresses the learned SVM model by reducing and optimizing support vectors. We evaluate our algorithm on several medium-scaled real-world data sets, demonstrating that it maintains high test accuracy while reducing the test-time evaluation cost by several orders of magnitude---in some cases from hours to seconds. It is fair to say that most of the work in this paper was previously been invented by Burges and Sch"olkopf almost 20 years ago. For most of the time during which we conducted this research, we were unaware of this prior work. However, in the past two decades, computing power has increased drastically, and we can therefore provide empirical insights that were not possible in their original paper.
Introduction
Kernel Support Vector Machines (SVMs) are powerful tools for non-linear classification, yet they suffer from a significant "test-time tax." To classify a new sample, the model must compute the kernel inner product between that sample and every support vector. As datasets grow, the number of support vectors often scales linearly, making real-time inference prohibitively slow for resource-constrained environments like mobile devices or embedded sensors.
While existing methods often attempt to select a subset of training points as support vectors, this paper introduces Compressed Vector Machines (CVM). CVM is a post-processing algorithm that creates a small set of optimized, artificial support vectors. By moving beyond the restriction of using only existing training data, CVM maintains high accuracy while reducing inference costs by several orders of magnitude.
Methodology: The CVM Pipeline
The CVM algorithm operates in two distinct stages to approximate the decision boundary of a full SVM model:
- Initialization via LARS-SVM: The SVM objective is reformulated as a sparse regression problem. Least Angle Regression (LARS) is employed to greedily select a small initial subset of existing support vectors that best approximate the full model's predictions.
- Gradient Support Vector Optimization: This core innovation treats the locations of the support vectors as continuous parameters. Using conjugate gradient descent, the algorithm "moves" these artificial support vectors within the feature space to minimize the squared loss between the compressed model's predictions and the original full SVM's predictions.
This optimization process essentially "heals" the approximate boundary. As shown in the visualization above, an initially jagged boundary from the LARS step gradually morphs to match the full SVM solution as the artificial support vectors are optimized.
Experimental Evaluation and Results
The researchers evaluated CVM across a diverse range of benchmarks, including synthetic "noisy circle" data and six real-world datasets: Pageblocks, Magic, Letters, 20news, MNIST, and DMOZ. These datasets span various dimensions (from 10 to over 16,000 features) and include both binary and multi-class classification tasks.
Key Findings
CVM demonstrated superior performance compared to state-of-the-art baselines like Reduced-SVM. Key findings include:
- Massive Speedups: Inference costs were reduced by orders of magnitude, in some cases transforming hours of computation into seconds.
- High Fidelity: CVM consistently maintained near-peak accuracy while utilizing only approximately 10% of the original support vectors.
- Superior Convergence: Across all datasets, CVM reached full SVM accuracy significantly faster than competing methods as the number of support vectors increased.
Discussion and Conclusion
The primary insight of this work is that training points are often a sub-optimal basis for representing a decision boundary. By allowing support vectors to exist anywhere in the continuous feature space, one can achieve equivalent accuracy with a fraction of the vectors. While the underlying concepts were explored decades ago, modern computational power allows for the large-scale empirical validation presented here.
Future work will address the non-convex nature of the optimization, which currently relies heavily on LARS for initialization. Additionally, jointly optimizing the SVM cost parameters and kernel width alongside support vector locations could further enhance compression efficiency.
Summary updated