Data-Aware Random Feature Kernel for Transformers
Not on the map. Why?
Abstract (arXiv)
Transformers excel across domains, yet their quadratic attention complexity poses a barrier to scaling. Random-feature attention, as in Performers, can reduce this cost to linear in the sequence length by approximating the softmax kernel with positive random features drawn from an isotropic distribution. In pretrained models, however, queries and keys are typically anisotropic. This induces high Monte Carlo variance in isotropic sampling schemes unless one retrains the model or uses a large feature budget. Importance sampling can address this by adapting the sampling distribution to the input geometry, but complex data-dependent proposal distributions are often intractable. We show that by data aligning the softmax kernel, we obtain an attention mechanism which can both admit a tractable minimal-variance proposal distribution for importance sampling, and exhibits better training stability. Motivated by this finding, we introduce DARKFormer, a Data-Aware Random-feature Kernel transformer that features a data-aligned kernel geometry. DARKFormer learns the random-projection covariance, efficiently realizing an importance-sampled positive random-feature estimator for its data-aligned kernel. Empirically, DARKFormer narrows the performance gap with exact softmax attention, particularly in finetuning regimes where pretrained representations are anisotropic. By combining random-feature efficiency with data-aware kernels, DARKFormer advances kernel-based attention in resource-constrained settings.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 28 of its 33 references that are in the map. First posted on arXiv 4 Mar 2026.
Builds on
28 of 33 references.
References · 28
- 2017Attention Is All You Needcited by 60,361
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 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
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2025Gemma 3 Technical Reportcited by 1,824
- 2020Reformer: The Efficient Transformercited by 1,668
- 2020Rethinking Attention with Performerscited by 1,601
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
- 2019How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddingscited by 784
16 more
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
- 2021Random Feature Attentioncited by 354
- 2015On the Equivalence between Kernel Quadrature Rules and Random Feature Expansionscited by 138
- 2016Orthogonal Random Featurescited by 91
- 2015On the Error of Random Fourier Featurescited by 76
- 2014Fastfood: Approximate Kernel Expansions in Loglinear Timecited by 74
- 2021Skyformer: Remodel Self-Attention with Gaussian Kernel and Nystr"om Methodcited by 63
- 2024Anisotropy Is Inherent to Self-Attention in Transformerscited by 63
- 2017The Unreasonable Effectiveness of Structured Random Orthogonal Embeddingscited by 45
- 2023PolySketchFormer: Fast Transformers via Sketching Polynomial Kernelscited by 36
- 2023DISTFLASHATTN: Distributed Memory-efficient Attention for Long-context LLMs Trainingcited by 29
- 2023Efficient Attention via Control Variatescited by 23
- 2023FAVOR#: Sharp Attention Kernel Approximations via New Classes of Positive Random Featurescited by 4
- 2017Kernel Approximation Methods for Speech Recognitioncited by 3
- 2024All Random Features Representations are Equivalentcited by 2
Built on by
Not cited yet.