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

SpargeAttention2: 通过混合Top-k+Top-p掩码和蒸馏微调实现可训练稀疏注意力

SpargeAttention2: Trainable Sparse Attention via Hybrid Top-k+Top-p Masking and Distillation Fine-Tuning

Tsinghua University(清华大学)

Jintao Zhang, Kai Jiang, Chendong Xiang, Weiqi Feng, Yuezhou Hu, Haocheng Xi, Jianfei Chen, Jun Zhu

AI总结:

SpargeAttention2通过混合Top-k+Top-p掩码和蒸馏微调,实现高稀疏性且不降低生成质量。

摘要:

许多无需训练的稀疏注意力方法在加速扩散模型方面效果显著。最近,一些研究指出,使稀疏注意力可训练可以进一步提高稀疏性同时保持生成质量。我们研究了三个关键问题:(1)当两种常见的掩码规则,即Top-k和Top-p失效时,如何避免这些失效?(2)为什么可训练稀疏注意力可以达到比无训练方法更高的稀疏性?(3)使用扩散损失微调稀疏注意力的局限性是什么,如何解决这些问题?基于此分析,我们提出了SpargeAttention2,一种可训练稀疏注意力方法,能够在不降低生成质量的情况下实现高稀疏性。SpargeAttention2包括(i)一种结合Top-k和Top-p的混合掩码规则,以在高稀疏性下实现更稳健的掩码,(ii)一种高效的可训练稀疏注意力实现,以及(iii)一种受蒸馏启发的微调目标,以在使用稀疏注意力微调时更好地保持生成质量。在视频扩散模型上的实验表明,SpargeAttention2实现了95%的注意力稀疏性和16.2倍的注意力加速速度,同时保持生成质量,一致优于先前的稀疏注意力方法。

英文摘要:

Many training-free sparse attention methods are effective for accelerating diffusion models. Recently, several works suggest that making sparse attention trainable can further increase sparsity while preserving generation quality. We study three key questions: (1) when do the two common masking rules, i.e., Top-k and Top-p, fail, and how can we avoid these failures? (2) why can trainable sparse attention reach higher sparsity than training-free methods? (3) what are the limitations of fine-tuning sparse attention using the diffusion loss, and how can we address them? Based on this analysis, we propose SpargeAttention2, a trainable sparse attention method that achieves high sparsity without degrading generation quality. SpargeAttention2 includes (i) a hybrid masking rule that combines Top-k and Top-p for more robust masking at high sparsity, (ii) an efficient trainable sparse attention implementation, and (iii) a distillation-inspired fine-tuning objective to better preserve generation quality during fine-tuning using sparse attention. Experiments on video diffusion models show that SpargeAttention2 reaches 95% attention sparsity and a 16.2x attention speedup while maintaining generation quality, consistently outperforming prior sparse attention methods.

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

↑