2025-05-20 · 专家 · 计算机视觉

Faster Video Diffusion with Trainable Sparse Attention

本文提出了一种可训练的稀疏注意力机制VSA,用于加速视频扩散Transformer模型的训练和推理,在保证模型质量不下降的情况下显著降低了计算量。

更新于 2025-05-20。作者:Peiyuan Zhang、Haofeng Huang、Yongqi Chen、Will Lin、Zhengzhong Liu、Ion Stoica、Eric P. Xing、Hao Zhang。

中文摘要

缩放视频扩散变换器 (DiT) 受限于其二次 3D 注意力机制,即使大部分注意力都集中在少量位置上。我们将这一观察结果转化为 VSA,这是一种可训练的、硬件高效的稀疏注意力机制,可在训练和推理过程中替代完全注意力机制。在 VSA 中,轻量级的粗略阶段将 tokens 池化成 tiles 并识别高权重的关键 tokens;精细阶段仅在这些 tiles 内计算 token 级别的注意力,并服从块计算布局以确保硬件效率。这导致了一个单一的可微内核,可以端到端训练,不需要事后分析,并且保持了 85% 的 FlashAttention3 MFU。我们通过对参数从 6000 万到 14 亿的 DiT 进行预训练,进行了大量的消融研究和缩放定律实验。VSA 达到了帕累托最优,将训练 FLOPS 降低了 2.53 倍,而扩散损失没有下降。对开源 Wan-2.1 模型进行改进,可将注意力时间加快 6 倍,并将端到端生成时间从 31 秒缩短到 18 秒,同时保持了相当的质量。这些结果表明,可训练的稀疏注意力机制是完全注意力机制的实用替代方案,也是进一步扩展视频扩散模型的关键因素。

英文摘要

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 both training and inference. In VSA, a lightweight coarse stage pools tokens into tiles and identifies high-weight 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.53times with no drop in diffusion loss. Retrofitting the open-source Wan-2.1 model speeds up attention time by 6times 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.

解读

一句话总结

本文提出了一种可训练的稀疏注意力机制VSA,用于加速视频扩散Transformer模型的训练和推理,在保证模型质量不下降的情况下显著降低了计算量。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源