mlsanityData to 14 Oct 2026

TaylorShift: Shifting the Complexity of Self-Attention from Squared to Linear (and Back) using Taylor-Softmax

arXiv 2403.02920 ↗First posted 5 Mar 2024cs.LG cs.AIcited by 7

Not on the map. Why?

Abstract (arXiv)

The quadratic complexity of the attention mechanism represents one of the biggest hurdles for processing long sequences using Transformers. Current methods, relying on sparse representations or stateful recurrence, sacrifice token-to-token interactions, which ultimately leads to compromises in performance. This paper introduces TaylorShift, a novel reformulation of the Taylor softmax that enables computing full token-to-token interactions in linear time and space. We analytically determine the crossover points where employing TaylorShift becomes more efficient than traditional attention, aligning closely with empirical measurements. Specifically, our findings demonstrate that TaylorShift enhances memory efficiency for sequences as short as 800 tokens and accelerates inference for inputs of approximately 1700 tokens and beyond. For shorter sequences, TaylorShift scales comparably with the vanilla attention. Furthermore, a classification benchmark across five tasks involving long sequences reveals no degradation in accuracy when employing Transformers equipped with TaylorShift. For reproducibility, we provide access to our code under https://github.com/tobna/TaylorShift.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 34 of its 42 references that are in the map. First posted on arXiv 5 Mar 2024.

Builds on

34 of 42 references.

References · 34

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  3. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  5. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  6. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  7. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  8. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  9. 2020Reformer: The Efficient Transformercited by 1,668
  10. 2020Rethinking Attention with Performerscited by 1,601
  11. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  12. 2020Efficient Transformers: A Surveycited by 790
22 more
  1. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
  2. 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
  3. 2022DeiT III: Revenge of the ViTcited by 419
  4. 2021A Survey of Transformerscited by 401
  5. 2021Random Feature Attentioncited by 354
  6. 2021XCiT: Cross-Covariance Image Transformerscited by 338
  7. 2015Explaining NonLinear Classification Decisions with Deep Taylor Decompositioncited by 250
  8. 2022On The Computational Complexity of Self-Attentioncited by 139
  9. 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133
  10. 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
  11. 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 98
  12. 2023MB-TaylorFormer: Multi-branch Efficient Transformer Expanded by Taylor Formula for Image Dehazingcited by 81
  13. 2021A Practical Survey on Faster and Lighter Transformerscited by 73
  14. 2019Explaining Convolutional Neural Networks using Softmax Gradient Layer-wise Relevance Propagationcited by 29
  15. 2022ViTALiTy: Unifying Low-rank and Sparse Approximation for Vision Transformer Acceleration with a Linear Taylor Attentioncited by 29
  16. 2015An Exploration of Softmax Alternatives Belonging to the Spherical Loss Familycited by 27
  17. 2023Efficient Attention via Control Variatescited by 23
  18. 2020Exploring Alternatives to Softmax Functioncited by 16
  19. 2014Efficient Exact Gradient Update for training Deep Networks with Very Large Sparse Targetscited by 10
  20. 2022CAB: Comprehensive Attention Benchmarking on Long Sequence Modelingcited by 10
  21. 2023Which Transformer to Favor: A Comparative Analysis of Efficiency in Vision Transformerscited by 9
  22. 2023Taylorformer: Probabilistic Modelling for Random Processes including Time Seriescited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 3; 2025: 1; 2026: 3.

7 papers.