Sparse Query Attention (SQA): A Computationally Efficient Attention Mechanism with Query Heads Reduction
Not on the map. Why?
Abstract (arXiv)
The Transformer architecture, underpinned by the Multi-Head Attention (MHA) mechanism, has become the de facto standard for state-of-the-art models in artificial intelligence. However, the quadratic computational complexity of MHA with respect to sequence length presents a significant barrier to scaling, particularly for applications involving long contexts. Prevailing solutions, such as Multi-Query Attention (MQA) and Grouped-Query Attention (GQA), have effectively addressed the memory bandwidth bottleneck that dominates autoregressive inference latency by sharing Key and Value projections. While highly successful, these methods do not reduce the fundamental number of floating-point operations (FLOPs) required for the attention score computation, which remains a critical bottleneck for training and full-sequence processing. This paper introduces Sparse Query Attention (SQA), a novel attention architecture that pursues an alternative and complementary optimization path. Instead of reducing Key/Value heads, SQA reduces the number of Query heads. This architectural modification directly decreases the computational complexity of the attention mechanism by a factor proportional to the reduction in query heads, thereby lowering the overall FLOPs. This work presents the theoretical foundation of SQA, its mathematical formulation, and a family of architectural variants. Empirical benchmarks on long sequences (32k-200k tokens) demonstrate that SQA can achieve significant throughput improvements of up to 3x in computation-bound scenarios such as model pre-training, fine-tuning, and encoder-based tasks, with only a minimal impact on model quality in preliminary smallscale experiments. SQA was discovered serendipitously during the development of the upcoming Reactive Transformer architecture, suggesting its potential as a powerful tool for building more efficient and scalable models
Key facts. Cited by 1 paper in the map (data through 13 Oct 2026). Builds on 21 of its 27 references that are in the map. First posted on arXiv 2 Oct 2025.
Builds on
21 of 27 references.
References · 21
- 2017Attention Is All You Needcited by 60,106
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
- 2020Language Models are Few-Shot Learnerscited by 32,320
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,549
- 2025Qwen3 Technical Reportcited by 8,510
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,247
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,658
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,637
- 2020Longformer: The Long-Document Transformercited by 3,393
- 2016Pointer Sentinel Mixture Modelscited by 3,047
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,570
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,323
9 more
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 908
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 603
- 2022Efficiently Scaling Transformer Inferencecited by 532
- 2023TinyStories: How Small Can Language Models Be and Still Speak Coherent English?cited by 436
- 2024The Illusion of State in State-Space Modelscited by 183
- 2025A Comprehensive Survey of Mixture-of-Experts: Algorithms, Theory, and Applicationscited by 91
- 2020Low-Rank Bottleneck in Multi-head Attention Modelscited by 88
- 2024HMT: Hierarchical Memory Transformer for Efficient Long Context Language Processingcited by 20
- 2025Advancing Intelligent Sequence Modeling: Evolution, Trade-offs, and Applications of State-Space Architectures from S4 to Mambacited by 9
Built on by
Citing papers per year: 2025: 1.
1 paper.