Sparse VideoGen2: セマンティックアウェア順列によるスパースアテンションを用いたビデオ生成の高速化
Sparse VideoGen2: Accelerate Video Generation with Sparse Attention via Semantic-Aware Permutation
May 24, 2025
著者: Shuo Yang, Haocheng Xi, Yilong Zhao, Muyang Li, Jintao Zhang, Han Cai, Yujun Lin, Xiuyu Li, Chenfeng Xu, Kelly Peng, Jianfei Chen, Song Han, Kurt Keutzer, Ion Stoica
cs.AI
要旨
Diffusion Transformers(DiTs)はビデオ生成において不可欠であるが、アテンションの二次的な複雑さにより大きな遅延が生じる。重要なトークンのみを計算することで、スパースアテンションは計算コストを削減し、有望な高速化手法を提供する。しかし、既存の手法は同じ計算予算のもとで最適な生成品質に到達できないことが判明した。その理由は二つある:(1) 重要なトークンの識別が不正確であること:現在の手法は位置に基づいてトークンをクラスタリングするため、意味的には不正確な集約表現が生成される。(2) 過剰な計算の無駄:重要なトークンが非重要なトークンに散在しているため、連続したトークンの処理に最適化されたGPU上で計算が無駄になる。本論文では、SVG2というトレーニング不要のフレームワークを提案し、識別精度を最大化し、計算の無駄を最小化することで、生成品質と効率性の間のパレート最適なトレードオフを実現する。SVG2の核心は、意味的類似性に基づいてk-meansを用いてトークンをクラスタリングし並べ替える、意味認識型順列付けである。このアプローチにより、正確なクラスター表現が確保され、識別精度が向上するだけでなく、重要なトークンのレイアウトが密集化され、パディングなしで効率的な計算が可能となる。さらに、SVG2はトップ-p動的予算制御とカスタマイズされたカーネル実装を統合し、HunyuanVideoとWan 2.1においてそれぞれ最大30と26のPSNRを維持しながら、最大2.30倍および1.89倍の高速化を達成する。
English
Diffusion Transformers (DiTs) are essential for video generation but suffer
from significant latency due to the quadratic complexity of attention. By
computing only critical tokens, sparse attention reduces computational costs
and offers a promising acceleration approach. However, we identify that
existing methods fail to approach optimal generation quality under the same
computation budget for two reasons: (1) Inaccurate critical token
identification: current methods cluster tokens based on position rather than
semantics, leading to imprecise aggregated representations. (2) Excessive
computation waste: critical tokens are scattered among non-critical ones,
leading to wasted computation on GPUs, which are optimized for processing
contiguous tokens. In this paper, we propose SVG2, a training-free framework
that maximizes identification accuracy and minimizes computation waste,
achieving a Pareto frontier trade-off between generation quality and
efficiency. The core of SVG2 is semantic-aware permutation, which clusters and
reorders tokens based on semantic similarity using k-means. This approach
ensures both a precise cluster representation, improving identification
accuracy, and a densified layout of critical tokens, enabling efficient
computation without padding. Additionally, SVG2 integrates top-p dynamic budget
control and customized kernel implementations, achieving up to 2.30x and 1.89x
speedup while maintaining a PSNR of up to 30 and 26 on HunyuanVideo and Wan
2.1, respectively.Summary
AI-Generated Summary