AdaCluster:面向视频生成的稀疏注意力自适应查询-键聚类
AdaCluster: Adaptive Query-Key Clustering for Sparse Attention in Video Generation
对做视频扩散 Transformer 推理加速的人,这篇给出了一个免训练的稀疏注意力方案:对 query 用保角相似度的聚类、对 key 用保欧氏相似度的聚类,并配合按阈值自适应确定簇数与关键簇选择,可直接套到 CogVideoX、HunyuanVideo、Wan 等 DiT 主干上换取 1.67x–4.31x 加速。
原文依据 a training-free adaptive clustering framework that accelerates the generation of DiTs while preserving accuracy
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论视频扩散 Transformer(DiT)因注意力复杂度呈二次增长而承受难以承受的推理延迟。现有稀疏注意力方法要么忽略语义相似性,要么无法适应不同层之间异构的词元分布,从而导致模型性能下降。我们提出 AdaCluster,一个免训练的自适应聚类框架,在保持精度的同时加速 DiT 的生成。AdaCluster 对查询向量采用保持角度相似性的聚类方法以获得更高压缩率,并为键设计了保持欧氏相似性的聚类方法,涵盖簇数分配、按阈值的自适应聚类以及高效的关键簇选择。在单块 A40 GPU 上于 CogVideoX-2B、HunyuanVideo 和 Wan-2.1 上的实验表明,最高可达 1.67 倍至 4.31 倍的加速,且质量下降可忽略不计。
英文原文摘要 877 字符
Video diffusion transformers (DiTs) suffer from prohibitive inference latency due to quadratic attention complexity. Existing sparse attention methods either overlook semantic similarity, or fail to adapt to heterogeneous token distributions across layers, leading to model performance degradation. We propose AdaCluster, a training-free adaptive clustering framework that accelerates the generation of DiTs while preserving accuracy. AdaCluster applies an angle-similarity preserving clustering method to query vectors for higher compression, and designs a euclidean-similarity preserving clustering method for keys, covering cluster number assignment, threshold-wise adaptive clustering, and efficient critical cluster selection. Experiments on CogVideoX-2B, HunyuanVideo, and Wan-2.1 via one A40 GPU demonstrate up to 1.67x-4.31x speedup with negligible quality degradation.