Breaking the Curse of Dimensionality with Random Features
Authors: Francis R. Bach
Published: 2017
Venue: arXiv
Link: arXiv
Summary
This paper analyzes when random feature approximations can achieve optimal learning rates, "breaking" the curse of dimensionality. It shows that for certain kernel-target combinations, random features achieve minimax optimal rates independent of the ambient dimension.
Key Contributions
1. Optimal Rates for Random Features
Under appropriate smoothness conditions, random features achieve:
This rate is independent of input dimension !
2. Sufficient Conditions
Optimal rates are achieved when:
- Target function is in the RKHS:
- Kernel has sufficient spectral decay
- Number of features
3. Comparison with Kernel Ridge Regression
| Method | Rate | Computation |
|---|---|---|
| Full KRR | ||
| Random Features |
Random features achieve rate with (polynomial eigenvalue decay).
Mathematical Framework
Random Feature Map
For shift-invariant kernel with spectral density :
where .
Approximation Kernel
By law of large numbers:
Random Feature Ridge Regression
Closed form:
Theoretical Analysis
Error Decomposition
Approximation Error
For with :
Estimation Error
With features:
Optimal Parameter Choice
Setting and :
Beyond Basic Random Features
1. Data-Dependent Features
Sample frequencies from empirical distribution:
2. Orthogonal Random Features
Use structured orthogonal matrices:
where is Hadamard, is scaling, is random sign.
3. Quadrature Features
Use deterministic quadrature rules for integration:
Algorithm
import numpy as np
def random_fourier_features_regression(X, y, D, gamma, lambda_reg):
"""
Random Fourier Features with ridge regression.
Parameters:
-----------
X : training data (n, d)
y : labels (n,)
D : number of random features
gamma : RBF kernel parameter
lambda_reg : regularization
Returns:
--------
omega, b, w : feature parameters and weights
"""
n, d = X.shape
# Sample random features (for RBF kernel)
omega = np.random.randn(d, D) * np.sqrt(2 * gamma)
b = np.random.uniform(0, 2 * np.pi, D)
# Compute feature matrix
Z = np.sqrt(2.0 / D) * np.cos(X @ omega + b)
# Ridge regression
w = np.linalg.solve(Z.T @ Z + n * lambda_reg * np.eye(D), Z.T @ y)
return omega, b, w
def predict_rff(X_test, omega, b, w):
"""Predict with RFF model."""
D = len(w)
Z_test = np.sqrt(2.0 / D) * np.cos(X_test @ omega + b)
return Z_test @ w
Dimension-Independence
When does it hold?
- Smooth kernels: RBF, Matérn with sufficient smoothness
- Smooth targets:
- Low intrinsic dimension: Data on low-dimensional manifold
When does it fail?
- Non-smooth kernels: Laplacian, polynomial
- Hard targets: not in RKHS
- High-frequency components: Oscillatory targets
Impact on Machine Learning
This paper:
- Theoretical foundation: Justified random features for large-scale learning
- Practical guidance: Guidelines for choosing
- Connection: Linked random features to classical approximation theory
- Scalability: Enabled kernel-quality predictions at linear cost
Citation
@article{bach2017breaking,
title={On the equivalence between kernel quadrature rules and random feature expansions},
author={Bach, Francis},
journal={Journal of Machine Learning Research},
volume={18},
number={21},
pages={1--38},
year={2017}
}
Further Reading
- Rahimi, A. & Recht, B. (2007). Random features for large-scale kernel machines
- Rudi, A. & Rosasco, L. (2017). Generalization properties of learning with random features
- Li, Z., et al. (2019). Towards a unified analysis of random Fourier features