The year/Independent research

Paper 2509.24006

SLA: Beyond Sparsity in Diffusion Transformers via Fine-Tunable Sparse-Linear Attention

Published
Sep 2025
Research lab
Independent
Citations
44
GitHub
328 stars

01 In brief

Summary

The paper introduces SLA (Sparse-Linear Attention), a trainable attention method for Diffusion Transformers (DiTs) that combines sparse and linear attention to reduce computational cost.

The authors observe that attention weights can be decomposed into a small fraction of large weights with high rank and a large fraction of low-rank weights.

SLA classifies attention blocks into critical, marginal, and negligible, applying exact attention to critical blocks, linear attention to marginal blocks, and skipping negligible ones.

This approach achieves high sparsity (95%) without quality loss.

Experiments on Wan2.1-1.3B show a 20x reduction in attention computation, a 13.7x speedup in the attention kernel, and a 2.2x end-to-end speedup in video generation, with quality comparable to full attention.

SLA outperforms baselines like VSA, VMoBa, and SpargeAttn in both quality and efficiency.

The method requires only a few fine-tuning steps (e.g., 2000 steps) and is implemented as a fused GPU kernel supporting both forward and backward passes.

Ablation studies confirm the effectiveness of fusing sparse and linear attention, with softmax as the best activation function and a top-5% critical threshold providing the best trade-off.

The code is available at https://github.com/thu-ml/SLA.

The paper also includes experiments on image generation with LightningDiT, where SLA achieves better FID than full attention at 87.5% sparsity.

Additional optimizations like lookup tables and pre-aggregation are discussed in the appendix.

The work addresses limitations of existing sparse and linear attention methods, which struggle to achieve high sparsity or maintain quality in video diffusion models.

SLA's design leverages the low-rank structure of non-critical…

02 From the paper

Abstract

In Diffusion Transformer (DiT) models, particularly for video generation, attention latency is a major bottleneck due to the long sequence length and the quadratic complexity. We find that attention weights can be separated into two parts: a small fraction of large weights with high rank and the remaining weights with very low rank. This naturally suggests applying sparse acceleration to the first part and low-rank acceleration to the second. Based on this finding, we propose SLA (Sparse-Linear Attention), a trainable attention method that fuses sparse and linear attention to accelerate diffusion models. SLA classifies attention weights into critical, marginal, and negligible categories, applying O(N^2) attention to critical weights, O(N) attention to marginal weights, and skipping negligible ones. SLA combines these computations into a single GPU kernel and supports both forward and backward passes. With only a few fine-tuning steps using SLA, DiT models achieve a 20x reduction in attention computation, resulting in significant acceleration without loss of generation quality. Experiments show that SLA reduces attention computation by 95% without degrading end-to-end generation quality, outperforming baseline methods. In addition, we implement an efficient GPU kernel for SLA, which yields a 13.7x speedup in attention computation and a 2.2x end-to-end speedup in video generation on Wan2.1-1.3B. The code is available at https://github.com/thu-ml/SLA.