cs.LGOct 10, 2026

Random Fourier Features in Near-Linear Time

Authors: Sepideh Mahabadi, Sandeep Silwal, Tal Wagner

Organizations: Microsoft Research – Redmond · University of Wisconsin-Madison · Tel Aviv University

Abstract

Random Fourier features approximate a shift-invariant kernel in Rd\mathbb{R}^d, such as the Gaussian kernel exp⁡(−12∥x−y∥22)\exp(-\tfrac12\|x-y\|_2^2), using independent samples from its spectral measure to construct an unbiased estimator for the kernel value with subgaussian concentration. However, generating mm such features requires O(md)O(md) time. A long line of work on structured random features has accelerated this computation for the Gaussian kernel and other radial kernels, albeit with weaker concentration guarantees. We close this gap by showing a random feature map that can be computed in near-linear time O((d+m)log⁡d)O((d+m)\log d) and yields near-subgaussian concentration. We obtain it through a new and tighter analysis of the Fastfood feature map of Le, Sarlós and Smola (ICML 2013), using Brascamp-Lieb inequalities and the Schoenberg representation of radial kernels.

Figures & tables

Explore similar work

Jun 8, 2026

Bernstein-Schur Kernels: Random Features by Sketched Modulation and Radial Randomization

Bernstein--Schur kernels are products of a finite-feature kernel and a completely monotone shift-invariant kernel: nonstationary kernels falling between the shift-invariant and dot-product templates random features exploit, so neither Bochner sampling nor polynomial sketching applies to the full kernel directly. We give one random-feature construction for the whole class that randomizes both factors: it sketches the finite modulation and samples the radial factor's one-dimensional Bernstein--Widder scale before applying Gaussian random Fourier features, giving feature dimension DmDm, free of the O(d2)O(d^2) size of the exact modulation feature. With the modulation kept exact (the m→∞m\to\infty limit), we prove unbiasedness, an exact variance, and a matrix-Bernstein operator-norm bound controlled by the top kernel and modulation eigenvalues and an intrinsic dimension rather than the crude Nmax⁡ijN\max_{ij} route. Whitening this argument at the ridge makes the effective dimension deff(λ)d_{\mathrm{eff}}(λ) the exact intrinsic dimension of the matrix variance, so O((1+∥P∥op/λ)log⁡(deff/δ))O((1+\|P\|_{\mathrm{op}}/λ)\log(d_{\mathrm{eff}}/δ)) radial draws preserve the kernel-ridge solution; tilting the draw by a closed-form whitened leverage improves this to the effective-dimension count O((1+deff)log⁡(deff/δ))O((1+d_{\mathrm{eff}})\log(d_{\mathrm{eff}}/δ)). Conditioning on the sketch carries every guarantee to the deployed doubly-randomized estimator up to one additive sketch term, and all hold for the whole class with the modulation Gram in place of the polynomial one. The flagship instance is the biased yatyat-kernel kyat,b(w,x)=(w⊤x+b)2/(∥w−x∥2+ε)k_{yat,b}(w,x)=(w^\top x+b)^2/(\|w-x\|^2+\varepsilon), whose family span contains the inverse-multiquadric kernel by finite differences in bb.
Aug 29, 2026

Signed random Fourier features for fast density estimation with indefinite kernels

Kernel density estimation (KDE) is one of the most fundamental statistical estimators of density functions. Its direct implementation on a dataset of NN points incurs an O(N2)\mathcal{O}(N^{2}) computational cost, which is prohibitive for large-scale datasets. Kernel approximation techniques can be applied to bring the computational cost down to O(N)\mathcal{O}(N). The random Fourier features (RFF) technique, based on sampling from the spectral density of the kernel function, has become popular to speed up kernel estimators for machine learning applications. Unfortunately, it is restricted to positive definite kernels, while the majority of kernel functions popular in KDE, such as the parabolic kernel, do not satisfy this property. To overcome this limitation, this article introduces the signed random Fourier features (SRFF) technique. It is a generalization of RFF compatible with indefinite kernels whose inverse Fourier transform is absolutely integrable. The motivation for introducing this method is to speed up KDE in the case of multivariate compact kernels, which are generally not positive definite. We detail how to implement SRFF for both product kernels and isotropic kernels. For the class of Kuttner-Golubov kernels K(xi,xj)=(1−∥xi−xj∥α)β1{∥xi−xj∥≤1}K(\boldsymbol{x}_{i},\boldsymbol{x}_{j})=(1-\left\Vert \boldsymbol{x}_{i}-\boldsymbol{x}_{j}\right\Vert ^α)^β\mathbf{1}_{\{\left\Vert \boldsymbol{x}_{i}-\boldsymbol{x}_{j}\right\Vert \leq1\}} where xi∈Rd\boldsymbol{x}_{i}\in\mathbb{R}^{d}, xj∈Rd\boldsymbol{x}_{j}\in\mathbb{R}^{d}, α>0α>0, β>0β>0, which includes the triangular, parabolic, biweight, triweight, and other kernel functions of interest for KDE as particular examples, we provide an explicit acceptance-rejection algorithm to sample from its signed spectral density. Our numerical tests on a dataset of one million points confirm the computational efficiency and accuracy of SRFF for large-scale KDE.
Aug 4, 2026

Random features for Grassmannian kernel approximation with bounded rank-one projections

We propose a family of random feature maps for scalable kernel machines on low-dimensional subspaces, ie on the Grassmannian manifold. Such representations are useful when data classes or clusters are well described by the span of a few samples. Classical Grassmannian kernels, including the projection and Binet-Cauchy kernels, require full Gram matrices, which leads to prohibitive computational and memory costs for large high-dimensional subspace datasets. We address this limitation using random features based on rank-one projections of subspace projection matrices followed by bounded non-linear transforms, either periodic or binary, to control the resulting distributions. We show that inner products in the random feature space approximate well-defined rotation-invariant Grassmannian kernels that depend only on the principal angles between subspaces. When the number of features is sufficiently large relative to the intrinsic subspace dimension, the approximation holds uniformly over all fixed-dimensional subspaces with high probability. For periodic transforms, the approximated kernel has a closed-form expression with tunable behaviour between inverse Binet-Cauchy and Gaussian-type regimes. Binary transforms yield compact one-bit subspace features, although no closed-form kernel is known. Structured rank-one projections based on randomised fast Fourier transforms further reduce computation without sacrificing practical accuracy. Experiments on synthetic data and ETH-80 classification tasks show that these features accurately preserve Grassmannian geometry while reducing computation, memory, and storage. Rank-one embeddings therefore provide a practical and scalable alternative to classical Grassmannian kernels.