arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.22275cs.CVcs.AI
收藏

VMonarch:具有结构注意力的高效视频扩散变换器

VMonarch: Efficient Video Diffusion Transformers with Structured Attention

State Key Laboratory for Novel Software Technology, Nanjing University(新型软件技术国家重点实验室,南京大学);School of Intelligence Science and Technology, Nanjing University(智能科学与技术学院,南京大学);Kling Team, Kuaishou Technology(快手科技 Kling 团队)

Cheng Liang, Haoxian Chen, Liang Hou, Qi Fan, Gangshan Wu, Xin Tao, Limin Wang

AI总结:

VMonarch通过结构化注意力机制提升视频扩散变换器的效率,减少计算量并提高处理速度。

摘要:

视频扩散变换器(DiTs)的二次复杂度严重限制了上下文可扩展性。我们发现视频DiTs中表现出的高稀疏时空注意力模式可以自然地用Monarch矩阵表示。它是一类具有灵活稀疏性的结构矩阵,通过交替最小化算法实现子二次注意力。因此,我们提出了VMonarch,一种新的视频DiTs注意力机制,该机制能够通过结构化的Monarch矩阵对动态稀疏模式进行高效计算。首先,我们将时空Monarch分解适配到显式捕捉视频数据的帧内和帧间相关性。其次,我们引入了一种重新计算策略,以减轻Monarch矩阵交替最小化过程中产生的伪影。第三,我们提出了一种新的在线熵算法,与FlashAttention融合,实现了长序列的快速Monarch矩阵更新。大量实验表明,VMonarch在经过最小调整后,在VBench上实现了与全注意力相当或更优的生成质量。它克服了视频DiTs中的注意力瓶颈,将注意力FLOPs减少17.5倍,并在长视频的注意力计算中实现了超过5倍的速度提升,在90%稀疏度下超越了最先进的稀疏注意力方法。

英文摘要:

The quadratic complexity of the attention mechanism severely limits the context scalability of Video Diffusion Transformers (DiTs). We find that the highly sparse spatio-temporal attention patterns exhibited in Video DiTs can be naturally represented by the Monarch matrix. It is a class of structured matrices with flexible sparsity, enabling sub-quadratic attention via an alternating minimization algorithm. Accordingly, we propose VMonarch, a novel attention mechanism for Video DiTs that enables efficient computation over the dynamic sparse patterns with structured Monarch matrices. First, we adapt spatio-temporal Monarch factorization to explicitly capture the intra-frame and inter-frame correlations of the video data. Second, we introduce a recomputation strategy to mitigate artifacts arising from instabilities during alternating minimization of Monarch matrices. Third, we propose a novel online entropy algorithm fused into FlashAttention, enabling fast Monarch matrix updates for long sequences. Extensive experiments demonstrate that VMonarch achieves comparable or superior generation quality to full attention on VBench after minimal tuning. It overcomes the attention bottleneck in Video DiTs, reduces attention FLOPs by a factor of 17.5, and achieves a speedup of over 5x in attention computation for long videos, surpassing state-of-the-art sparse attention methods at 90% sparsity. Code is available at https://github.com/EricLina/VMonarch.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑