Lune

ICML2025Top-tier venue

XAttention: Block Sparse Attention with Antidiagonal Scoring

Ruyi Xu, Guangxuan Xiao, Haofeng Huang, Junxian Guo, Song Han

Abstract

Long-Context Transformer Models (LCTMs) are vital for real-world applications but suffer high computational costs due to attention's quadratic complexity. Block-sparse attention mitigates this by focusing computation on critical regions, yet existing methods struggle with balancing accuracy and efficiency due to costly block importance measurements. In this paper, we introduce XAttention, a plug-and-play framework that dramatically accelerates long-context inference in Transformers models using sparse attention. XAttention's key innovation is the insight that the sum of antidiagonal values (i.e., from the lower-left to upper-right) in the attention matrix provides a powerful proxy for block importance. This allows for precise identification and pruning of non-essential blocks, resulting in high sparsity and dramatically accelerated inference. Across comprehensive evaluations on demanding long-context benchmarks-including RULER and LongBench for language, VideoMME for video understanding, and VBench for video generation-XAttention achieves accuracy comparable to full attention while delivering substantial computational gains. We demonstrate up to 13.5× acceleration in attention computation. These results underscore XAttention's ability to unlock the practical potential of block sparse attention, paving the way for scalable and efficient deployment of LCTMs in real-world applications.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

54 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites Big Bird: Transformers for Longer Sequences
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Flow Caching for Autoregressive Video Generation cites Scalable Diffusion Models with Transformers
  • Flow Caching for Autoregressive Video Generation cites Sparse VideoGen2: Accelerate Video Generation with Sparse Attention via Semantic-Aware Permutation
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites Big Bird: Transformers for Longer Sequences
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning cites Big Bird: Transformers for Longer Sequences
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptation cites Efficient Streaming Language Models with Attention Sinks
  • InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptation cites Big Bird: Transformers for Longer Sequences
  • InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptation cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites Efficient Streaming Language Models with Attention Sinks
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites Scalable Diffusion Models with Transformers
  • Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video Generation cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Neural Attention Search cites Efficient Streaming Language Models with Attention Sinks
  • Neural Attention Search cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Neural Attention Search cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Sparse VideoGen2: Accelerate Video Generation with Sparse Attention via Semantic-Aware Permutation cites Efficient Streaming Language Models with Attention Sinks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers54

  1. Neural Attention SearchDifan Deng, Marius LindauerNeurIPS 2025 · 431 citations
  2. Sparse VideoGen2: Accelerate Video Generation with Sparse Attention via Semantic-Aware PermutationShuo Yang, Haocheng Xi, Yilong Zhao, Muyang Li et al.NeurIPS 2025 · 114 citations
  3. Radial Attention: 𝒪(n log n) Sparse Attention with Energy Decay for Long Video GenerationXingyang Li, Muyang Li, Tianle Cai, Haocheng Xi et al.NeurIPS 2025 · 66 citations
  4. InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long AdaptationWeilin Zhao, Zihan Zhou, Zhou Su, Chaojun Xiao et al.ICLR 2026 · 32 citations
  5. Flow Caching for Autoregressive Video GenerationYuexiao Ma, Xuzhe Zheng, Jing Xu, Xiwei Xu et al.ICLR 2026 · 20 citations

Builds on22

  1. Scalable Diffusion Models with TransformersWilliam Peebles, Saining XieICCV 2023 · 5,568 citations
  2. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  3. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
  4. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  5. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations

Related papers

  1. VecAttention: Vector-wise Sparse Attention for Accelerating Long Context InferenceAnmin Liu, Ruixuan Yang, Huiqiang Jiang, Bin Lin et al.CVPR 2026 · 4 citations
  2. Token Sparse Attention: Efficient Long-Context Inference with Interleaved Token SelectionDongwon Jo, Beomseok Kang, Jiwon Song, jae-joon kimICML 2026 · 1 citation
  3. DuSA: Fast and Accurate Dual-Stage Sparse Attention Mechanism Accelerating Both Training and InferenceChong Wu, Jiawang Cao, Renjie Xu, Zhuoheng Ran et al.NeurIPS 2025 · 5 citations
  4. Evolving Sparsity: Leveraging Token Importance Dynamics for Efficient LLM Decoding with Sparse AttentionRuizi Han, Miao Zhang, Ziyue Qiao, Liqiang NieACL 2026
  5. A Unified Sparse Attention via Multi-Granularity CompressionSiran Liu, Zheng Cao, Yongchao HeICML 2026
Dusk over the sea between two cliffs drawn in fine vertical lines