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

arXiv:2610.39663 · 2026-11-01 공개 · arXiv · PDF

transformer video-diffusion psnr hunyuanvideo speedup tensor-core block-attention intra-block-clustering

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.6times as much, yet it still improves PSNR by up to 4.4~dB over the strongest baseline and achieves up to 2.23times end-to-end speedup. Our code is available at https://github.com/InfRec-Cardinal/AB-Attention.

한국어 요약

한 줄 요약

AB-Attention은 훈련 없이 3D 풀 어텐션을 고밀도 희소화하면서도 정확도를 유지하는 비디오 디퓨전 트랜스포머 최적화 기법이다.

핵심 기여도

핵심 아이디어

비디오 디퓨전 트랜스포머는 3D 풀 어텐션을 사용하지만, 이는 시퀀스 길이에 비례해 제곱 비용이 발생하여 추론 속도에 큰 부담을 준다. 기존의 블록-스파스 어텐션은 블록 중요도를 추정하여 일부만 계산하지만, 이는 **전역 클러스터링**이나 **토큰 재정렬**을 필요로 하며, **정확도 저하**를 초래한다.

AB-Attention은 이 문제를 해결하기 위해 **IBCS**를 도입하여, 블록 내부에서만 클러스터링을 수행함으로써 **토큰 재정렬 없이도 저비용으로 블록 중요도를 추정**한다. 또한, **SIP**를 통해 블록을 샘플링하고, **역수 포함 확률로 가중치를 재조정**하여 단일 패스로 풀 어텐션을 추정함으로써 **정확도 손실 없이 희소화**를 달성한다.

마지막으로, **타일보다 작은 블록을 선택**하고, 이를 **텐서 코어 타일로 패킹**하여 실행 효율을 유지하는 방식을 채택하여, **추가 비용 없이 정밀한 선택**을 가능하게 한다.

기술적 접근법

주요 결과

의의 및 한계

AB-Attention은 훈련 없이도 **고밀도 희소화**를 유지하면서 **정확도 손실 없이 어텐션을 추정**하는 점에서 혁신적이다. 특히, **IBCS와 SIP의 결합**은 기존 블록-스파스 어텐션의 주요 문제점(정확도 저하, 계산 비용 증가)을 해결하며, **텐서 코어 기반 실행 효율**도 유지한다.

그러나, AB-Attention은 **동일한 희소도 설정**에서만 비교되었으며, **다양한 희소도 조건**에서의 성능은 명시되지 않았다. 또한, **다른 비디오 생성 모델**에서의 일반화 가능성도 추가 실험을 통해 검증이 필요하다.

실용적 활용

AB-Attention은 **고해상도 및 장시간 비디오 생성**이 필요한 산업, 예를 들어, **콘텐츠 제작, VR/AR, 자동차 시뮬레이션** 등에서 유용하게 활용될 수 있다. 특히, **GPU 자원이 제한된 환경**에서 빠른 추론 속도와 높은 품질을 동시에 요구하는 경우에 적합하다.