NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Unified Analysis of Random Fourier Features

Zhu Li, Jean-Francois Ton, Dino Oglic, Dino SejdinovicarXiv 2018

Introduction

Kernel methods, such as Support Vector Machines (SVMs) and Kernel Ridge Regression (KRR), are cornerstones of non-linear modeling in machine learning. By mapping data into high-dimensional feature spaces, they allow for the capture of complex relationships that linear models miss. However, these methods face a significant scalability hurdle: they typically require $O(n^2)$ storage and $O(n^3)$ computation time relative to the number of observations $n$.

Random Fourier Features (RFF) were introduced to circumvent this "big data" problem by approximating the kernel with a low-dimensional explicit feature map. While RFF has seen immense empirical success, its theoretical foundations remained somewhat pessimistic. Early analysis suggested that to maintain optimal accuracy, one might need a number of features proportional to $n$, which effectively negates the computational advantages of the approximation. This paper provides a unified analysis that bridges this gap, demonstrating that far fewer features are required than previously thought.

The Theoretical Gap and Unified Framework

The primary contribution of this work is a unified theoretical framework that applies to both squared error loss (used in KRR) and Lipschitz continuous loss functions (common in SVMs and Logistic Regression). Historically, these tasks were analyzed separately, leading to fragmented understanding.

The authors identify that the "pessimism" in earlier bounds stemmed from a failure to account for the fine structure of the kernel relative to the data distribution. To address this, they utilize the concept of Effective Dimension ($d_\lambda^K$). Unlike raw sample size, the effective dimension captures the intrinsic complexity of the learning task under a specific regularization parameter $\lambda$. For kernels with fast-decaying eigenvalues, such as the Gaussian kernel, the effective dimension is often much smaller than $n$.

Leverage Weighted Sampling

A key innovation presented is the move away from data-independent sampling. Standard RFF typically samples features from the "spectral measure" of the kernel, ignoring the actual distribution of the dataset. The authors propose Leverage Weighted RFF, which utilizes ridge leverage scores to identify the most informative features for a specific dataset.

Because exact leverage scores are computationally expensive to calculate—costing as much as the original kernel method—the authors developed a two-stage Approximate Leverage Sampler (Algorithm 1). The process involves:

  1. Sampling an initial pool of features from the standard spectral measure.
  2. Sub-sampling from this pool using approximate leverage scores.

This approach reduces the computational cost to $O(ns^2)$, where $s \ll n$, providing the statistical benefits of data-dependent sampling without the $O(n^3)$ overhead.

Key Insights and Theoretical Bounds

The paper establishes sharper convergence bounds that align more closely with empirical observations:

  • Plain RFF: The authors prove that $O(\sqrt{n} \log d_\lambda^K)$ features are sufficient for optimal convergence in regression tasks, a significant improvement over the $O(n)$ bounds found in prior literature.
  • Leverage Weighted RFF: By using data-dependent sampling, the requirement drops further to $O(d_\lambda^K)$ features. This suggests that for many practical problems, optimal results can be achieved with a number of features that scales with the complexity of the task rather than the size of the dataset.
  • Unified Risk Bounds: The trade-off between computational cost (number of features) and statistical risk is expressed as a clean function of the regularization parameter $\lambda$, providing a theoretical roadmap for hyperparameter selection.

Empirical Validation

The theoretical findings were validated across several benchmark datasets, including CPU and KINEMATICS for regression, and COD-RNA and COVTYPE for classification. In all instances, the leverage-weighted RFF consistently outperformed standard RFF. For a fixed number of features, the data-dependent approach achieved lower error and higher accuracy, demonstrating that "looking" at the data to pick Fourier components is a superior strategy for approximation.

Conclusion and Future Directions

This research provides a much-needed theoretical justification for the efficiency of Random Fourier Features. By introducing leverage score sampling and the effective dimension framework, the authors show that kernel methods can indeed be scaled to large datasets without sacrificing statistical optimality.

Future work remains in comparing these leverage-weighted RFF methods against Nyström methods, which also utilize data-dependent features. Additionally, while the framework is unified, a small gap remains in the convergence rates between Lipschitz losses and squared error losses, suggesting further refinements in optimization theory for non-smooth loss functions may be possible.

Summary updated

BibTeX
@misc{li2018unified,
  author = {Zhu Li and Jean-Francois Ton and Dino Oglic and Dino Sejdinovic},
  title = {{A Unified Analysis of Random Fourier Features}},
  year = {2018},
  eprint = {1806.09178},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.09178},
}
Figure