View a PDF of the paper titled Fast Gauss Sums via Flash Attention, by Nicolaj Rux and 1 other authors
Abstract:Gauss 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 in speed and memory, and PyKeOps kernels in speed and accuracy at comparable or lower memory. Its memory scaling remains linear.
Submission history
From: Nicolaj Rux [view email]
[v1]
Fri, 4 Sep 2026 09:11:45 UTC (106 KB)
[v2]
Thu, 19 Nov 2026 08:39:00 UTC (106 KB)
![[2609.04910] Fast Gauss Sums via Flash Attention [2609.04910] Fast Gauss Sums via Flash Attention](https://techwavedispatch.com/wp-content/uploads/2026/11/260904910-Fast-Gauss-Sums-via-Flash-Attention-1024x597.png)