Generalized Kernel Thinning

Raaz Dwivedi, Lester Mackey

Abstract

The kernel thinning (KT) algorithm of Dwivedi and Mackey (2021) compresses a probability distribution more effectively than independent sampling by targeting a reproducing kernel Hilbert space (RKHS) and leveraging a less smooth square-root kernel. Here we provide four improvements. First, we show that KT applied directly to the target RKHS yields tighter, dimension-free guarantees for any kernel, any distribution, and any fixed function in the RKHS. Second, we show that, for analytic kernels like Gaussian, inverse multiquadric, and sinc, target KT admits maximum mean discrepancy (MMD) guarantees comparable to or better than those of square-root KT without making explicit use of a square-root kernel. Third, we prove that KT with a fractional power kernel yields better-than-Monte-Carlo MMD guarantees for non-smooth kernels, like Laplace and Mat'ern, that do not have square-roots. Fourth, we establish that KT applied to a sum of the target and power kernels (a procedure we call KT+) simultaneously inherits the improved MMD guarantees of power KT and the tighter individual function guarantees of target KT. In our experiments with target KT and KT+, we witness significant improvements in integration error even in $100$ dimensions and when compressing challenging differential equation posteriors.

Introduction

In probabilistic inference, complex distributions are often represented by large sets of sample points generated via Markov Chain Monte Carlo (MCMC). However, using these massive datasets for downstream tasks—such as high-fidelity heart simulations in computational cardiology—is computationally prohibitive. The standard practice of "thinning" (keeping every $t$-th point) is inefficient, typically increasing integration error from $O(n^{-1/2})$ to $O(n^{-1/4})$.

Kernel Thinning (KT) was developed to address this by selecting points that minimize discrepancy in a reproducing kernel Hilbert space. While a breakthrough, the original KT algorithm was limited by exponential scaling with dimension and a requirement for kernels to have tractable square roots. This paper introduces Generalized Kernel Thinning to make these methods universal, dimension-free, and more accurate.

Methodology

The generalized framework centers on two algorithmic stages: KT-SPLIT, which uses non-uniform randomness to partition $n$ points into candidate coresets, and KT-SWAP, a refinement step that iteratively swaps points to minimize the Maximum Mean Discrepancy (MMD).

We introduce three primary variants:

  • Target KT: Applies the algorithm directly using the target kernel, providing dimension-free guarantees that remain effective from 2D to 100D.
  • Power KT: Utilizes fractional power kernels ($k_\alpha$) to support non-smooth kernels like Laplace or Matérn.
  • KT+: A hybrid approach applying KT to a sum of target and power kernels, achieving optimal MMD rates alongside tight individual function guarantees.
Coreset visualization and MMD convergence rates across various kernels.

Experimental Evaluation

The researchers evaluated these methods on synthetic benchmarks (Gaussian mixtures) and complex real-world posterior distributions, including the Goodwin model ($d=4$), the Lotka-Volterra model ($d=4$), and the Hinch cardiac calcium signaling model ($d=38$).

Key Results

As illustrated in Figure 4, the MMD error for thinned coresets (size $\sqrt{n}$) decays at a rate near $O(n^{-1/2})$, significantly faster than the $O(n^{-1/4})$ rate expected from random thinning. This performance holds across diverse kernel types, including Gaussian, IMQ, Laplace, and B-spline.

High-Dimensional Performance

A core contribution is the demonstration of dimension-free stability. In experiments ranging from $d=2$ to $d=100$, Target KT consistently outperformed i.i.d. sampling and standard thinning in both MMD and integration error metrics.

Performance metrics across dimensions $d=2$ to $d=100$.

Conclusion

Generalized Kernel Thinning establishes a new standard for distribution compression. By providing dimension-free guarantees and supporting non-smooth kernels, it enables high-quality coresets that drastically reduce the computational burden of downstream simulations without sacrificing accuracy. Future work will explore combining these methods with near-linear time meta-algorithms to further scale the compression process.

Summary updated

BibTeX
@inproceedings{dwivedi2022generalized,
  author = {Raaz Dwivedi and Lester Mackey},
  title = {{Generalized Kernel Thinning}},
  booktitle = {AABI},
  year = {2022},
  url = {https://openreview.net/forum?id=gHV-k7foUaE},
}
Figure