mlsanityData to 14 Oct 2026

ELSA: Exact Linear-Scan Attention for Fast and Memory-Light Vision Transformers

arXiv 2604.23798 ↗First posted 26 Apr 2026cs.LG cs.CVcited by 0

Not on the map. Why?

Abstract (arXiv)

Existing attention accelerators often trade exact softmax semantics, depend on fused Tensor Core kernels, or incur sequential depth that limits FP32 throughput on long sequences. We present ELSA, an algorithmic reformulation of online softmax attention that (i)~preserves exact softmax semantics in real arithmetic with a provable O(ulog n) FP32 relative error bound; (ii)~casts the online softmax update as a prefix scan over an associative monoid (m,S,W), yielding O(n) extra memory and O(log n) parallel depth; and (iii)~is Tensor-Core independent, implemented in Triton and CUDA C++, and deployable as a drop-in replacement requiring no retraining or weight modification. Unlike FlashAttention-2/3, which rely on HMMA/GMMA Tensor Core instructions and provide no compatible FP32 path, ELSA operates identically on A100s and resource-constrained edge devices such as Jetson TX2 -- making it the only hardware-agnostic exact-attention kernel that reduces parallel depth to O(log n) at full precision. On A100 FP32 benchmarks (1K--16K tokens), ELSA delivers 1.3--3.5× speedup over memory-efficient SDPA and 1.97--2.27× on BERT; on Jetson TX2, ELSA achieves 1.5--1.6× over Math (64--900 tokens), with 17.8--20.2% throughput gains under LLaMA-13B offloading at ≥32K. In FP16, ELSA approaches hardware-fused baselines at long sequences while retaining full FP32 capability, offering a unified kernel for high-precision inference across platforms. Our code and implementation are available at https://github.com/ming053l/ELSA.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 35 of its 51 references that are in the map. First posted on arXiv 26 Apr 2026.

Builds on

35 of 51 references.

References · 35

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  6. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  7. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  8. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
  9. 2023Segment Anythingcited by 8,234
  10. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  11. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  12. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
23 more
  1. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  2. 2025VGGT: Visual Geometry Grounded Transformercited by 1,539
  3. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  4. 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
  5. 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
  6. 2023Patch n' Pack: NaViT, a Vision Transformer for any Aspect Ratio and Resolutioncited by 229
  7. 2021Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encodingcited by 207
  8. 2023EfficientViT: Memory Efficient Vision Transformer with Cascaded Group Attentioncited by 172
  9. 2021SpectralFormer: Rethinking Hyperspectral Image Classification with Transformerscited by 169
  10. 2018Online normalizer calculation for softmaxcited by 162
  11. 2021Self-attention Does Not Need O(n2) Memorycited by 154
  12. 2025FastVGGT: Training-Free Acceleration of Visual Geometry Transformercited by 98
  13. 2024SHViT: Single-Head Vision Transformer with Memory Efficient Macro Designcited by 56
  14. 2023DISTFLASHATTN: Distributed Memory-efficient Attention for Long-context LLMs Trainingcited by 29
  15. 2024ViTAR: Vision Transformer with Any Resolutioncited by 25
  16. 2024Lean Attention: Hardware-Aware Scalable Attention Mechanism for the Decode-Phase of Transformerscited by 16
  17. 2023Win-Win: Training High-Resolution Vision Transformers from Two Windowscited by 12
  18. 2024HIRI-ViT: Scaling Vision Transformer with High Resolution Inputscited by 12
  19. 2024Attention as an RNNcited by 6
  20. 2025The Linear Attention Resurrection in Vision Transformercited by 3
  21. 2025Memory Efficient Transformer Adapter for Dense Predictionscited by 3
  22. 2024Softmax Attention with Constant Cost per Tokencited by 1
  23. 2025ELFATT: Efficient Linear Fast Attention for Vision Transformerscited by 1

Built on by

Not cited yet.