SpargeAttention2: Trainable Sparse Attention durch hybride Top-k+Top-p-Maskierung und Distillation-Fine-Tuning
SpargeAttention2: Trainable Sparse Attention via Hybrid Top-k+Top-p Masking and Distillation Fine-Tuning
February 13, 2026
papers.authors: Jintao Zhang, Kai Jiang, Chendong Xiang, Weiqi Feng, Yuezhou Hu, Haocheng Xi, Jianfei Chen, Jun Zhu
cs.AI
papers.abstract
Viele trainierungsfreie Sparse-Attention-Methoden sind effektiv zur Beschleunigung von Diffusionsmodellen. Kürzlich haben mehrere Arbeiten nahegelegt, dass trainierbare Sparse-Attention eine höhere Sparsity bei Erhalt der Generierungsqualität ermöglichen kann. Wir untersuchen drei Schlüsselfragen: (1) Wann versagen die beiden gängigen Maskierungsregeln, Top-k und Top-p, und wie können wir diese Fehler vermeiden? (2) Warum kann trainierbare Sparse-Attention eine höhere Sparsity als trainierungsfreie Methoden erreichen? (3) Was sind die Grenzen des Fine-Tunings von Sparse-Attention mittels Diffusionsverlust, und wie können wir diese adressieren? Basierend auf dieser Analyse schlagen wir SpargeAttention2 vor, eine trainierbare Sparse-Attention-Methode, die hohe Sparsity ohne Qualitätseinbußen erreicht. SpargeAttention2 umfasst (i) eine hybride Maskierungsregel, die Top-k und Top-p für robustere Maskierung bei hoher Sparsity kombiniert, (ii) eine effiziente Implementierung trainierbarer Sparse-Attention und (iii) einen distillationsinspirierten Fine-Tuning-Ansatz zum besseren Erhalt der Generierungsqualität während des Fine-Tunings mit Sparse-Attention. Experimente mit Video-Diffusionsmodellen zeigen, dass SpargeAttention2 bei 95 % Attention-Sparsity und 16,2-facher Beschleunigung die Generierungsqualität erhält und dabei bestehende Sparse-Attention-Methoden konsistent übertrifft.
English
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.