Fast Transformers with Clustered Attention
Not on the map. Why?
Abstract (arXiv)
Transformers have been proven a successful model for a variety of tasks in sequence modeling. However, computing the attention matrix, which is their key component, has quadratic complexity with respect to the sequence length, thus making them prohibitively expensive for large sequences. To address this, we propose clustered attention, which instead of computing the attention for every query, groups queries into clusters and computes attention just for the centroids. To further improve this approximation, we use the computed clusters to identify the keys with the highest attention per query and compute the exact key/query dot products. This results in a model with linear complexity with respect to the sequence length for a fixed number of clusters. We evaluate our approach on two automatic speech recognition datasets and show that our model consistently outperforms vanilla transformers for a given computational budget. Finally, we demonstrate that our model can approximate arbitrarily complex attention distributions with a minimal number of clusters by approximating a pretrained BERT model on GLUE and SQuAD benchmarks with only 25 clusters and no loss in performance.
Key facts. Cited by 123 papers in the map (data through 7 Oct 2026). First posted on arXiv 9 Jul 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 30; 2022: 24; 2023: 24; 2024: 21; 2025: 10; 2026: 14.
123 papers.
Sort:
By area:
- 2021Transformers in Vision: A Surveycited by 1,009
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2021A Survey of Transformerscited by 399
- 2021FNet: Mixing Tokens with Fourier Transformscited by 343
- 2022Long Range Language Modeling via Gated State Spacescited by 265
- 2022cosFormer: Rethinking Softmax in Attentioncited by 212
- 2023Efficient Large Language Models: A Surveycited by 183
- 2022Separable Self-attention for Mobile Vision Transformerscited by 163
- 2022OnePose: One-Shot Object Pose Estimation without CAD Modelscited by 155
- 2021Learned Token Pruning for Transformerscited by 138
- 2023The emergence of clusters in self-attention dynamicscited by 133
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
38 more
- 2022Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Cloudscited by 102
- 2021Finetuning Pretrained Transformers into RNNscited by 94
- 2021A Practical Survey on Faster and Lighter Transformerscited by 73
- 2022Flowformer: Linearizing Transformers with Conservation Flowscited by 69
- 2021Token Pooling in Vision Transformerscited by 68
- 2023Align and Attend: Multimodal Summarization with Dual Contrastive Lossescited by 65
- 2021Linear algebra with transformerscited by 62
- 2021Memory-efficient Transformers via Top-k Attentioncited by 59
- 2023Training-free Diffusion Model Adaptation for Variable-Sized Text-to-Image Synthesiscited by 55
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
- 2021Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encodingcited by 50
- 2023Revisiting Token Pruning for Object Detection and Instance Segmentationcited by 50
- 2021Efficient Visual Tracking with Exemplar Transformerscited by 48
- 2022Museformer: Transformer with Fine- and Coarse-Grained Attention for Music Generationcited by 48
- 2021On the Expressive Power of Self-Attention Matricescited by 44
- 2021Prototypical Cross-Attention Networks for Multiple Object Tracking and Segmentationcited by 43
- 2023EGformer: Equirectangular Geometry-biased Transformer for 360 Depth Estimationcited by 42
- 2024vid-TLDR: Training Free Token merging for Light-weight Video Transformercited by 41
- 2024Scene Adaptive Sparse Transformer for Event-based Object Detectioncited by 39
- 2021Octree Transformer: Autoregressive 3D Shape Generation on Hierarchically Structured Sequencescited by 38
- 2021Container: Context Aggregation Networkcited by 37
- 2022Visual Attention Methods in Deep Learning: An In-Depth Surveycited by 37
- 2022Efficient Long Sequence Modeling via State Space Augmented Transformercited by 37
- 2021ABC: Attention with Bounded-memory Controlcited by 36
- 2021When Attention Meets Fast Recurrence: Training Language Models with Reduced Computecited by 34
- 2024ThunderKittens: Simple, Fast, and Adorable AI Kernelscited by 34
- 2022Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuningcited by 33
- 2022Linear Complexity Randomized Self-attention Mechanismcited by 31
- 2022Attention Mechanism in Neural Networks: Where it Comes and Where it Goescited by 29
- 2021FMMformer: Efficient and Flexible Transformer via Decomposed Near-field and Far-field Attentioncited by 26
- 2023Transformer-VQ: Linear-Time Transformers via Vector Quantizationcited by 26
- 2023Efficient Attention via Control Variatescited by 23
- 2021Transformer Uncertainty Estimation with Hierarchical Stochastic Attentioncited by 21
- 2022EcoFormer: Energy-Saving Attention with Linear Complexitycited by 21
- 2021RomeBERT: Robust Training of Multi-Exit BERTcited by 19
- 2021LightSeq2: Accelerated Training for Transformer-based Models on GPUscited by 19
- 2023MSViT: Dynamic Mixed-Scale Tokenization for Vision Transformerscited by 19
- 2023With a Little Help from your own Past: Prototypical Memory Networks for Image Captioningcited by 18
50 most cited of 123 All 123 (JSON)
- 2026CommunityKV: Efficient Long-Context Decoding via Graph Partitioning30 Sep 2026
- 2026Efficiently Approximating Attention Is Hard29 Sep 2026
- 2026PQ-HSA: Reusing Product-Quantized Scores for Hybrid Sparse-Approximate Attention27 Sep 2026
- 2026ClusterAttention: A training-free speedup of bidirectional attention27 Aug 2026
- 2026FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving20 Aug 2026
- 2026Partition the Support, Reconstruct the Residual: Training-Free Sparse Attention for Video Generation and World Models19 Aug 2026
- 2026FLARE++: Low-rank attention with dynamic attention routing12 Aug 2026
- 2026Addressable Memory for Video World Models7 Aug 2026
- 2026AVQ-Attention: Adaptive Vector-Quantized Attention14 Jul 2026
- 2026When Structured Sparse Autoencoders Learn Consistent Concepts Across Modalities9 Jul 2026
- 2026Transformer-Enhanced Reinforcement Learning: Fundamentals and Applications in Communication Networks26 May 2026
- 2026Z-Order Transformer for Feed-Forward Gaussian Splatting13 May 2026
38 more
- 2026DASH-KV: Accelerating Long-Context LLM Inference via Asymmetric KV Cache Hashing21 Apr 2026
- 2026k-Maximum Inner Product Attention for Graph Transformers and the Expressive Power of GraphGPS4 Apr 2026
- 2025HTTM: Head-wise Temporal Token Merging for Faster VGGT26 Nov 2025
- 2025Data-Driven Discovery of Feature Groups in Clinical Time Series11 Nov 2025
- 2025FG-Attn: Leveraging Fine-Grained Sparse Attention in Video Diffusion Models20 Sep 2025
- 2025Localmax dynamics for attention in transformers and its asymptotic behavior19 Sep 2025
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMs26 Jul 2025
- 2025Mixture of Sparse Attention: Content-Based Learnable Sparse Attention via Expert-Choice Routing1 May 2025
- 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Access23 Apr 2025
- 2025Radar: Fast Long-Context Decoding for Any Transformer13 Mar 2025
- 2025CATANet: Efficient Content-Aware Token Aggregation for Lightweight Image Super-Resolution10 Mar 2025
- 2025Walking the Web of Concept-Class Relationships in Incrementally Trained Interpretable Models27 Feb 2025
- 2024Efficient Deep Learning Infrastructures for Embedded Computing Systems: A Comprehensive Survey and Future Envision3 Nov 2024
- 2024ThunderKittens: Simple, Fast, and Adorable AI Kernels27 Oct 2024
- 2024LoRANN: Low-Rank Matrix Factorization for Approximate Nearest Neighbor Search24 Oct 2024
- 2024Rethinking Transformer for Long Contextual Histopathology Whole Slide Image Analysis18 Oct 2024
- 2024SplitLLM: Collaborative Inference of LLMs for Model Placement and Throughput Optimization14 Oct 2024
- 2024Efficient transformer with reinforced position embedding for language models7 Oct 2024
- 2024ENACT: Entropy-based Clustering of Attention Input for Reducing the Computational Needs of Object Detection Transformers11 Sep 2024
- 2024Linear Attention is Enough in Spatial-Temporal Forecasting17 Aug 2024
- 2024The Solution for the AIGC Inference Performance Optimization Competition6 Jul 2024
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformers24 Jun 2024
- 2024CLIP-Decoder : ZeroShot Multilabel Classification using Multimodal CLIP Aligned Representation21 Jun 2024
- 2024CT3D++: Improving 3D Object Detection with Keypoint-induced Channel-wise Transformer12 Jun 2024
- 2024Activator: GLU Activation Function as the Core Component of a Vision Transformer24 May 2024
- 2024LongVQ: Long Sequence Modeling with Vector Quantization on Structured Memory17 Apr 2024
- 2024Scene Adaptive Sparse Transformer for Event-based Object Detection2 Apr 2024
- 2024vid-TLDR: Training Free Token merging for Light-weight Video Transformer20 Mar 2024
- 2024NiNformer: A Network in Network Transformer with Token Mixing Generated Gating Function4 Mar 2024
- 2024ATP: Enabling Fast LLM Serving via Attention on Top Principal Keys1 Mar 2024
- 2024Interactive Multi-Head Self-Attention with Linear Complexity27 Feb 2024
- 2024Efficient State Space Model via Fast Tensor Convolution and Block Diagonalization23 Feb 2024
- 2024Computation and Parameter Efficient Multi-Modal Fusion Transformer for Cued Speech Recognition31 Jan 2024
- 2023Algebraic Positional Encodings26 Dec 2023
- 2023Linear Attention via Orthogonal Memory18 Dec 2023
- 2023Efficient Large Language Models: A Survey6 Dec 2023
- 2023Linear Log-Normal Attention with Unbiased Concentration22 Nov 2023
- 2023Long-MIL: Scaling Long Contextual Multiple Instance Learning for Histopathology Whole Slide Image Analysis21 Nov 2023
50 newest of 123 All 123 (JSON)
- 2021Learned Token Pruning for Transformerscited by 138
- 2023Revisiting Token Pruning for Object Detection and Instance Segmentationcited by 50
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMscited by 3
- 2026FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Servingcited by 2
- 2024ATP: Enabling Fast LLM Serving via Attention on Top Principal Keyscited by 1
- 2026DASH-KV: Accelerating Long-Context LLM Inference via Asymmetric KV Cache Hashingcited by 1
- 2026CommunityKV: Efficient Long-Context Decoding via Graph Partitioningcited by 0
- 2026CommunityKV: Efficient Long-Context Decoding via Graph Partitioning30 Sep 2026
- 2026FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving20 Aug 2026
- 2026DASH-KV: Accelerating Long-Context LLM Inference via Asymmetric KV Cache Hashing21 Apr 2026
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMs26 Jul 2025
- 2024ATP: Enabling Fast LLM Serving via Attention on Top Principal Keys1 Mar 2024
- 2023Revisiting Token Pruning for Object Detection and Instance Segmentation12 Jun 2023
- 2021Learned Token Pruning for Transformers2 Jul 2021
- 2022cosFormer: Rethinking Softmax in Attentioncited by 212
- 2022cosFormer: Rethinking Softmax in Attention17 Feb 2022
- 2021Transformers in Vision: A Surveycited by 1,009
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2021A Survey of Transformerscited by 399
- 2021FNet: Mixing Tokens with Fourier Transformscited by 343
- 2022Long Range Language Modeling via Gated State Spacescited by 265
- 2023Efficient Large Language Models: A Surveycited by 183
- 2022Separable Self-attention for Mobile Vision Transformerscited by 163
- 2022OnePose: One-Shot Object Pose Estimation without CAD Modelscited by 155
- 2023The emergence of clusters in self-attention dynamicscited by 133
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
- 2022Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Cloudscited by 102
- 2021Finetuning Pretrained Transformers into RNNscited by 94
12 most cited of 109 All 109 (JSON)
- 2026Efficiently Approximating Attention Is Hard29 Sep 2026
- 2026PQ-HSA: Reusing Product-Quantized Scores for Hybrid Sparse-Approximate Attention27 Sep 2026
- 2026ClusterAttention: A training-free speedup of bidirectional attention27 Aug 2026
- 2026FLARE++: Low-rank attention with dynamic attention routing12 Aug 2026
- 2026AVQ-Attention: Adaptive Vector-Quantized Attention14 Jul 2026
- 2026When Structured Sparse Autoencoders Learn Consistent Concepts Across Modalities9 Jul 2026
- 2026Transformer-Enhanced Reinforcement Learning: Fundamentals and Applications in Communication Networks26 May 2026
- 2026Z-Order Transformer for Feed-Forward Gaussian Splatting13 May 2026
- 2026k-Maximum Inner Product Attention for Graph Transformers and the Expressive Power of GraphGPS4 Apr 2026
- 2025HTTM: Head-wise Temporal Token Merging for Faster VGGT26 Nov 2025
- 2025Data-Driven Discovery of Feature Groups in Clinical Time Series11 Nov 2025
- 2025Localmax dynamics for attention in transformers and its asymptotic behavior19 Sep 2025
12 newest of 109 All 109 (JSON)