Locality Sensitive Hashing for p-Exponential Kernels with Applications to Density Estimation

Barak Gorodissky, Tal WagnerNeurIPS 2026

TL;DR

To scale kernel methods to high dimensions without melting your GPUs, we rely on random hash functions where the probability of two points colliding exactly equals their kernel similarity. For decades, we only knew how to do this for the $p=1$ (Laplacian) exponential kernel, leaving even the natural Euclidean case ($p=2$) an open problem. By trading rigid grids for random geometric "mosaics" sliced by hyperplanes, the authors unlock exact Locality Sensitive Hashing for all $p$-exponential kernels with $1 < p \le 2$, immediately enabling faster and privacy-preserving density estimation.

What Problem Does This Paper Address?

Kernel methods measure similarity between data points, which is fundamental for tasks like Kernel Density Estimation (KDE) and attention mechanisms in LLMs. In high dimensions, computing these similarities across massive datasets is brutally slow.

Enter Kernel Locality Sensitive Hashing (LSH). Unlike standard metric LSH (which just groups nearby points for approximate nearest-neighbor search), a kernel is "LSHable" if you can design a random hash family $\mathcal{H}$ where the exact collision probability equals the kernel value: $\Pr[h(x) = h(y)] = k(x,y)$.

Despite how useful this property is, the list of known LSHable kernels over $\mathbb{R}^d$ has been frustratingly short. For $p$-exponential kernels, $k(x,y) = \exp(-\|x-y\|_p / \sigma)$, exact LSH schemes were only known for $p=1$ (using randomly shifted axis-aligned grids). Even the standard Euclidean distance in the exponent ($p=2$—note the norm isn't squared like in a Gaussian kernel, which has no LSH scheme) required lossy approximations and extra distortion parameters. Could we build an exact LSH scheme for $1 < p \le 2$?

Methods

Standard axis-aligned grids work great for $\ell_1$ geometry, but they don't respect $\ell_p$ norms for $p > 1$. Instead of grids, the authors slice up space using a Poisson Hyperplane Process (PHP), creating polygonal partitions called mosaics. Each mosaic cell acts as a hash bin; hashing a point $x$ simply means writing down a bitstring of whether $x$ lies above or below each hyperplane.

Figure 1: Samples from the mosaic LSH in two dimensions for various values of p.

Here is how they make this computationally possible:

  • Connecting collisions to Poisson avoidance: Two points $x$ and $y$ collide in the same mosaic cell if zero hyperplanes slice the line segment between them. By sampling hyperplane normal vectors from $p$-stable distributions (a mathematical generalization of Gaussians), the expected number of hyperplanes crossing that segment becomes $\|x-y\|_p / \sigma$. Because a Poisson variable hits zero with probability $\exp(-\lambda)$, the avoidance probability is $\exp(-\|x-y\|_p / \sigma)$—matching our target kernel!
  • Restricting to a bounded box: You can't simulate a PHP across all of infinite $\mathbb{R}^d$ because you'd need infinitely many hyperplanes. Restricting the process to a bounded hypercube $[-1, 1]^d$ makes the hyperplane count finite ($\text{Poisson}(2d/\sigma)$), but naively truncating shifts skews the math.
  • Sampling $\ell_1$-biased $p$-stable vectors: The authors prove that to keep the exact collision probability inside the box, hyperplane normals must be sampled from an $\ell_1$-biased $p$-stable distribution (proportional to $\|z\|_1 \mathcal{D}_p^{\otimes d}(z)$). Because the $\ell_1$ norm is additive, they reduce this high-dimensional headache to a neat trick: pick one random coordinate to sample from a scalar "magnitude-biased" distribution, and sample the remaining $d-1$ coordinates from standard $p$-stable distributions. For $p=2$, that special coordinate is just a closed-form two-sided Rayleigh sample; for $1 < p < 2$, they design a fast $O(1)$ rejection sampler.

Datasets

To validate their algorithms on downstream KDE tasks, the authors evaluate on two standard high-dimensional benchmark datasets used in prior LSH literature (no new benchmarks are introduced):

  • Covertype
  • U.S. Census

Key Insights and Ideas

  • Why naive truncation fails: A big "aha" moment is realizing you cannot just sample random hyperplane directions and restrict their offsets to intersect your bounding box. Larger $\ell_1$-norm directions sweep a wider range of valid offsets across a hypercube, meaning the marginal distribution inside the box naturally biases toward $\ell_1$-heavy normals. Accounting for this bias is what preserves exactness.
  • Coordinate-wise decomposition: Sampling from a joint multivariate distribution weighted by $\|z\|_1$ sounds nasty, until you realize $\|z\|_1 = \sum |z_i|$ lets you treat the density as a uniform mixture—meaning you only ever have to bias one randomly chosen coordinate per vector.
  • Why $p=1$ breaks this method: Ironically, this new mosaic framework works for all $p \in (1, 2]$, yet fails at $p=1$ (where grids work!). That's because the $1$-stable (Cauchy) distribution has no finite first absolute moment, causing the hyperplane intensity calculations to blow up.

Key Results

  • Exact LSH Complexity: For any $p \in (1, 2]$ on $[-1, 1]^d$ with bandwidth $\sigma$, both sampling a hash function and evaluating it on a point take expected $O(d^2/\sigma)$ time.
  • Differentially Private KDE: Plugging mosaic LSH into existing privacy frameworks yields the first explicit $\epsilon$-differentially private KDE mechanisms in the function-release model for $p \in (1, 2)$, achieving additive error $\alpha$ in $O(d^2 \log(1/\eta)/(\alpha^2 \sigma))$ query time. For $p=2$, empirical error decay matches approximate Johnson–Lindenstrauss baselines without needing an embedding step.
  • Relative-Error KDE: Combining mosaic LSH with Hashing-Based Estimators (HBE) yields a practical data structure requiring only $O(1/\varepsilon^2 \sqrt{\mu})$ samples to estimate small densities ($\ge \mu$) within $(1 \pm \varepsilon)$ relative error—dramatically outperforming uniform random sampling per kernel operation on Covertype and Census.

Limitations and Future Work

The authors highlight two main trade-offs compared to classic $p=1$ grid LSH:

  1. Bounded domains: Points must live inside a bounded region (running time scales linearly with the bounding hypercube's side length), whereas $p=1$ grids work over all of $\mathbb{R}^d$.
  2. Quadratic dimension scaling: Sampling and evaluation take $O(d^2)$ time (expected $O(d)$ hyperplanes, each taking $O(d)$ inner-product time), compared to $O(d)$ for axis-aligned grids.

Whether you can shave off that extra factor of $d$ or lift the bounded-region requirement—especially for the flagship Euclidean case $p=2$—remains a wide-open question.

Summary updated

Abstract

A kernel $k(x,y)$ is *LSHable* if there exists a locality sensitive hashing scheme $\mathcal H$ such that $k(x,y)=\Pr_{h\sim\mathcal H}[h(x)=h(y)]$ for all $x,y$. This notion plays a key role in efficient kernel methods in high dimensions. In this work, we show that the $p$-exponential kernel $k(x,y)=\exp(-\lVert x-y \rVert_p)$ is LSHable in bounded regions for all $1<p\leq2$. Previously, this was known only for $p=1$. Our new mosaic LSH scheme is based on a Poisson hyperplane process with hyperplanes sampled as $\ell_1$-biased $p$-stable vectors, for which we develop efficient sampling procedures. As applications, our results yield new and efficient density estimation methods based on LSHability for those $p$-exponential kernels.
BibTeX
@inproceedings{gorodissky2026locality,
  author = {Barak Gorodissky and Tal Wagner},
  title = {{Locality Sensitive Hashing for p-Exponential Kernels with Applications to Density Estimation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=RyF0cieapR},
}
Figure