Lune

NeurIPS2021顶会

SOFT: Softmax-free Transformer with Linear Complexity

Jiachen Lu, Jinghan Yao, Junge Zhang, Xiatian Zhu, Hang Xu, Weiguo Gao, Chunjing Xu, Tao Xiang, Li Zhang

摘要

Vision transformers (ViTs) have pushed the state-of-the-art for various visual recognition tasks by patch-wise image tokenization followed by self-attention. However, the employment of self-attention modules results in a quadratic complexity in both computation and memory usage. Various attempts on approximating the self-attention computation with linear complexity have been made in Natural Language Processing. However, an in-depth analysis in this work shows that they are either theoretically flawed or empirically ineffective for visual recognition. We further identify that their limitations are rooted in keeping the softmax self-attention during approximations. Specifically, conventional self-attention is computed by normalizing the scaled dot-product between token feature vectors. Keeping this softmax operation challenges any subsequent linearization efforts. Based on this insight, for the first time, a softmax-free transformer or SOFT is proposed. To remove softmax in self-attention, Gaussian kernel function is used to replace the dot-product similarity without further normalization. This enables a full self-attention matrix to be approximated via a low-rank matrix decomposition. The robustness of the approximation is achieved by calculating its Moore-Penrose inverse using a Newton-Raphson method. Extensive experiments on ImageNet show that our SOFT significantly improves the computational efficiency of existing ViT variants. Crucially, with a linear complexity, much longer token sequences are permitted in SOFT, resulting in superior trade-off between accuracy and complexity.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • FLatten Transformer: Vision Transformer using Focused Linear Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FLatten Transformer: Vision Transformer using Focused Linear Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • FLatten Transformer: Vision Transformer using Focused Linear Attention 引用了 Training data-efficient image transformers & distillation through attention
  • FLatten Transformer: Vision Transformer using Focused Linear Attention 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • FasterViT: Fast Vision Transformers with Hierarchical Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FasterViT: Fast Vision Transformers with Hierarchical Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • FasterViT: Fast Vision Transformers with Hierarchical Attention 引用了 Training data-efficient image transformers & distillation through attention
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Demystify Mamba in Vision: A Linear Attention Perspective 引用了 FLatten Transformer: Vision Transformer using Focused Linear Attention
  • Demystify Mamba in Vision: A Linear Attention Perspective 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Demystify Mamba in Vision: A Linear Attention Perspective 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Demystify Mamba in Vision: A Linear Attention Perspective 引用了 Bridging the Divide: Reconsidering Softmax and Linear Attention
  • Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 Demystify Mamba in Vision: A Linear Attention Perspective
  • 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
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
  • Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 FLatten Transformer: Vision Transformer using Focused Linear Attention
  • Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Bridging the Divide: Reconsidering Softmax and Linear Attention 引用了 Training data-efficient image transformers & distillation through attention
  • Flowformer: Linearizing Transformers with Conservation Flows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Flowformer: Linearizing Transformers with Conservation Flows 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Flowformer: Linearizing Transformers with Conservation Flows 引用了 Language Models are Few-Shot Learners
  • Flowformer: Linearizing Transformers with Conservation Flows 引用了 Training data-efficient image transformers & distillation through attention
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper55

  1. FLatten Transformer: Vision Transformer using Focused Linear AttentionDongchen Han, Xuran Pan, Yizeng Han, Shiji Song 等ICCV 2023 · 358 次引用
  2. Demystify Mamba in Vision: A Linear Attention PerspectiveDongchen Han, Ziyi Wang, Zhuofan Xia, Yizeng Han 等NeurIPS 2024 · 287 次引用
  3. FasterViT: Fast Vision Transformers with Hierarchical AttentionAli Hatamizadeh, Greg Heinrich, Hongxu Yin, Andrew Tao 等ICLR 2024 · 132 次引用
  4. Flowformer: Linearizing Transformers with Conservation FlowsHaixu Wu, Jialong Wu, Jiehui Xu, Jianmin Wang 等ICML 2022 · 130 次引用
  5. Bridging the Divide: Reconsidering Softmax and Linear AttentionDongchen Han, Yifan Pu, Zhuofan Xia, Yizeng Han 等NeurIPS 2024 · 69 次引用

它引用的 Paper26

  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. Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li 等ICLR 2021 · 7,353 次引用

相关 Paper

  1. QT-ViT: Improving Linear Attention in ViT with Quadratic Taylor ExpansionYixing Xu, Chao Li, Dong Li, Xiao Sheng 等NeurIPS 2024 · 7 次引用
  2. Breaking the Low-Rank Dilemma of Linear AttentionQihang Fan, Huaibo Huang, Ran HeCVPR 2025
  3. LaplacianFormer: Rethinking Linear Attention with Laplacian KernelZhe Feng, Sen Lian, Changwei Wang, Muyang Zhang 等ICLR 2026 · 3 次引用
  4. You Only Need Less Attention at Each Stage in Vision TransformersShuoxi Zhang, Hanpeng Liu, Stephen Lin, Kun HeCVPR 2024 · 19 次引用
  5. Scalable Vision Transformers with Hierarchical PoolingZizheng Pan, Bohan Zhuang, Jing Liu, Haoyu He 等ICCV 2021 · 154 次引用
黄昏的海面,两侧是细线勾勒的悬崖