MonarchAttention: Zero-Shot Conversion to Fast, Hardware-Aware Structured Attention
Not on the map. Why?
Abstract (arXiv)
Transformers have achieved state-of-the-art performance across various tasks, but suffer from a notable quadratic complexity in sequence length due to the attention mechanism. In this work, we propose MonarchAttention -- a novel approach to sub-quadratic attention approximation via Monarch matrices, an expressive class of structured matrices. Based on the variational form of softmax, we describe an efficient optimization-based algorithm to compute an approximate projection of softmax attention onto the class of Monarch matrices with Theta(N√N d) computational complexity and Theta(Nd) memory/IO complexity. Unlike previous approaches, MonarchAttention is both (1) transferable, yielding minimal performance loss with no additional training, even when replacing every attention layer of the Transformer, and (2) hardware-efficient, utilizing the highest-throughput tensor core units on modern GPUs. With optimized kernels, MonarchAttention achieves substantial speed-ups in wall-time over FlashAttention-2: 1.4× for shorter sequences (N=256), 4.5× for medium-length sequences (N=4K), and 8.2× for longer sequences (N=16K). We demonstrate the quality of MonarchAttention on diverse tasks and architectures in vision and language problems, showing that it flexibly and accurately approximates softmax attention in a variety of contexts. Our code is available at https://github.com/cjyaras/monarch-attention.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 35 of its 43 references that are in the map. First posted on arXiv 24 May 2025.
Builds on
35 of 43 references.
References · 35
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
- 2022Scalable Diffusion Models with Transformerscited by 6,054
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2022Robust Speech Recognition via Large-Scale Weak Supervisioncited by 4,057
- 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
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
23 more
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Reformer: The Efficient Transformercited by 1,668
- 2020Rethinking Attention with Performerscited by 1,601
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,446
- 2020Geom-GCN: Geometric Graph Convolutional Networkscited by 826
- 2022Recipe for a General, Powerful, Scalable Graph Transformercited by 713
- 2021Datasets: A Community Library for Natural Language Processingcited by 530
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
- 2022cosFormer: Rethinking Softmax in Attentioncited by 213
- 2021BookSum: A Collection of Datasets for Long-form Narrative Summarizationcited by 184
- 2019Sparse Sequence-to-Sequence Modelscited by 170
- 2018Nonconvex Optimization Meets Low-Rank Matrix Factorization: An Overviewcited by 160
- 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 130
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
- 2022Monarch: Expressive Structured Matrices for Efficient and Accurate Trainingcited by 106
- 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
- 2019Learning Fast Algorithms for Linear Transforms Using Butterfly Factorizationscited by 76
- 2021Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Modelscited by 76
- 2023Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecturecited by 63
- 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
- 2018Learning Classifiers with Fenchel-Young Losses: Generalized Entropies, Margins, and Algorithmscited by 27
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026MonarchRT: Efficient Attention for Real-Time Video Generationcited by 6
- 2026ViT-AdaLA: Adapting Vision Transformers with Linear Attentioncited by 4
- 2026VMonarch: Efficient Video Diffusion Transformers with Structured Attentioncited by 3
- 2026Power-based Partial Attention: Bridging Linear-Complexity and Full Attentioncited by 0
- 2026Functional Attention: From Pairwise Affinities to Functional Correspondencescited by 0
- 2026Functional Attention: From Pairwise Affinities to Functional Correspondences29 May 2026
- 2026ViT-AdaLA: Adapting Vision Transformers with Linear Attention17 Mar 2026
- 2026MonarchRT: Efficient Attention for Real-Time Video Generation12 Feb 2026
- 2026VMonarch: Efficient Video Diffusion Transformers with Structured Attention29 Jan 2026
- 2026Power-based Partial Attention: Bridging Linear-Complexity and Full Attention24 Jan 2026