Kernel methods are among the most mathematically elegant tools in machine learning, providing a principled way to model non-linear relationships in everything from Gaussian Processes to Support Vector Machines. However, they suffer from a notorious "Achilles' heel": scalability. Because traditional kernel methods require computing and storing an $N \times N$ kernel matrix, their computational cost explodes cubically ($O(N^3)$) with the number of data points.
To solve this, researchers have moved toward Random Features, a technique that approximates the kernel function $k(x, y)$ by mapping inputs into a lower-dimensional space where a simple inner product does the work: $k(x, y) \approx \phi(x)^\top \phi(y)$. While early methods were restricted to a narrow slice of "shift-invariant" kernels, recent research has generalized this mechanism to handle asymmetric, non-stationary, and high-dimensional structures.
The Core Intuition: From Integrals to Inner Products
The fundamental insight behind random features is that many kernel functions can be represented as an integral (an expectation) over a distribution of simpler functions. If we can sample from that distribution, we can approximate the integral with a finite sum.
For stationary kernels (where the kernel only depends on the difference $x-y$), this is rooted in Bochner’s Theorem. However, as Mingzhen He and Fanghui Liu demonstrate in Random Fourier Features for Asymmetric Kernels, this logic can be extended to asymmetric kernels—useful for directed graphs and conditional probabilities—by using complex measures and Jordan decomposition. By transforming the kernel into a space of random features, we turn a "global" problem involving all pairs of data points into a "local" linear problem.
Speeding Up the Mapping with Structure
Even after reducing a problem to random features, the initial mapping $\phi(x)$ can be expensive if the data is high-dimensional. Standard methods use dense Gaussian matrices, which require $O(D \cdot d)$ time (where $D$ is input dimension and $d$ is the number of features).
To break this bottleneck, Krzysztof Choromanski and Vikas Sindhwani introduced the idea of Recycling Randomness in Recycling Randomness with Structure for Sublinear time Kernel Expansions. Instead of dense matrices, they use structured matrices—like Toeplitz or Circulant matrices—which allow for fast multiplications via the Fast Fourier Transform (FFT). This reduces the computation time from linear to log-linear, enabling kernel methods to run on massive datasets that were previously the sole domain of deep learning. Similarly, Chang Feng proposed Signed Circulant Random Feature mapping (SCRF) to achieve linear storage and log-linear time without sacrificing accuracy.
Beyond Shift-Invariance: Dot-Product and Neural Kernels
A major limitation of early random features was their inability to approximate "dot-product" kernels, such as the Polynomial kernel or the Neural Tangent Kernel (NTK), which are central to understanding deep neural networks.
Insu Han and Amir Zandieh addressed this in Random Gegenbauer Features for Scalable Kernel Methods. By leveraging the orthogonal properties of Gegenbauer polynomials, they developed a feature mapping that provides much tighter spectral guarantees than traditional Taylor-series approximations. This allows researchers to scale up the analysis of deep networks by treating them as kernel machines while maintaining the computational efficiency of random features.
Precision and Compression
As the number of random features $d$ increases, the approximation becomes more accurate, but the memory footprint grows. This has led to two parallel research directions: variance reduction and quantization.
- Variance Reduction: In FAVOR#: Sharp Attention Kernel Approximations via New Classes of Positive Random Features, Valerii Likhosherstov and Krzysztof Marcin Choromanski introduced Dense-Exponential Random Features (DERFs). By using matrix-based parameters instead of scalars, they achieved a variance reduction of up to $e^{10}$, making linear-time Transformers (which use kernels to approximate attention) nearly as accurate as their quadratic-time counterparts.
- Quantization: Ping Li has explored extreme compression of these features. In Quantization Algorithms for Random Fourier Features, Li showed that because the distribution of these features is often predictable, they can be quantized (compressed) by up to 50x with almost no loss in model performance.
Why It Works: The Spectral Perspective
The success of these methods hinges on the "number of effective degrees of freedom" in a dataset. As Alaa Maalouf and colleagues argue in On the Size and Approximation Error of Distilled Sets, most massive datasets contain significant redundancy. Random features work because they act as a spectral filter, capturing the most important dimensions of the kernel's Hilbert space while discarding the noise. By combining this spectral insight with structured matrices and optimized sampling (like the Quasi-Monte Carlo sequences proposed by Jiyan Yang and Haim Avron), the field has moved toward a "one-sketch-for-all" paradigm where a single set of random features can support multiple kernel types and tasks simultaneously.