Lune

ICLR2023顶会

Efficient Attention via Control Variates

Lin Zheng, Jianbo Yuan, Chong Wang, Lingpeng Kong

摘要

Random-feature-based attention (RFA) is an efficient approximation of softmax attention with linear runtime and space complexity. However, the approximation gap between RFA and conventional softmax attention is not well studied. Built upon previous progress of RFA, we characterize this gap through the lens of control variates and show that RFA can be decomposed into a sum of multiple control variate estimators for each element in the sequence. This new framework reveals that exact softmax attention can be recovered from RFA by manipulating each control variate. Besides, it allows us to develop a more flexible form of control variates, resulting in a novel attention mechanism that significantly reduces the approximation gap while maintaining linear complexity. Extensive experiments demonstrate that our model outperforms state-of-the-art efficient attention mechanisms on both vision and language tasks. 1

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • MetaLA: Unified Optimal Linear Approximation to Softmax Attention Map 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • MetaLA: Unified Optimal Linear Approximation to Softmax Attention Map 引用了 Language Models are Few-Shot Learners
  • MetaLA: Unified Optimal Linear Approximation to Softmax Attention Map 引用了 Various Lengths, Constant Speed: Efficient Language Modeling with Lightning Attention
  • MetaLA: Unified Optimal Linear Approximation to Softmax Attention Map 引用了 Training data-efficient image transformers & distillation through attention
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Coneheads: Hierarchy Aware Attention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Coneheads: Hierarchy Aware Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Coneheads: Hierarchy Aware Attention 引用了 Language Models are Few-Shot Learners
  • Coneheads: Hierarchy Aware Attention 引用了 Training data-efficient image transformers & distillation through attention
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
  • Various Lengths, Constant Speed: Efficient Language Modeling with Lightning Attention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mobile Attention: Mobile-Friendly Linear-Attention for Vision Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Mobile Attention: Mobile-Friendly Linear-Attention for Vision Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Mobile Attention: Mobile-Friendly Linear-Attention for Vision Transformers 引用了 Training data-efficient image transformers & distillation through attention
  • Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Many-Shot In-Context Learning 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet 等NeurIPS 2024 · 271 次引用
  2. Various Lengths, Constant Speed: Efficient Language Modeling with Lightning AttentionZhen Qin, Weigao Sun, Dong Li, Xuyang Shen 等ICML 2024 · 26 次引用
  3. MetaLA: Unified Optimal Linear Approximation to Softmax Attention MapYuhong Chou, Man Yao, Kexin Wang, Yuqi Pan 等NeurIPS 2024 · 22 次引用
  4. Coneheads: Hierarchy Aware AttentionAlbert Tseng, Tao Yu, Toni J. B. Liu, Christopher De SaNeurIPS 2023 · 8 次引用
  5. Mobile Attention: Mobile-Friendly Linear-Attention for Vision TransformersZhiyu Yao, Jian Wang, Haixu Wu, Jingdong Wang 等ICML 2024 · 6 次引用

它引用的 Paper52

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  4. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
  5. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用

相关 Paper

  1. Random Feature AttentionHao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz 等ICLR 2021 · 425 次引用
  2. Linear Complexity Randomized Self-attention MechanismLin Zheng, Chong Wang, Lingpeng KongICML 2022 · 39 次引用
  3. Dense-Exponential Random Features: Sharp Positive Estimators of the Gaussian KernelValerii Likhosherstov, Krzysztof Marcin Choromanski, Kumar Avinava Dubey, Frederick Liu 等NeurIPS 2023 · 5 次引用
  4. ELFATT: Efficient Linear Fast Attention for Vision TransformersChong Wu, Maolin Che, Renjie Xu, Zhuoheng Ran 等ACM MM 2025 · 3 次引用
  5. Breaking the Low-Rank Dilemma of Linear AttentionQihang Fan, Huaibo Huang, Ran HeCVPR 2025
黄昏的海面,两侧是细线勾勒的悬崖