Efficient online learning with kernels for adversarial large scale problems

Rémi Jézéquel, Pierre Gaillard, Alessandro Rudi

Kernel methods are the "Swiss Army knives" of non-parametric machine learning, capable of capturing complex, non-linear patterns. However, they have a notorious reputation for being computationally expensive, often scaling quadratically or cubically with the number of data points. In an online setting—where data arrives in a continuous stream and might even be adversarial—this scaling issue becomes a dealbreaker.

In this NeurIPS 2019 paper, Jézéquel, Gaillard, and Rudi introduce PKAWV (Projected Kernel Azoury-Warmuth-Vovk), an algorithm that achieves optimal theoretical regret while significantly slashing computational costs for large-scale online learning.

The Challenge of Online Kernel Learning

In online learning, a learner makes sequential predictions and aims to minimize regret: the difference between their cumulative loss and the loss of the best fixed function in hindsight.

Standard kernel-based online algorithms, such as Kernel Ridge Regression, face two major hurdles:

  1. Computational Complexity: They typically require $O(n^2)$ space and $O(n^2)$ or $O(n^3)$ time, making them unusable for datasets with millions of points.
  2. Adversarial Data: Most efficient approximations assume data is "well-behaved" (i.i.d.). In the real world, data can be adversarial or non-stationary, which breaks many existing fast approximations.

The core challenge addressed by this paper is building an algorithm that is both computationally efficient and theoretically optimal for arbitrary, large-scale, and potentially adversarial data streams.

The PKAWV Approach: Power Through Projections

The authors propose PKAWV, a variant of the Azoury-Warmuth-Vovk forecaster that uses projections to keep the problem size manageable. Instead of working with the full, ever-growing Reproducing Kernel Hilbert Space (RKHS), they project the problem onto a smaller linear subspace $\mathcal{H}_t$.

They offer two distinct ways to build this subspace:

  1. Taylor Expansion (for Gaussian Kernels): For the popular Gaussian kernel, they use a deterministic basis of functions derived from Taylor expansions. This basis is chosen before seeing any data. For $d$-dimensional inputs, they show that a basis of size $O((\log n)^d)$ is sufficient to achieve near-optimal regret. This is particularly powerful for "low-dimensional but high-volume" data.
  2. Nyström Projection (for General Kernels): For kernels where a Taylor basis isn't suitable, they use a data-adaptive approach. They sequentially update a "dictionary" of representative data points (Nyström points) using approximate leverage scores. This allows the subspace to grow and adapt to the complexity of the incoming data stream.

Theoretical Dominance and Efficiency

A key insight of the paper is that optimal regret is possible with projections. You don't need the full kernel dimensionality to be optimal. If the "effective dimension" of the kernel is small, a well-chosen projection captures almost all the necessary information.

Theoretical regret bounds

PKAWV is the first algorithm to recover the optimal regret bound with a per-round complexity significantly lower than $O(n^2)$. In comparisons with competitors like Sketched-KONS and Pros-N-KONS, PKAWV demonstrates a much better trade-off, maintaining lower regret as the dictionary size (and thus computational budget) increases.

Empirical Results on Large-Scale Data

The researchers evaluated their methods on four large-scale datasets from the UCI machine learning repository, including SUSY (6 million points), cod-rna, ijcnn1, and casp.

Empirical performance on cod-rna and ijcnn1

The empirical results validate the theoretical claims:

  • State-of-the-Art Speed: On the massive SUSY dataset, PKAWV with a Taylor basis reached the same classification error as specialized batch methods in just 10 minutes on a standard desktop computer.
  • Breaking the $O(n^2)$ Barrier: By using Nyström sampling with leverage scores or Taylor expansions, the algorithm adapts its complexity to the "intrinsic" difficulty of the data rather than the raw number of samples, maintaining low average loss while keeping execution time manageable compared to standard KRR.

Limitations and Future Work

While highly effective, the approach has limitations:

  • The Curse of Dimensionality: The Taylor expansion method's complexity grows exponentially with the input dimension $d$ ($O((\log n)^{2d})$). While great for $d < 10$ or $20$, it becomes impractical for very high-dimensional features like raw images.
  • Hyperparameter Tuning: The algorithm relies on a regularization parameter $\lambda$. While the authors suggest using "expert advice" grids to tune this online, it adds another layer of implementation complexity.
  • Gap in Nyström Analysis: There is a slight theoretical gap between the case where feature vectors are known beforehand versus when they are revealed sequentially, which remains an open question for future research.

Summary updated

BibTeX
@inproceedings{jezequel2019efficient,
  author = {Rémi Jézéquel and Pierre Gaillard and Alessandro Rudi},
  title = {{Efficient online learning with kernels for adversarial large scale problems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=x_DurUzS_u},
}
Figure