atlas

Research map / Architectures and efficiency / Attention and transformers

XAttention: Block Sparse Attention with Antidiagonal Scoring

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Block-sparse attention kernels · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes XAttention, a training-free block-sparse attention method that scores attention blocks by strided antidiagonal sums plus threshold-based block selection and per-head threshold tuning, achieving near-full accuracy with up to 13.5x prefill attention speedup.

Problem

Quadratic attention cost in long-context transformers makes prefill expensive; existing block-sparse methods have costly block-importance estimation that trades off accuracy and efficiency.

Approach

Use the sum of strided antidiagonal values within each attention block as a cheap proxy for block importance, then select the minimal set of blocks whose softmax-normalized antidiagonal mass exceeds a threshold, with per-head thresholds tuned by dynamic programming.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use antidiagonal scoring instead of random or diagonal scoring (ablation)XAttention · RULERaccuracy: 82.53 -> 90.75; 76.47 -> 90.75Helped
Increase the antidiagonal stride to 64 (ablation)XAttention · RULER Avg.accuracy: 88.47 -> 81.21Hurt
Use stride 4 instead of stride 8 (ablation)XAttention · RULER Avg.accuracy: 88.47 -> 88.89Helped
Replace threshold block selection with Top K (ablation)XAttention · RULER Avg.accuracy: 88.47 -> 84.13Hurt
Replace threshold block selection with fixed Ratio (ablation)XAttention · RULER Avg.accuracy: 88.47 -> 85.42Hurt
Use dynamically predicted minimum thresholds instead of fixed τ=0.9 (ablation)XAttention · RULER Avg.accuracy: 84.96 -> 88.47Helped
Use stride 16 rather than stride 8 (ablation)XAttention · RULER Avg.accuracy: 88.47 -> 88.08Mixed
Raise the VBench threshold from 0.90 to 0.95 (ablation)XAttention on HunyuanVideo · VBenchPSNR: 21.5 -> 23.5Helped
Raise the VBench threshold from 0.90 to 0.95 (ablation)XAttention on HunyuanVideo · VBenchDensity: 34.4 -> 45.5Hurt
Use five full-attention warmup steps before XAttention (ablation)XAttention on HunyuanVideo · VBenchvisual fidelityHelped
Use XAttention instead of full attentionLlama-3.1-8B-Instruct · LongBench Avg.score: 40.34 -> 40.60Helped
Use XAttention instead of full attentionQwenVL-2-7B · Video-MME Overall w/accuracy: 69.2 -> 69.1No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: RULER LongBench Video-MME VBench

Benchmarks: RULER LongBench Video-MME VBench

Metrics: accuracy density attention speedup PSNR SSIM LPIPS

Baselines: FlashAttention MInference FlexPrefill SeerAttention

Builds on: MInference FlexPrefill FlashAttention

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy