Random Fourier Features for Kernel Ridge Regression: Approximation Bounds and Statistical Guarantees

Haim Avron, Michael Kapralov, Cameron Musco, Christopher Musco, Ameya Velingker, Amir Zandieh

Introduction

Kernel Ridge Regression (KRR) is a gold standard for non-parametric modeling, but it suffers from a massive "big data" bottleneck: it requires $O(n^3)$ time and $O(n^2)$ memory for $n$ data points. To circumvent this, researchers frequently use Random Fourier Features (RFF) to map data into a low-dimensional space where linear regression can efficiently approximate the kernel.

Despite its empirical success, a persistent theoretical gap has remained. Original RFF analyses focused on how well the kernel function is approximated at individual points. However, in practice, the primary concern is the final model's statistical performance. Until this paper, there were no tight bounds linking the number of random features ($s$) to the statistical "risk" (error) of the regression. This work provides the first rigorous theoretical bridge between RFF and the statistical performance of KRR, revealing that while classical RFF is powerful, it can be surprisingly inefficient. To address this, the authors propose a novel sampling strategy that significantly reduces the required features for the Gaussian kernel.

Methodology: Spectral Bounds and Leverage Functions

The authors shift the analytical perspective from point-wise approximation to spectral matrix approximation. The goal is to determine the number of features $s$ required so that the approximate kernel matrix $\tilde{K}$ is "spectrally close" to the true matrix $K$, relative to the regularization parameter $\lambda$.

Key technical innovations include:

  • Ridge Leverage Functions: A continuous generalization of "leverage scores" from linear algebra. These functions identify which Fourier frequencies are most critical for representing a specific dataset.
  • Primal-Dual Characterization: The authors develop new optimization-based methods to bound these leverage functions, allowing them to prove both upper and lower bounds on model performance.

Theoretical Constructions and Lower Bounds

Because this is a theoretical paper, it relies on constructed synthetic datasets rather than standard empirical benchmarks (like ImageNet) to prove its bounds. Specifically, the authors design datasets on a bounded line $[-R, R]$ to establish rigorous lower bounds.

Frequency and spatial domain representations of the test functions used to establish theoretical lower bounds.

Through this bounded domain analysis, the authors demonstrate how the "spread" (radius $R$) of the data directly impacts the number of features required. They show that for certain arrangements of points, classical RFF performs poorly, requiring nearly as many features as there are data points.

Key Insights: The Efficiency Gap and Modified Sampling

  • Spectral Bounds are the Right Metric: The paper proves that achieving a spectral approximation of the kernel matrix automatically provides guarantees on both the statistical risk and the effectiveness of using the approximation as a "preconditioner" to accelerate optimization.
  • The Efficiency Gap: A critical discovery is the gap between classical RFF and leverage-score sampling. Classical RFF samples based entirely on the kernel's shape, ignoring the actual data distribution. This leads to highly sub-optimal performance on bounded datasets.
  • The "Capping" Trick: For Gaussian kernels, the most important frequencies for a bounded dataset are often the low ones. The authors introduce a modified sampling distribution that "caps" the probability at low frequencies (using a uniform distribution) while retaining the standard Gaussian distribution for high frequencies. This effectively captures the "leverage" of the data much more efficiently.
  • Statistical Dimension: Ultimately, the number of features needed is tied to the "statistical dimension" (the effective degrees of freedom) of the kernel matrix, rather than just the raw number of data points.

Main Results

The theoretical analysis yields three major results:

  1. Upper Bound for Classical RFF: The authors show that $s = O(\frac{n}{\lambda} \log(s_\lambda(K)))$ features are sufficient for a good approximation.
  2. Lower Bound (The "Bad News"): They prove that for the Gaussian kernel, there exist datasets where classical RFF requires $s = \Omega(n/\lambda)$ features to be accurate. If the regularization $\lambda$ is small, classical RFF might not provide meaningful computational savings.
  3. Modified RFF (The "Good News"): The proposed modified sampling strategy for 1D Gaussian kernels requires only $s = O(R \sqrt{\log(n/\lambda)} + \log^2(n/\lambda))$ features. Compared to the $n/\lambda$ requirement of the classical approach, this is a massive improvement when the data is bounded (small $R$).

Limitations and Future Work

While the theoretical guarantees are strong, several challenges remain:

  • The Curse of Dimensionality: The improved sampling bounds currently scale exponentially with the data dimension $d$. Avoiding this "exponential blowup" for high-dimensional datasets is a major open challenge.
  • Computational Complexity: While the authors found a "proxy" distribution for the Gaussian kernel, calculating the exact ridge leverage function for arbitrary kernels remains computationally expensive, limiting the modified approach to specific kernels.
  • Fixed Design Assumption: The current analysis assumes the input points are fixed (fixed-design regression). Extending these spectral bounds to a "random-design" setting, where data is sampled from a broader distribution, is a logical next step for future research.

Summary updated

BibTeX
@inproceedings{avron2017random,
  author = {Haim Avron and Michael Kapralov and Cameron Musco and Christopher Musco and Ameya Velingker and Amir Zandieh},
  title = {{Random Fourier Features for Kernel Ridge Regression: Approximation Bounds and Statistical Guarantees}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
  url = {https://openreview.net/forum?id=rk-GEsbubH},
}
Figure