Manuscript Offprint

arXiv:2610.39663

AB-Attention: Accurate Block Attention for Accelerating Video Diffusion Transformers

Bin Xu, Mo Zhang, Zhengfeiyang Zhang, Xinfeng Yang, Yixing Ma, Wei Wang, HeXin Wang, Pengfei Zhou, Wangbo Zhao

Abstract

Video diffusion transformers generate high-quality videos, but the quadratic cost of 3D full attention dominates their inference. Dynamic block-sparse attention reduces this cost by computing exact attention only on key/value blocks selected from current activations. However, its fidelity degrades under aggressive sparsity: blocks are scored from coarse summaries or formed by costly global clustering, pruned blocks vanish from the softmax, and whole tiles are kept or dropped even when only a few of their keys matter. To address these limitations, we propose Accurate Block Attention (AB-Attention), a training-free method that accurately approximates dense attention at high sparsity. Its Intra-Block Clustering Selector (IBCS) estimates block importance faithfully yet cheaply by clustering queries only within each query block, without permuting tokens. Sampling with Inclusion-Probability Weighting (SIP) then samples blocks in proportion to these estimates and reweights them by inverse inclusion probability, so that one pass estimates dense attention rather than truncating it. Finally, its kernel gathers key/value blocks much smaller than a tile into full tensor-core tiles, refining selection at no extra tensor-core cost. On Wan2.1 and HunyuanVideo, AB-Attention skips 89–92% of attention, whereas the baselines compute 1.8–3.6× as much, yet it still improves PSNR by up to 4.4 dB over the strongest baseline and achieves up to 2.23× end-to-end speedup. Our code is available at https://github.com/InfRec-Cardinal/AB-Attention.

Dense attention

1.00× speedup

(a) Prompt: By a fog-enshrouded lakeside, an old boat gently sways, reeds by the lake sway with the wind, ...

Reference

AB-Attention (Ours)

1.84× speedup

PSNR = 31.19 dB

SVG2

1.50× speedup

PSNR = 28.85 dB

DFSAttn

1.65× speedup

PSNR = 27.14 dB

Radial

1.63× speedup

PSNR = 27.88 dB

Figure

(b) Prompt: On the computer keyboard, a mini puppy jumps on different letter keys.

Reference

PSNR = 33.14 dB

PSNR = 31.10 dB

PSNR = 29.44 dB

PSNR = 28.77 dB

Figure

Figure 1 | Examples on Wan2.1-T2V-14B, with one frame and an enlarged region per method. AB-Attention is closest to dense attention in full-video PSNR while achieving the highest speedup.

Contents

1 Introduction 3
2 Preliminaries 4
3 Methodology 4
3.1 Intra-Block Clustering Selector (IBCS) 5
3.2 Sampling with Inclusion-Probability Weighting (SIP) 6
3.3 Fine-Grained Selection with Tiled Execution 7
4 Experiments 7
4.1 Experimental Setup 7
4.2 Main Results 8
4.3 Ablation Study 10
5 Related Work 11
6 Conclusion 11
References 13
A Sampling and Estimation Details 19
A.1 Query Centroids and Pooled Keys 19
A.2 Systematic Sampling Without Replacement 19
A.3 Weighted Attention Estimation 19
B Implementation Details 19
B.1 AB-Attention 19
B.2 Baselines 20
C Evaluation Protocol 20
D Additional Ablation Results 20

References (51)