mlsanityData to 14 Oct 2026

Generalized Neighborhood Attention: Multi-dimensional Sparse Attention at the Speed of Light

arXiv 2504.16922 ↗First posted 23 Apr 2025cs.CV cs.AI cs.LGcited by 18

Not on the map. Why?

Abstract (arXiv)

Many sparse attention mechanisms such as Neighborhood Attention have typically failed to consistently deliver speedup over the self attention baseline. This is largely due to the level of complexity in attention infrastructure, and the rapid evolution of AI hardware architecture. At the same time, many state-of-the-art foundational models, particularly in computer vision, are heavily bound by attention, and need reliable sparsity to escape the O(n^2) complexity. In this paper, we study a class of promising sparse attention mechanisms that focus on locality, and aim to develop a better analytical model of their performance improvements. We first introduce Generalized Neighborhood Attention (GNA), which can describe sliding window, strided sliding window, and blocked attention. We then consider possible design choices in implementing these approaches, and create a simulator that can provide much more realistic speedup upper bounds for any given setting. Finally, we implement GNA on top of a state-of-the-art fused multi-headed attention (FMHA) kernel designed for the NVIDIA Blackwell architecture in CUTLASS. Our implementation can fully realize the maximum speedup theoretically possible in many perfectly block-sparse cases, and achieves an effective utilization of 1.3 petaFLOPs/second in FP16. In addition, we plug various GNA configurations into off-the-shelf generative models, such as Cosmos-7B, HunyuanVideo, and FLUX, and show that it can deliver 28% to 46% end-to-end speedup on B200 without any fine-tuning. We will open source our simulator and Blackwell kernels directly through the NATTEN project.

Key facts. Cited by 18 papers in the map (data through 14 Oct 2026). Builds on 47 of its 56 references that are in the map. First posted on arXiv 23 Apr 2025.

Builds on

47 of 56 references.

References · 47

  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. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  4. 2023Segment Anythingcited by 8,234
  5. 2022Scalable Diffusion Models with Transformerscited by 6,054
  6. 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,181
  7. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  8. 2020Longformer: The Long-Document Transformercited by 3,413
  9. 2023Mistral 7Bcited by 3,164
  10. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  11. 2023VBench: Comprehensive Benchmark Suite for Video Generative Modelscited by 1,822
  12. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
35 more
  1. 2024HunyuanVideo: A Systematic Framework For Large Video Generative Modelscited by 1,660
  2. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  3. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  4. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  5. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
  6. 2022Token Merging: Your ViT But Fastercited by 1,021
  7. 2023GenEval: An Object-Focused Framework for Evaluating Text-to-Image Alignmentcited by 972
  8. 2023Human Preference Score v2: A Solid Benchmark for Evaluating Human Preferences of Text-to-Image Synthesiscited by 890
  9. 2025Cosmos World Foundation Model Platform for Physical AIcited by 864
  10. 2018Image Transformercited by 772
  11. 2022Exploring Plain Vision Transformer Backbones for Object Detectioncited by 724
  12. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
  13. 2019Stand-Alone Self-Attention in Vision Modelscited by 542
  14. 2022MANIQA: Multi-dimension Attention Network for No-Reference Image Quality Assessmentcited by 522
  15. 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 519
  16. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 471
  17. 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 407
  18. 2022OneFormer: One Transformer to Rule Universal Image Segmentationcited by 328
  19. 2022Neighborhood Attention Transformercited by 239
  20. 2021Scaling Local Self-Attention for Parameter Efficient Visual Backbonescited by 220
  21. 2025Sparse VideoGen: Accelerating Video Diffusion Transformers with Spatial-Temporal Sparsitycited by 217
  22. 2018Online normalizer calculation for softmaxcited by 162
  23. 2019Blockwise Self-Attention for Long Document Understandingcited by 159
  24. 2021Self-attention Does Not Need O(n2) Memorycited by 154
  25. 2025XAttention: Block Sparse Attention with Antidiagonal Scoringcited by 137
  26. 2021Scatterbrain: Unifying Sparse and Low-rank Attention Approximationcited by 130
  27. 2025Fast Video Generation with Sliding Tile Attentioncited by 128
  28. 2024Scalable High-Resolution Pixel-Space Image Synthesis with Hourglass Diffusion Transformerscited by 118
  29. 2022Dilated Neighborhood Attention Transformercited by 64
  30. 2025Command A: An Enterprise-Ready Large Language Modelcited by 59
  31. 2022Efficient Image Generation with Variadic Attention Headscited by 17
  32. 2022Dynamic N:M Fine-grained Structured Sparse Attention Mechanismcited by 14
  33. 2024Faster Neighborhood Attention: Reducing the O(n^2) Cost of Self Attention at the Threadblock Levelcited by 14
  34. 2025Ultra-Resolution Adaptation with Easecited by 13
  35. 2025WeatherMesh-3: Fast and accurate operational global weather forecastingcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 8; 2026: 10.

18 papers.

Sort:

By area: