高效模型与推理加速 · CVPR2026 ·2026.06.03

注意力手术:一种高效线性化视频扩散 Transformer 的配方

Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformer

Mohsen Ghafoorian、Denis Korzhenkov、Amirhossein Habibian

与你有关的部分

提出一种无需从头训练即可将预训练视频扩散 Transformer 中的 softmax 注意力替换为线性或混合注意力的高效框架,结合蒸馏与微调,显著降低长视频生成的计算成本,为视觉生成模型的高效部署提供可复用方案。

原文依据 We introduce Attention Surgery, an efficient framework that enables linear or hybrid attention in pretrained VDMs, eliminating the need for training from scratch.
可迁移到 视频生成扩散模型加速注意力机制优化

摘要译文

由模型翻译 · 术语统一 · 请对照原文核对关键结论

基于 Transformer 的视频扩散模型(VDM)能够实现最优的视频生成质量,但受限于自注意力的二次计算成本,导致长序列和高分辨率生成的计算开销巨大。尽管线性注意力提供了亚二次复杂度,但先前的方法除非以显著的计算成本重新训练,否则无法匹配 softmax 注意力的表达能力。我们提出了注意力手术(Attention Surgery),一个高效的框架,能够在预训练的 VDM 中启用线性或混合注意力,无需从头训练。受语言模型最新进展的启发,我们的方法结合了一种新颖的混合注意力机制(混合 softmax 和线性 token)与轻量级蒸馏和微调流程,仅需几个 GPU 天。此外,我们引入了一种成本感知的块速率策略,以平衡各层的表达能力和效率。应用于 Wan2.1 1.3B(一种最优的高效 Transformer VDM),并在 VBench、VBench2.0 和人类偏好研究上评估,注意力手术取得了有竞争力的结果。此外,移动端延迟、内存使用和浮点运算量的测量表明,在更长视频的扩展行为上取得了显著改进。

英文原文摘要 1250 字符

Transformer-based video diffusion models (VDMs) deliver state-of-the-art video generation quality but are constrained by the quadratic cost of self-attention, making long sequences and high resolutions computationally expensive. While linear attention offers sub-quadratic complexity, previous approaches have failed to match the expressiveness of softmax attention unless retrained at significant computational cost. We introduce Attention Surgery, an efficient framework that enables linear or hybrid attention in pretrained VDMs, eliminating the need for training from scratch. Inspired by recent advances in language models, our method combines a novel hybrid attention mechanism, mixing softmax and linear tokens, with a lightweight distillation and fine-tuning pipeline requiring only a few GPU-days. Additionally, we incorporate a cost-aware block-rate strategy to balance expressiveness and efficiency across layers. Applied to Wan2.1 1.3B, a state-of-the-art efficient transformer VDM and evaluated on VBench, VBench2.0 and a human preference study, Attention Surgery achieves competitive results. Furthermore, measurements of on-mobile latency, memory usage, and FLOPs demonstrate notable improvements in scaling behavior for longer videos.

标签

会议 CVPR2026
页码 32915-32925
Bibkey
来源 CVF Open Access