stat.COAug 29, 2026

Signed random Fourier features for fast density estimation with indefinite kernels

Authors: Xie Wang, Nicolas Langrené, Wen Chen

Organizations: Mathematical Institute, University of Oxford, Oxford, OX2 6GG, UK · Guangdong Provincial/Zhuhai Key Laboratory of Interdisciplinary Research and Application for Data Science, Beijing Normal-Hong Kong Baptist University, Zhuhai 519087, China.

Abstract

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.

Figures & tables

Explore similar work

CardsList
  1. Random Fourier Features in Near-Linear Time

    Oct 10, 2026Sepideh Mahabadi, Sandeep Silwal, Tal WagnerRandom Feature MethodsFourier Feature Embeddings

  2. On the Optimality of Random Features under General Conditions: Misspecified Cases and Robust Learning

    Oct 13, 2026Caixing WangRandom Feature MethodsKernel Ridge Regression