Metraipolis › archive › dc_753444b365a8

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

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.24089
License (as archived)
CC0-1.0
Archived
2026-10-09T07:07:31.623Z
SHA-256 of the archived text
b154c92678b7f7aeedc8060a643f95c2eedfece41c31d2e493b81a5ea20de019
Stable URL of this page
https://metraipolis.com/documento/dc_753444b365a8

How to cite

FlashBoB: I/O-Efficient Exact Backward-over-Backward for Softmax Attention — arXiv:2609.24089 — arXiv (en), https://arxiv.org/abs/2609.24089 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_753444b365a8 (Metraipolis archive dc_753444b365a8, sha256 b154c92678b7f7aeedc8060a643f95c2eedfece41c31d2e493b81a5ea20de019)
BibTeX
@misc{dc753444b365a8,
  title = {FlashBoB: I/O-Efficient Exact Backward-over-Backward for Softmax Attention — arXiv:2609.24089},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.24089},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_753444b365a8; sha256 b154c92678b7f7aeedc8060a643f95c2eedfece41c31d2e493b81a5ea20de019},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.24089. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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 \times 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(N^2 d^2/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=262\text{K}$ on a single A100 80GB GPU, where prior PyTorch exact baselines fail by $N=16\text{K}$, and is up to $6.3\times$ faster than FlashBack. These results make exact second-order attention practical at long-context sequence lengths where prior implementations cannot run efficiently.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-22 in cs.LG).
Categorie arXiv: Machine Learning (cs.LG) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2609.24089 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-09T06:58:09.365Z dalla pagina https://arxiv.org/catchup/cs.LG/2026-09-22?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).