mlsanityData to 7 Oct 2026

SOFT: Softmax-free Transformer with Linear Complexity

arXiv 2110.11945 ↗First posted 22 Oct 2021cs.CV cs.AI cs.LGcited by 128

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 128 papers in the map (data through 7 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 22 Oct 2021.

Builds on

39 of 48 references.

References · 39

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  6. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  7. 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 6,979
  8. 2016Layer Normalizationcited by 5,579
  9. 2015Rethinking the Inception Architecture for Computer Visioncited by 5,451
  10. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,155
  11. 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
  12. 2020Deformable DETR: Deformable Transformers for End-to-End Object Detectioncited by 3,410
27 more
  1. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,875
  2. 2017Non-local Neural Networkscited by 2,290
  3. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  4. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
  5. 2020Reformer: The Efficient Transformercited by 1,658
  6. 2020Rethinking Attention with Performerscited by 1,584
  7. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  8. 2020Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformerscited by 1,368
  9. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
  10. 2021Perceiver: General Perception with Iterative Attentioncited by 1,089
  11. 2020Designing Network Design Spacescited by 954
  12. 2020Efficient Transformers: A Surveycited by 784
  13. 2021Going deeper with Image Transformerscited by 759
  14. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
  15. 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
  16. 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
  17. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
  18. 2021Conditional Positional Encodings for Vision Transformerscited by 402
  19. 2021Bottleneck Transformers for Visual Recognitioncited by 364
  20. 2021Random Feature Attentioncited by 350
  21. 2020Exploring Self-attention for Image Recognitioncited by 313
  22. 2021Co-Scale Conv-Attentional Image Transformerscited by 224
  23. 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 128
  24. 2021LambdaNetworks: Modeling Long-Range Interactions Without Attentioncited by 107
  25. 2021Finetuning Pretrained Transformers into RNNscited by 94
  26. 2021Is Attention Better Than Matrix Decomposition?cited by 75
  27. 2019Dynamic Graph Message Passing Networkscited by 62

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 2; 2022: 32; 2023: 29; 2024: 34; 2025: 19; 2026: 12.

128 papers.

Sort:

By area:

  1. 2024PixArt-Sigma: Weak-to-Strong Training of Diffusion Transformer for 4K Text-to-Image Generationcited by 326
  2. 2023FLatten Transformer: Vision Transformer using Focused Linear Attentioncited by 170
  3. 2022On The Computational Complexity of Self-Attentioncited by 137
  4. 2023Run, Don't Walk: Chasing Higher FLOPS for Faster Neural Networkscited by 129
  5. 2022EdgeViTs: Competing Light-weight CNNs on Mobile Devices with Vision Transformerscited by 116
  6. 2024Demystify Mamba in Vision: A Linear Attention Perspectivecited by 101
  7. 2023Modeling Dense Multimodal Interactions Between Biological Pathways and Histology for Survival Predictioncited by 92
  8. 2023Agent Attention: On the Integration of Softmax and Linear Attentioncited by 90
  9. 2024The Hidden Attention of Mamba Modelscited by 88
  10. 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Modelscited by 71
  11. 2022Flowformer: Linearizing Transformers with Conservation Flowscited by 69
  12. 2023FasterViT: Fast Vision Transformers with Hierarchical Attentioncited by 65
38 more
  1. 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
  2. 2022THE-X: Privacy-Preserving Transformer Inference with Homomorphic Encryptioncited by 55
  3. 2024Bridging the Divide: Reconsidering Softmax and Linear Attentioncited by 48
  4. 2023Replacing softmax with ReLU in Vision Transformerscited by 43
  5. 2023A survey on efficient vision transformers: algorithms, techniques, and performance benchmarkingcited by 41
  6. 2023In-Context Learning with Many Demonstration Examplescited by 39
  7. 2024A Survey of Mambacited by 39
  8. 2022Self-Guided Diffusion Modelscited by 36
  9. 2022Transforming medical imaging with Transformers? A comparative review of key properties, current progresses, and future perspectivescited by 32
  10. 2022SimA: Simple Softmax-free Attention for Vision Transformerscited by 32
  11. 2023Generative Semantic Segmentationcited by 32
  12. 2022Linear Complexity Randomized Self-attention Mechanismcited by 31
  13. 2022Attention Mechanism in Neural Networks: Where it Comes and Where it Goescited by 29
  14. 2022Castling-ViT: Compressing Self-Attention via Switching Towards Linear-Angular Attention at Vision Transformer Inferencecited by 28
  15. 2023Primal-Attention: Self-attention through Asymmetric Kernel SVD in Primal Representationcited by 28
  16. 2022Transformers from an Optimization Perspectivecited by 27
  17. 2024Efficient Diffusion Transformer with Step-wise Dynamic Attention Mediatorscited by 24
  18. 2023Efficient Attention via Control Variatescited by 23
  19. 2023Prune Spatio-temporal Tokens by Semantic-aware Temporal Accumulationcited by 23
  20. 2022Vicinity Vision Transformercited by 22
  21. 2022EcoFormer: Energy-Saving Attention with Linear Complexitycited by 21
  22. 2022MPCViT: Searching for Accurate and Efficient MPC-Friendly Vision Transformer with Heterogeneous Attentioncited by 19
  23. 2023GTP-ViT: Efficient Vision Transformers via Graph-based Token Propagationcited by 19
  24. 2021ELSA: Enhanced Local Self-Attention for Vision Transformercited by 18
  25. 2024Positional Knowledge is All You Need: Position-induced Transformer (PiT) for Operator Learningcited by 17
  26. 2021Cost Aggregation Is All You Need for Few-Shot Segmentationcited by 16
  27. 2023EGA-Depth: Efficient Guided Attention for Self-Supervised Multi-Camera Depth Estimationcited by 16
  28. 2024CascadedGaze: Efficiency in Global Context Extraction for Image Restorationcited by 16
  29. 2022Accumulated Trivial Attention Matters in Vision Transformers on Small Datasetscited by 15
  30. 2023ShiftAddViT: Mixture of Multiplication Primitives Towards Efficient Vision Transformercited by 15
  31. 2023Towards Understanding How Transformers Learn In-context Through a Representation Learning Lenscited by 15
  32. 2024DiJiang: Efficient Large Language Models through Compact Kernelizationcited by 15
  33. 2024Encryption-Friendly LLM Architecturecited by 15
  34. 2022Dynamic N:M Fine-grained Structured Sparse Attention Mechanismcited by 14
  35. 2023Computation-efficient Deep Learning for Computer Vision: A Surveycited by 14
  36. 2024Unifying Feature and Cost Aggregation with Transformers for Semantic and Visual Correspondencecited by 14
  37. 2024Comprehensive Survey of Model Compression and Speed up for Vision Transformerscited by 14
  38. 2023Eventful Transformers: Leveraging Temporal Redundancy in Vision Transformerscited by 13

50 most cited of 128 All 128 (JSON)