Selective Attention Improves Transformer
Yaniv Leviathan, Matan Kalman, Yossi Matias
摘要
Unneeded elements in the attention's context degrade performance. We introduce Selective Attention, a simple parameter-free change to the standard attention mechanism which reduces attention to unneeded elements. Selective attention consistently improves language modeling and downstream task performance in a variety of model sizes and context lengths. For example, transformers trained with the language modeling objective on C4 with selective attention perform language modeling equivalently to standard transformers with ∼2X more heads and parameters in their attention modules. Selective attention also allows decreasing the size of the attention's context buffer, leading to meaningful reductions in the memory and compute requirements during inference. For example, transformers trained on C4 with context sizes of 512, 1,024, and 2,048 need 16X, 25X, and 47X less memory for their attention module, respectively, when equipped with selective attention, as those without selective attention, with the same validation perplexity.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 16 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- PaTH Attention: Position Encoding via Accumulating Householder Transformations 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 Big Bird: Transformers for Longer Sequences
- Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Big Bird: Transformers for Longer Sequences
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- Efficiently Modeling Long Sequences with Structured State Spaces 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- VORTA: Efficient Video Diffusion via Routing Sparse Attention 引用了 Big Bird: Transformers for Longer Sequences
- VORTA: Efficient Video Diffusion via Routing Sparse Attention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- VORTA: Efficient Video Diffusion via Routing Sparse Attention 引用了 Scaling Rectified Flow Transformers for High-Resolution Image Synthesis
引用它的顶会 Paper16
- Do Language Models Use Their Depth Efficiently?Róbert Csordás, Christopher D. Manning, Christopher PottsNeurIPS 2025 · 61 次引用
- Rope to Nope and Back Again: A New Hybrid Attention StrategyBowen Yang, Bharat Venkitesh, Dwaraknath Gnaneshwar, Hangyu Lin 等NeurIPS 2025 · 51 次引用
- PaTH Attention: Position Encoding via Accumulating Householder TransformationsSonglin Yang, Yikang Shen, Kaiyue Wen, Shawn Tan 等NeurIPS 2025 · 36 次引用
- VORTA: Efficient Video Diffusion via Routing Sparse AttentionWenhao Sun, Rong-Cheng Tu, Yifu Ding, Jingyi Liao 等NeurIPS 2025 · 25 次引用
- SPARTAN: A Sparse Transformer World Model Attending to What MattersAnson Lei, Bernhard Schölkopf, Ingmar PosnerNeurIPS 2025 · 12 次引用
它引用的 Paper20
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Scaling Rectified Flow Transformers for High-Resolution Image SynthesisPatrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari 等ICML 2024 · 3,620 次引用
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 次引用
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
相关 Paper
- Long-Range Language Modeling with Selective CacheXinting Huang, Nora HollensteinEMNLP Findings 2023 · 3 次引用
- Dynamic Context Pruning for Efficient and Interpretable Autoregressive TransformersSotiris Anagnostidis, Dario Pavllo, Luca Biggio, Lorenzo Noci 等NeurIPS 2023 · 95 次引用
- TRAMS: Training-free Memory Selection for Long-range Language ModelingHaofei Yu, Cunxiang Wang, Yue Zhang, Wei BiEMNLP Findings 2023 · 1 次引用
- ABC: Attention with Bounded-memory ControlHao Peng, Jungo Kasai, Nikolaos Pappas, Dani Yogatama 等ACL 2022 · 31 次引用
- SCA: Selective Compression Attention for Efficiently Extending the Context Window of Large Language ModelsHuanran Zheng, Wei Zhu, Xiaoling WangEMNLP Findings 2024
