VSA: Faster Video Diffusion with Trainable Sparse Attention

Peiyuan Zhang, Haofeng Huang, Yongqi Chen, Will Lin, Zhengzhong Liu, Ion Stoica, Eric P. Xing, Hao Zhang

arXiv:2505.13389 · 2026-07-27 공개 · arXiv · PDF

diffusion-models transformer video-diffusion sparse-attention training-efficiency parameter-scaling hardware-efficient flashattention3

Abstract

Scaling video diffusion transformers (DiTs) is limited by their quadratic 3D attention, even though most of the attention mass concentrates on a small subset of positions. We turn this observation into VSA, a trainable, hardware-efficient sparse attention that replaces full attention at \emph{both} training and inference. In VSA, a lightweight coarse stage pools tokens into tiles and identifies high-weight \emph{critical tokens}; a fine stage computes token-level attention only inside those tiles subjecting to block computing layout to ensure hard efficiency. This leads to a single differentiable kernel that trains end-to-end, requires no post-hoc profiling, and sustains 85\% of FlashAttention3 MFU. We perform a large sweep of ablation studies and scaling-law experiments by pretraining DiTs from 60M to 1.4B parameters. VSA reaches a Pareto point that cuts training FLOPS by 2.53$\times$ with no drop in diffusion loss. Retrofitting the open-source Wan-2.1 model speeds up attention time by 6$\times$ and lowers end-to-end generation time from 31s to 18s with comparable quality. These results establish trainable sparse attention as a practical alternative to full attention and a key enabler for further scaling of video diffusion models. Code will be available at https://github.com/hao-ai-lab/FastVideo.

한국어 요약

한 줄 요약

VSA는 비디오 디퓨전 트랜스포머의 3D 어텐션 비용을 2.53× 절감하면서 정확도 유지하는 학습 가능한 스파스 어텐션 메커니즘입니다.

핵심 기여도

핵심 아이디어

VSA는 기존의 고정된 스파스 어텐션 대신, 학습 가능한 방식으로 중요한 토큰을 동적으로 식별합니다. 이는 두 단계로 구성됩니다:
1. **Coarse Stage**: (4,4,4) 크기의 토큰 큐브를 풀링하여 전역 맥락을 유지하면서 중요한 큐브를 식별합니다.
2. **Fine Stage**: Coarse Stage에서 식별된 상위 K개의 큐브 내에서만 토큰 수준의 어텐션을 계산합니다.
이 구조는 하드웨어 최적화된 블록-스파스 계산 레이아웃을 따르며, 최종 어텐션 출력은 두 단계의 결과를 미분 가능한 게이트로 결합합니다.
VSA는 학습 과정에서 토큰 중요도를 직접 학습함으로써, 기존 휴리스틱 기반의 스파스 어텐션에서 발생하는 학습-추론 불일치 문제를 해결합니다.

기술적 접근법

주요 결과

의의 및 한계

VSA는 비디오 디퓨전 모델의 확장성을 제한하는 3D 어텐션 비용 문제를 해결하며, 학습 가능한 스파스 어텐션의 실용성을 입증합니다. 특히, 기존 고정 패턴 기반 스파스 어텐션의 학습-추론 불일치 문제를 해결하고, 하드웨어 최적화를 통해 실제 성능 향상을 달성한 점이 주목할 만합니다.
하지만, VSA는 타일 크기와 스파스 비율을 정적으로 설정하며, 동적 조정 기법은 포함되지 않았습니다. 또한, 다양한 비디오 데이터셋에서의 일반화 성능은 아직 평가되지 않았습니다.

실용적 활용

VSA는 대규모 비디오 생성 모델의 학습 및 추론 비용을 줄이는 데 활용될 수 있으며, 특히 실시간 생성이 필요한 산업 분야(예: 스트리밍, VR/AR)에서 유용합니다. 또한, 비디오 생성 연구에서 모델 확장성과 효율성을 동시에 달성하는 데 기여할 수 있습니다.