Fast Gauss Sums via Flash Attention
Not on the map. Why?
Abstract (arXiv)
Gaussian kernel sums are the computational core of maximum mean discrepancies (MMDs), kernel gradient flows, Stein variational gradient descent (SVGD), and many other kernel methods. At the same time, softmax attention has received an extraordinary amount of hardware-aware code engineering, culminating in flash attention. We show that Gauss kernel sums with arbitrary, signed weights can be evaluated via flash attention: two small input augmentations turn the normalized softmax reduction into the unnormalized Gauss sum, without writing a single line of custom GPU code. For feature dimension D>8 in fp16, this approach beats compiled PyTorch code as well as PyKeOps kernels (often significantly) in speed, memory-overhead and accuracy. Indeed, its memory scaling remains linear.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 8 of its 13 references that are in the map. First posted on arXiv 4 Sep 2026.
Builds on
8 of 13 references.
References · 8
- 2017Attention Is All You Needcited by 60,361
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2016Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithmcited by 507
- 2019Maximum Mean Discrepancy Gradient Flowcited by 127
- 2020Kernel Operations on the GPU, with Autodiff, without Memory Overflowscited by 104
- 2023Generative Sliced MMD Flows with Riesz Kernelscited by 37
- 2024Fast Kernel Summation in High Dimensions via Slicing and Fourier Transformscited by 8
Built on by
Not cited yet.