mlsanityData to 14 Oct 2026

SUS backprop: linear backpropagation algorithm for long inputs in transformers

arXiv 2505.15080 ↗First posted 21 May 2025cs.LG cs.AI cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

It is straightforward to design an unbiased gradient estimator that stochastically cuts the backpropagation flow through any part of a computational graph. By cutting the parts that have little effect on the computation, one can potentially save a significant amount of backpropagation computation in exchange for a minimal increase in the stochastic gradient variance, in some situations. Such a situation occurs in the attention mechanism of the transformer architecture. For long sequences, attention becomes the limiting factor, as its compute requirements increase quadratically with sequence length n. At the same time, most attention weights become very small, as most attention heads tend to connect a given token with only a small fraction of other tokens in the sequence. These weights become promising targets for cutting backpropagation. We propose a simple probabilistic rule controlled by a single parameter c that cuts back-propagation through most attention weights, leaving at most c interactions per token per attention head. This brings a factor of c/n reduction in the compute required for the attention backpropagation, turning it from quadratic O(n2) to linear complexity O(nc). We have empirically verified that, for a typical transformer model, cutting about 99% of the attention gradient flow (i.e. choosing c ~ 25-30) results in relative gradient variance increase of only about 1% for n ~ 2000, and it decreases with n. This approach is amenable to efficient sparse matrix implementation, thus being promising for making the cost of a backward pass negligible relative to the cost of a forward pass when training a transformer model on long sequences.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 29 of its 33 references that are in the map. First posted on arXiv 21 May 2025.

Builds on

29 of 33 references.

References · 29

  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. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  4. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  5. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  6. 2022Robust Speech Recognition via Large-Scale Weak Supervisioncited by 4,057
  7. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  8. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  9. 2020Longformer: The Long-Document Transformercited by 3,413
  10. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  11. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  12. 2020Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecastingcited by 2,169
17 more
  1. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  2. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  3. 2020Reformer: The Efficient Transformercited by 1,668
  4. 2020Rethinking Attention with Performerscited by 1,601
  5. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  6. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  7. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
  8. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  9. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
  10. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
  11. 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
  12. 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
  13. 2023Stabilizing Transformer Training by Preventing Attention Entropy Collapsecited by 161
  14. 2023A Comprehensive Survey on Applications of Transformers for Deep Learning Taskscited by 71
  15. 2021Unbiased Gradient Estimation in Unrolled Computation Graphs with Persistent Evolution Strategiescited by 52
  16. 2022Stochastic Backpropagation: A Memory Efficient Strategy for Training Video Modelscited by 14
  17. 2022An In-depth Study of Stochastic Backpropagationcited by 2

Built on by

Not cited yet.