SpargeAttention2: Trainable Sparse Attention via Hybrid Top-k+Top-p Masking and Distillation Fine-Tuning
cs.CV, cs.LG
Submitted: 2026-02-13
Updated: 2026-10-18
License: http://creativecommons.org/licenses/by/4.0/
The gist: Many training-free sparse attention methods are effective for accelerating diffusion models.
Terminology
Abstract
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.
Sources
- Qwen3-VL Technical Report
- Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasets
- Mixture of Contexts for Long Video Generation
- Sparse-vDiT: Unleashing the Power of Sparse Attention to Accelerate Video Diffusion Transformers
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- vAttention: Verified Sparse Attention
- LongNet: Scaling Transformers to 1,000,000,000 Tokens
- SeerAttention: Learning Intrinsic Sparse Attention in Your LLMs
- When Attention Sink Emerges in Language Models: An Empirical View
- Distilling the Knowledge in a Neural Network
- Identifying Sensitive Weights via Post-quantization Integral
- Residual Context Diffusion Language Models
- Cascadia: An Efficient Cascade Serving System for Large Language Models
- HunyuanVideo: A Systematic Framework For Large Video Generative Models
- FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inference
- Radial Attention: $O(n\log n)$ Sparse Attention with Energy Decay for Long Video Generation
- Twilight: Adaptive Attention Sparsity with Hierarchical Top-$p$ Pruning
- Flow Matching for Generative Modeling
- DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models
- FPSAttention: Training-Aware FP8 and Sparsity Co-Design for Fast Video Diffusion
Related papers
- Loss Knows Best: Detecting Annotation Errors in Videos via Loss Trajectories
- AnchorWeave: World-Consistent Video Generation with Retrieved Local Spatial Memories
- Benchmarking the Robustness of Foundation Models for Mammography under Domain Shift
- MambaX-Net: Dual-Input Mamba-Enhanced Cross-Attention Network for Longitudinal MRI Segmentation
- TeleOCR: Navigating Document Parsing Across Digital and Camera-Captured Documents
- A Survey on Efficient Vision-Language-Action Models