Kernel Conjugate Gradient for Fast Kernel Machines

Nathan D. Ratliff, J. Andrew BagnellIJCAI 2007

Abstract: We propose a novel variant of the conjugate gradient algorithm, Kernel Conjugate Gradient (KCG), designed to speed up learning for kernel machines with differentiable loss functions. This approach leads to a better conditioned optimization problem during learning. We establish an upper bound on the number of iterations for KCG that indicates it should require less than the square root of the number of iterations that standard conjugate gradient requires. In practice, for various differentiable kernel learning problems, we find KCG consistently, and significantly, outperforms existing techniques. The algorithm is simple to implement, requires no more computation per iteration than standard approaches, and is well motivated by Reproducing Kernel Hilbert Space (RKHS) theory. We further show that data-structure techniques recently used to speed up kernel machine approaches are well matched to the algorithm by reducing the dominant costs of training: function evaluation and RKHS inner product computation.

Introduction

Kernel methods are highly regarded in machine learning for their theoretical elegance and robust performance on non-linear problems. However, they carry a significant "computational tax" that often makes them impractical for large-scale datasets. Standard approaches, such as Gaussian Processes (GPs), typically require inverting an $n \times n$ matrix, a process that scales at $O(n^3)$.

While iterative solvers like standard Conjugate Gradient (CG) offer a path forward, they frequently struggle with poor conditioning. In optimization terms, the "landscape" of the kernel learning problem is often shaped like a long, narrow valley, causing standard solvers to oscillate inefficiently. This paper introduces Kernel Conjugate Gradient (KCG) to address this fundamental geometry problem.

Methods: The RKHS Perspective

The core innovation of KCG is a shift in the geometric perspective of the optimization problem. Most standard algorithms assume a Euclidean metric, treating parameters as vectors in a flat space. KCG instead performs optimization directly within the "natural" geometry of the Reproducing Kernel Hilbert Space (RKHS).

Implicit Preconditioning

By using the RKHS inner product as its metric, KCG effectively "rounds out" the narrow valleys of the optimization landscape. Mathematically, this is equivalent to preconditioning the problem with the kernel matrix itself. Unlike traditional preconditioning, which is often computationally expensive, this "functional gradient" approach provides the benefits of preconditioning for almost no extra cost per iteration.

Tree-Augmentation for Scalability

To manage the $O(n^2)$ cost associated with kernel evaluations in each iteration, the algorithm integrates KD-trees. These data structures allow KCG to approximate the influence of distant data points, dramatically reducing the computational burden per step as the training set grows.

Iteration time comparison between tree-augmented KCG and a naive implementation as training set size increases.

Key Insights and Theoretical Bounds

The most profound insight of this work is that an optimization algorithm should inherit the metric of the space it operates in. By utilizing the kernel's own inner product, the algorithm gains a deeper "understanding" of the relationships between data points than a generic solver.

This shift leads to a significant theoretical and practical improvement in convergence rates. The authors establish an upper bound showing that KCG requires roughly the square root of the iterations needed by standard Parameter Conjugate Gradient (PCG). For example, where PCG might require 150 iterations to reach a certain loss threshold, KCG can achieve the same result in fewer than 10.

Comparison of iteration counts for KCG vs. standard PCG, demonstrating the significant reduction in steps required for convergence.

Experimental Results

The authors evaluated KCG across a wide variety of benchmarks, including 11 UCI datasets (e.g., Covtype, Spam), the USPS handwritten digit dataset, and large-scale geographic data.

  • Massive Speedups: Across the UCI datasets, KCG achieved an average 54x speedup over standard PCG. In specific instances, the speedup exceeded 100x.
  • Rapid Convergence: KCG consistently reached lower loss values in fewer iterations, closing the gap between the upper and lower optimization bounds much faster than traditional methods.
  • Large-Scale Scalability: By leveraging tree-augmentation, the authors successfully performed Regularized Least Squares (RLS) regression on datasets exceeding 100,000 points, a task that is typically intractable for naive kernel methods.

Conclusion and Future Work

KCG represents a significant step forward in making large-scale kernel learning practical. While the algorithm currently requires differentiable loss functions (making it unsuitable for standard Hinge-Loss SVMs), it is perfectly suited for Kernel Logistic Regression and Gaussian Process regression. Future research may focus on combining KCG with sparse representation techniques to further reduce memory constraints, enabling the processing of even larger datasets.

Summary updated

BibTeX
@inproceedings{ratliff2007kernel,
  author = {Nathan D. Ratliff and J. Andrew Bagnell},
  title = {{Kernel Conjugate Gradient for Fast Kernel Machines}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2007},
  url = {https://openreview.net/forum?id=r1Evo4MuZS},
}
Figure