提出VMoBA稀疏注意力机制,加速长视频生成训练与推理。
VMoBA: Mixture-of-Block Attention for Video Diffusion Models
- 分层递归块划分+全局/阈值选择,动态适应视频时空局部性。
- 训练加速2.92倍FLOPs,推理提速2.40倍,画质不降反升。
- 适合追求高效长视频生成的科研与工程人员。
全注意力机制的二次复杂度严重制约了视频扩散模型(VDMs)生成长时长、高分辨率视频的能力。尽管已有多种稀疏注意力方法,但多数为免训练推理加速器,或在原生训练中未能最优捕捉视频固有的时空特性。本文提出视频混合块注意力(VMoBA),基于预训练视频变压器中注意力模式的深入分析,发现显著的时空局部性、查询重要性差异及头间注意力集中程度不同,对原始MoBA框架进行三项改进:(1)采用分层递归块划分(1D-2D-3D)以动态适配多样时空注意力模式并提升效率;(2)引入全局块选择,优先保留整个注意力头中最显著的查询-键块交互;(3)基于阈值的块选择,依据累积相似度动态确定关注块数量。大量实验表明,VMoBA显著加速长序列下VDMs的训练,实现2.92倍FLOPs和1.48倍延迟速度提升,生成质量与全注意力相当甚至更优。此外,在免训练推理中表现优异,高分辨率视频生成实现2.40倍FLOPs和1.35倍延迟加速。
原文摘要 · Abstract (English)
The quadratic complexity of full attention mechanisms poses a significant bottleneck for Video Diffusion Models (VDMs) aiming to generate long-duration, high-resolution videos. While various sparse attention methods have been proposed, many are designed as training-free inference accelerators or do not optimally capture the unique spatio-temporal characteristics inherent in video data when trained natively. This paper introduces Video Mixture of Block Attention (VMoBA), a novel sparse attention mechanism specifically adapted for VDMs. Motivated by an in-depth analysis of attention patterns within pre-trained video transformers, which revealed strong spatio-temporal locality, varying query importance, and head-specific concentration levels, VMoBA enhances the original MoBA framework with three key modifications: (1) a layer-wise recurrent block partition scheme (1D-2D-3D) to dynamically adapt to diverse spatio-temporal attention patterns and improve efficiency; (2) global block selection to prioritize the most salient query-key block interactions across an entire attention head; and (3) threshold-based block selection to dynamically determine the number of attended blocks based on their cumulative similarity. Extensive experiments demonstrate that VMoBA significantly accelerates the training of VDMs on longer sequences, achieving 2.92x FLOPs and 1.48x latency speedup, while attaining comparable or even superior generation quality to full attention. Furthermore, VMoBA exhibits competitive performance in training-free inference, offering 2.40x FLOPs and 1.35x latency speedup for high-res video generation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。