Numerical Methods for Kernel Slicing

Nicolaj Rux, Johannes Hertrich, Sebastian NeumayerarXiv 2025 · DOI

Introduction

Evaluating kernel sums of the form $s_m = \sum_{n=1}^N F(\|x_n - y_m\|)w_n$ is a fundamental operation in machine learning, appearing in Support Vector Machines (SVMs), density estimation, and the self-attention mechanisms of Transformer models. However, the $O(NMd)$ complexity of brute-force evaluation makes it a significant bottleneck for large datasets in high dimensions. While Fast Multipole Methods (FMM) and Fast Fourier Summation offer $O(N+M)$ complexity, they typically suffer from the curse of dimensionality, becoming computationally prohibitive for $d > 4$.

The Slicing Approach

Kernel slicing provides a path forward by reducing high-dimensional kernel evaluations to a series of 1D problems. By projecting data onto 1D subspaces, one seeks a 1D function $f$ such that the high-dimensional kernel $F$ can be approximated. Historically, finding $f$ required complex analytic derivations that were often numerically unstable or impossible for many common kernels.

Behavior of the slicing density $\varrho_d(t)$ and normalization constant $c_d$ across different dimensions $d$. As $d$ increases, the density becomes highly concentrated near the origin, illustrating the geometric shifts that the slicing operator must account for.

Methodology: Slicing as an Inverse Problem

The core innovation of this work is treating the relationship between the high-dimensional kernel $F$ and the 1D sliced function $f$ as an inverse problem defined by a "Slicing Operator" $S_d$. The authors formalize this operator as a generalized Riemann-Liouville fractional integral and propose two numerical algorithms to solve for $f$:

  1. Spatial Domain Approximation: This method discretizes the slicing integral using Gauss-Legendre quadrature and solves a regularized least-squares problem to find the coefficients of a cosine series that approximates $f$.
  2. Frequency Domain Approximation: This approach shifts the problem into the frequency domain of the cosine transform, representing the slicing operator as a matrix and solving for coefficients directly.

To ensure stability against the ill-conditioned nature of the slicing operator—where small input errors can lead to large output variances—the authors employ Tikhonov regularization. This ensures the resulting numerical solution for $f$ is smooth and the slicing error remains bounded.

Key Results and Performance

The proposed methods achieve a total complexity of $O(P(N + M + K \log K))$, where $P$ is the number of slicing directions. This linear scaling allows for massive speedups in high dimensions without the exponential growth associated with traditional fast summation methods.

  • Computational Efficiency: In experiments with $N=M=50,000$ samples in $d=1000$ dimensions, the slicing method provided a 50x speedup over highly optimized GPU brute-force libraries like PyKeOps.
  • Low Overhead: The numerical overhead of solving the inverse problem is minimal. The fast summation method becomes more efficient than brute-force evaluation at approximately $N=3000$ samples, making it relevant for both medium and large-scale datasets.
  • Broad Applicability: The numerical recovery of $f$ proved successful even for kernels where analytic forms are unknown, such as the "Bump" or "Multi-Quadric" kernels, maintaining relative $L^2$ errors as low as $10^{-3}$ to $10^{-4}$.

Conclusion

By reframing kernel slicing as a regularized inverse problem, this work provides a robust numerical framework for high-dimensional kernel evaluation. The transition from fragile analytic derivations to stable numerical approximations enables fast, linear-complexity computations even in dimensions as high as $d=1000$, effectively breaking the curse of dimensionality for a broad class of machine learning applications.

Summary updated

BibTeX
@misc{rux2025numerical,
  author = {Nicolaj Rux and Johannes Hertrich and Sebastian Neumayer},
  title = {{Numerical Methods for Kernel Slicing}},
  year = {2025},
  eprint = {2510.11478},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.11478},
}
Figure