mlsanityData to 14 Oct 2026

MonarchAttention: Zero-Shot Conversion to Fast, Hardware-Aware Structured Attention

arXiv 2505.18698 ↗First posted 24 May 2025cs.LGcited by 5

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  6. 2022Scalable Diffusion Models with Transformerscited by 6,054
  7. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
  8. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  9. 2022Robust Speech Recognition via Large-Scale Weak Supervisioncited by 4,057
  10. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  11. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  12. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
23 more
  1. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  2. 2020Reformer: The Efficient Transformercited by 1,668
  3. 2020Rethinking Attention with Performerscited by 1,601
  4. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  5. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  6. 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,446
  7. 2020Geom-GCN: Geometric Graph Convolutional Networkscited by 826
  8. 2022Recipe for a General, Powerful, Scalable Graph Transformercited by 713
  9. 2021Datasets: A Community Library for Natural Language Processingcited by 530
  10. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
  11. 2022cosFormer: Rethinking Softmax in Attentioncited by 213
  12. 2021BookSum: A Collection of Datasets for Long-form Narrative Summarizationcited by 184
  13. 2019Sparse Sequence-to-Sequence Modelscited by 170
  14. 2018Nonconvex Optimization Meets Low-Rank Matrix Factorization: An Overviewcited by 160
  15. 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 130
  16. 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
  17. 2022Monarch: Expressive Structured Matrices for Efficient and Accurate Trainingcited by 106
  18. 2023HyperAttention: Long-context Attention in Near-Linear Timecited by 85
  19. 2019Learning Fast Algorithms for Linear Transforms Using Butterfly Factorizationscited by 76
  20. 2021Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Modelscited by 76
  21. 2023Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecturecited by 63
  22. 2020SMYRF: Efficient Attention using Asymmetric Clusteringcited by 43
  23. 2018Learning Classifiers with Fenchel-Young Losses: Generalized Entropies, Margins, and Algorithmscited by 27

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 5.

5 papers.