mlsanityData to 14 Oct 2026

FlashBoB: I/O-Efficient Exact Backward-over-Backward for Softmax Attention

arXiv 2609.24089 ↗First posted 21 Sep 2026cs.LG cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Transformer models built on the attention mechanism have become a central building block in modern deep learning, yet softmax attention remains a major bottleneck for long-context workloads. While FlashAttention makes the forward and first backward passes I/O-efficient, it does not support backward-over-backward (BoB), which enables exact differentiation through the backward pass for applications such as second-order optimization, test-time training, gradient-based memory, and meta-learning. Existing BoB implementations either materialize large intermediate tensors or exhaust GPU memory at long sequence lengths. We present FlashBoB, an exact, I/O-efficient algorithm for BoB in softmax attention that keeps computation within on-chip tiles and avoids all N × N intermediate tensors, where N is the sequence length. The key insight is a hierarchical affine structure in the softmax double backward: two row-wise scalars determine all outputs through affine transformations. This yields a two-pass schedule with bounded on-chip static random-access memory (SRAM) usage and minimal off-chip high-bandwidth memory (HBM) traffic. FlashBoB achieves Theta(N2 d2/M) HBM traffic (d is the head dimension and M is the memory size) and, within the standard FlashAttention-style score-recomputation model, matches the inherited large-cache lower bound for exact forward attention. Empirically, it scales exact attention BoB to N=262K on a single A100 80GB GPU, where prior PyTorch exact baselines fail by N=16K, and is up to 6.3× faster than FlashBack. These results make exact second-order attention practical at long-context sequence lengths where prior implementations cannot run efficiently.

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

Builds on

42 of 57 references.

References · 42

  1. 2017Attention Is All You Needcited by 60,361
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  4. 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,897
  5. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  6. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  7. 2020Longformer: The Long-Document Transformercited by 3,413
  8. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  9. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  10. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  11. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  12. 2020Reformer: The Efficient Transformercited by 1,668
30 more
  1. 2020Rethinking Attention with Performerscited by 1,601
  2. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  3. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
  4. 2018On First-Order Meta-Learning Algorithmscited by 1,018
  5. 2015Automatic differentiation in machine learning: a surveycited by 855
  6. 2016Training Deep Nets with Sublinear Memory Costcited by 848
  7. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
  8. 2015Optimizing Neural Networks with Kronecker-factored Approximate Curvaturecited by 796
  9. 2019Meta-Learning with Implicit Gradientscited by 525
  10. 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
  11. 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
  12. 2018Shampoo: Preconditioned Stochastic Tensor Optimizationcited by 426
  13. 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
  14. 2023Sophia: A Scalable Stochastic Second-order Optimizer for Language Model Pre-trainingcited by 265
  15. 2025FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Servingcited by 258
  16. 2023DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Modelscited by 245
  17. 2020ADAHESSIAN: An Adaptive Second Order Optimizer for Machine Learningcited by 202
  18. 2018Online normalizer calculation for softmaxcited by 162
  19. 2021Self-attention Does Not Need O(n2) Memorycited by 154
  20. 2019Checkmate: Breaking the Memory Wall with Optimal Tensor Rematerializationcited by 91
  21. 2018NVIDIA Tensor Core Programmability, Performance & Precisioncited by 79
  22. 2019BackPACK: Packing more into backpropcited by 78
  23. 2026FlashAttention-4: Algorithm and Kernel Pipelining Co-Design for Asymmetric Hardware Scalingcited by 66
  24. 2025End-to-End Test-Time Training for Long Contextcited by 62
  25. 2020Dynamic Tensor Rematerializationcited by 46
  26. 2023FlashFFTConv: Efficient Convolutions for Long Sequences with Tensor Corescited by 33
  27. 2023DISTFLASHATTN: Distributed Memory-efficient Attention for Long-context LLMs Trainingcited by 29
  28. 2024On Fine-Grained I/O Complexity of Attention Backward Passescited by 11
  29. 2026GradMem: Learning to Write Context into Memory with Test-Time Gradient Descentcited by 9
  30. 2024The I/O Complexity of Attention, or How Optimal is Flash Attention?cited by 6

Built on by

Not cited yet.