Introduction
In kernel-based machine learning methods like Support Vector Machines (SVMs), performance heavily depends on hyperparameters—specifically the regularization parameter ($\lambda$) and the kernel hyperparameter (such as the width $\gamma$ of a Gaussian RBF kernel). Traditionally, finding the optimal $\gamma$ requires grid search or cross-validation, meaning the model must be trained from scratch dozens or hundreds of times.
While "solution path" algorithms have been developed to trace the entire continuum of solutions for the regularization parameter $\lambda$ (which is piecewise linear), the kernel parameter $\gamma$ is embedded directly inside the non-linear kernel matrix. Consequently, the solution path for $\gamma$ is highly non-linear, meaning existing path algorithms cannot predict where the next breakpoint will occur. This paper introduces a novel "kernel path algorithm" that efficiently traces the optimal solution path across different kernel hyperparameter values without retraining the model from scratch.
Tracing the Non-Linear Path
The authors formulate an algorithm to update the optimal SVM solution as $\gamma$ changes, avoiding full retraining through three main mechanisms:
- Exact Local Updates: As long as the status of the training points doesn't change (i.e., points stay either on the margin, inside the margin, or outside the margin), the new optimal solution for a slightly shifted $\gamma$ can be calculated exactly using a first-order Taylor series approximation.
- Adaptive Backtracking for Breakpoints: Because the path is non-linear, the algorithm cannot foresee when a point will shift its status (an "event" or breakpoint). The authors introduce a decay-based search: they multiply $\gamma$ by a decay rate $\theta \in (0,1)$. If an event is overshot (a point's status becomes invalid), the algorithm backtracks by taking the square root of the decay rate ($\theta \leftarrow \theta^{1/2}$), bringing it closer to 1. This exponentially narrows down the exact breakpoint until it falls within a tiny error tolerance $\epsilon$.
- Efficiency Trick: Instead of scanning all $n$ training points to check for events, the algorithm only monitors a small subset of "marginal points" that are mathematically close to changing sets.
Visualizing the Bias-Variance Tradeoff
The authors evaluate their algorithm using synthetic binary classification datasets, including a "Two-moons" dataset (featuring a strong manifold structure where the two classes are intertwined but perfectly separable) and a "Two-Gaussians" dataset (featuring overlapping distributions).
Tracing the kernel path provides a continuous view of overfitting. As $\gamma$ decreases in an RBF kernel, the decision boundary becomes hyper-flexible. The algorithm smoothly tracks how almost all data points eventually get sucked into becoming support vectors.
On separable data like the Two-moons set, as $\gamma$ decreases, the generalization accuracy first increases as the boundary fits the moons, and then sharply decreases. Simultaneously, the number of support vectors drops and then spikes, perfectly illustrating the onset of overfitting.
Computationally, the algorithm is highly efficient. It successfully traces the exact solution path taking fewer than 20 iterations to find the next breakpoint (using $\theta=0.95$ and $\epsilon=10^{-6}$). The computational complexity per iteration is kept low at $\mathcal{O}(n^2 + m^3)$, where $m$ (the number of margin points) is typically much smaller than the total number of points $n$.
Limitations and Future Work
The computational cost and the number of breakpoints in the kernel path still depend heavily on the chosen regularization parameter $\lambda$. A poorly chosen $\lambda$ can lead to an excessive number of support vectors, slowing down the matrix inversions required at each step.
Future work aims to integrate this kernel path algorithm with existing regularization path algorithms. The ultimate goal is a unified approach capable of tracing solution paths across a two-dimensional hyperparameter space ($\gamma$ and $\lambda$ simultaneously), rather than holding one fixed while varying the other.
Summary updated