Sparsity Should Be ALLOTted by Output: Training-Free Allocation of Block-Sparse Attention for Video Diffusion Transformers
Organizations: UCAS · CASIA · KlingAI Research · PKU
Abstract
Full 3D attention is costly in video Diffusion Transformers. Block-sparse attention reduces this cost by computing only selected attention blocks. However, existing methods either overlook the potential to optimize sparsity allocation or rely on heuristic rules or local metrics to guide it. In this work, we observe that sparsifying attention in different layers and at different denoising steps affects final-video fidelity to substantially different degrees. Yet the identities of the most sensitive layer-step pairs remain nearly unchanged across inputs. Building on these findings, we propose Allocating Layer-step Latency by Output Tests (ALLOT), a training-free sparsity allocation method. Treating each layer-step pair as a cell, ALLOT estimates each cell's contribution to final-video error through (i) cell probing and (ii) trajectory calibration, then jointly optimizes cell densities under a measured-latency budget. It preserves existing selection strategies and kernels, replacing only the allocation component. At equal or shorter wall-clock time, ALLOT outperforms every compared allocation strategy with XAttention, with an 11.8 dB PSNR gain on HunyuanVideo. Extensive experiments across four additional published pipelines on Wan2.1, Wan2.2, and HunyuanVideo show that ALLOT outperforms or ties the default in all nine settings.
Figures & tables
| Allocation | PSNR | SSIM | LPIPS | VBench | Wall-clock (s) | Speedup |
|---|---|---|---|---|---|---|
| Dense | — | — | — | 72.35 | 183.8 | 1.00 |
| Default | 18.14 | 0.659 | 0.268 | 70.27 | 148.7 | 1.24 |
| CalibAtt-style | 19.67 | 0.700 | 0.222 | 70.79 | 149.6 | 1.23 |
| ALLOT | 25.37 | 0.835 | 0.106 | 71.24 | 148.6 | 1.24 |
| HEART (EBC) | 19.43 | 0.699 | 0.221 | 72.02 | 151.7 | 1.21 |
| Efficient-vDiT | 19.08 | 0.702 | 0.225 | 72.32 | 151.1 | 1.22 |
| Pipeline & setup | Allocation | PSNR | SSIM | LPIPS | VBench | Wall-clock (s) | Speedup |
|---|---|---|---|---|---|---|---|
| Wan2.1-1.3B 480p 81 | Default | 22.67 | 0.768 | 0.150 | 70.03 | 147.7 | 1.24 |
| SpargeAttn | + ALLOT | 27.70 | 0.876 | 0.070 | 71.58 | 145.8 | 1.26 |
| Wan2.1-1.3B 720p 81 | Default | 26.44 | 0.832 | 0.143 | 71.71 | 448.9 | 1.62 |
| Radial | + ALLOT | 26.83 | 0.837 | 0.138 | 71.08 | 441.5 | 1.65 |
| Wan2.1-1.3B 720p 81 | Default | 24.25 | 0.808 | 0.151 | 71.09 | 410.9 | 1.66 |
| SVG2 | + ALLOT | 25.60 | 0.819 | 0.156 | 70.75 | 410.5 | 1.66 |
| Model & setup | Speedup | PSNR (uniform ALLOT) | PSNR vs. uniform | PSNR vs. strengthened | |
|---|---|---|---|---|---|
| Wan2.1-1.3B, 480p 33 | 1.14 | 32 | 19.59 25.99 | 6.40 | 2.55 |
| Wan2.1-14B, 720p 81 | 1.29 | 16 | 24.87 31.25 | 6.38 | 0.76 |
| Wan2.2-A14B, 480p 33 | 1.09 | 32 | 19.36 25.86 | 6.50 | 1.67 |
| Module | Replaced with | PSNR | PSNR |
|---|---|---|---|
| — | ALLOT | 26.39 | — |
| Cell prob. | Same density for all layers | 25.32 | 1.07 |
| Traj. cal. | 19.34 | 7.05 | |
| Per-cell solve | Parametric shape rule | 24.63 | 1.76 |
| Latency table | Density-proportional cost | 26.27 | 0.12 |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Most sensitive layer | Ratio | Rank: coverage density | Rank: | Spearman (coverage, ) | Spearman ( , ) | |
|---|---|---|---|---|---|---|---|
| Wan2.1-1.3B | 0.85 | 0 | 53 | 3/30 | 1/30 | ||
| Wan2.1-1.3B | 0.45 | 1 | 27 | 26/30 | 26/30 | ||
| Wan2.1-1.3B | 0.15 | 0 | 15 | 1/30 | 1/30 | ||
| Wan2.1-14B | 0.85 | 0 | 154 | 22/40 | 13/40 | ||
| Wan2.1-14B | 0.45 | 0 | 75 | 11/40 | 6/40 | ||
| Wan2.1-14B | 0.15 | 0 | 71 | 7/40 | 4/40 |
| Window | Steps | Wan2.1-1.3B | Wan2.1-14B | Wan2.2-A14B | HunyuanVideo |
|---|---|---|---|---|---|
| 1 | 0–4 | 10.71 (463) | 10.70 (186) | 12.95 (109) | 20.89 (69) |
| 2 | 5–9 | 18.46 (78) | 16.99 (44) | 18.48 (31) | 23.55 (38) |
| 3 | 10–14 | 23.19 (26) | 21.89 (14) | 24.28 (8) | 28.43 (12) |
| 4 | 15–19 | 26.46 (12) | 26.77 (5) | 25.36 (6) | 33.12 (4) |
| 5 | 20–24 | 29.58 (6) | 27.73 (4) | 26.70 (5) | 36.74 (2) |
| 6 | 25–29 | 32.61 (3) | 30.13 (2) | 29.74 (2) | 38.34 (1) |
| Test | Reading | Conclusion |
|---|---|---|
| Separability: single layer sparse over all steps (§ E.3 ) | ranking of the 6 layers identical on 1.3B and HunyuanVideo, Spearman 0.94 on 14B; ratio between the most and the least sensitive layer predicted 9.3 , measured 4.8 (1.3B), predicted 146 , measured 7.7 (14B), predicted 286 , measured 30 (HunyuanVideo) | ranking holds, magnitude compressed |
| Layer groups within one window: final MSE per unit of measured injected energy | at density 0.05, largest/smallest group ratio 2.17 [1.89, 2.50] in window 4 and 1.25 [0.91, 1.71] in window 6; energy-matched layer 0/comparison-group ratios in windows 1–2 are 0.56–0.82 ( ) | point estimates within in window 6 and the energy-matched early windows; 2.17 in window 4 |
| Across steps: two windows sparse together sum of each alone | over 7 window pairs, 1.3B 0.86–1.26 and 14B 0.83–1.36; adjacent windows within steps 15–34 super-additive by 1.16–1.36 (4 of 6 pairs at , ) | approximately additive |
| Across layers: all layers sparse together sum of each layer alone | 1.3B 6.5 at high noise to 1.1 at low noise, 14B 1.9 to 0.8, HunyuanVideo 0.74–0.89 to 1.2–1.5; for two layers sparse together within one step, median ratio | not additive in magnitude; absorbed by |
| Additive prediction of isolated probes vs. marginals measured in context | Spearman: 1.3B 0.63 in the deployed table’s context and 0.36 in a uniform 0.15 context; HunyuanVideo 0.77 in the deployed table’s context | less accurate in sparser contexts |
| Additive prediction vs. final video for arbitrary tables (80 tables, § E.5 ) | Kendall : pooled 0.83 ( 0.90), within one budget 0.78 (per budget 0.70 / 0.77 / 0.86); by family of tables: convex combinations 0.91, jitters 0.82, random tables 0.72, log–log slopes 0.98–1.14 / 0.48–0.75 / 0.26–0.44 | rankings within one budget usable; weaker for tables further from the solved ones |
| Assignment | PSNR | PSNR | Additive-model prediction |
|---|---|---|---|
| ALLOT | 25.99 | – | 0.37 |
| Shuffle layers within each step | 22.60 | [ , ] 0/32 | 1.07 |
| Shuffle steps within each layer | 13.77 | [ , ] 0/32 | 10.6 |
| Fully random (seed 1) | 10.21 | [ , ] 0/32 | 45.6 |
| Fully random (seed 0) | 9.82 | [ , ] 0/32 | 56.1 |
| Reversed estimate | 7.95 | [ , ] 0/32 | 146 |
| Model and mask | Window | Sparse | Random signs | Gaussian |
|---|---|---|---|---|
| 1.3B, top- | 1 | 10.71 | 29.57 | 25.68 |
| 1.3B, top- | 5 | 29.58 | 38.55 | 38.64 |
| 1.3B, sliding window | 1 | 9.16 | 28.23 | 26.66 |
| 1.3B, sliding window | 5 | 26.21 | 38.23 | 38.48 |
| 14B, top- | 1 | 10.70 | 25.93 | 26.54 |
| 14B, top- | 5 | 27.73 | 37.17 | 37.45 |
| Model | Cell probes | Trajectory gain | Latency table | Total |
|---|---|---|---|---|
| Wan2.1-1.3B | 2.8 | 3.1 | minutes | 6 |
| Wan2.1-14B | 17.4 | shared with 1.3B | minutes | 17 |
| HunyuanVideo | 18.9 | 3.8 | minutes | 23 |
| Setting | Baseline | PSNR | SSIM | LPIPS | DISTS | Verdict | |
|---|---|---|---|---|---|---|---|
| XAttention 1.3B 480p 81 (ALLOT at the default’s wall-clock time) | default | 32 | 32/0 | 32/0 | 32/0 | 31/1 | win |
| XAttention 1.3B 480p 81 | HEART (EBC) | 32 | 32/0 | 32/0 | 32/0 | 31/1 | win |
| XAttention 1.3B 480p 81 (TMR on both sides) | HEART (EBC + TMR) | 32 | 32/0 | 32/0 | 32/0 | 31/1 | win |
| XAttention 1.3B 720p 81 (ALLOT at the default’s wall-clock time) | default | 32 | 32/0 | 32/0 | 32/0 | 29/3 | win |
| XAttention 1.3B 720p 81 (ALLOT at the default’s wall-clock time) | HEART (EBC) | 32 | 32/0 | 32/0 | 31/1 | 27/5 | win |
| XAttention 1.3B 720p 81 (TMR on both sides) | HEART (EBC + TMR) | 32 | 32/0 | 32/0 | 31/1 | 28/4 | win |
| Setting | Construction | Dense cells | Time (s) | PSNR | SSIM | LPIPS | DISTS |
|---|---|---|---|---|---|---|---|
| Dense | – | 1500 | 183.8 | – | – | – | – |
| Default | 5 dense steps; threshold 0.90 | 150 | 148.7 | 18.14 | 0.659 | 0.268 | 0.154 |
| Default, density cutoff | Default per-cell densities; density cutoff | 150 | 151.5 | 20.41 | 0.745 | 0.181 | 0.111 |
| HEART (EBC) | Per-head thresholds; integer programming | 150 | 151.7 | 19.43 | 0.699 | 0.221 | 0.130 |
| HEART (EBC + TMR) | EBC + cross-step mask reuse | 150 | 145.0 | 19.54 | 0.706 | 0.214 | 0.128 |
| Efficient-vDiT | Per-layer density; layers 0–2 dense | 285 | 151.1 | 19.08 | 0.702 | 0.225 | 0.133 |
| Allocation | PSNR | SSIM | LPIPS | VBench | Wall-clock (s) | Speedup |
|---|---|---|---|---|---|---|
| Dense | — | — | — | 70.99 | 595.4 | 1.00 |
| Default (threshold 0.90) | 15.65 | 0.568 | 0.476 | 65.62 | 481.3 | 1.24 |
| HEART (EBC) | 16.61 | 0.608 | 0.428 | 67.20 | 483.0 | 1.23 |
| ScalingAttention (FAST) | 20.33 | 0.705 | 0.328 | 67.72 | 494.4 | 1.20 |
| ALLOT | 27.49 | 0.875 | 0.122 | 69.96 | 481.4 | 1.24 |
| Allocation | PSNR | SSIM | LPIPS | VBench | Wall-clock (s) |
|---|---|---|---|---|---|
| Dense | — | — | — | 71.12 | 715.9 |
| Default (threshold 0.90) | 21.16 | 0.731 | 0.287 | 71.08 | 499.3 |
| HEART (EBC) | 22.36 | 0.762 | 0.241 | 71.05 | 498.5 |
| ALLOT | 27.51 | 0.841 | 0.146 | 72.07 | 493.2 |
| HEART (EBC + TMR) | 22.17 | 0.751 | 0.252 | 70.73 | 441.5 |
| ALLOT + TMR | 27.38 | 0.835 | 0.152 | 72.02 | 442.3 |
| Pipeline | Wan2.1-1.3B | Wan2.1-14B | Wan2.2-A14B | HunyuanVideo |
|---|---|---|---|---|
| SpargeAttn | 183.8 | – | – | – |
| Radial | 728.1 | 3576.1 | – | 3192.3 |
| SVOO | 700.1 | 3406.0 | 3355.9 | 3225.5 |
| SVG2 | 682.9 | – | – | – |
| Setting | Baseline | PSNR | SSIM | LPIPS | DISTS | Verdict | |
|---|---|---|---|---|---|---|---|
| SVOO 14B 720p | default | 32 | 32/0 | 31/1 | 31/1 | 30/2 | win |
| SVOO Wan2.2 720p | default | 32 | 32/0 | 32/0 | 32/0 | 32/0 | win |
| SVOO 1.3B 720p | default | 32 | 21/11 | 14/18 | 9/23 | 4/28 | tie |
| SVOO HunyuanVideo 720p 129 | default | 32 | 31/1 | 30/2 | 29/3 | 29/3 | win |
| Setting | Baseline | PSNR | SSIM | LPIPS | DISTS | Verdict | |
|---|---|---|---|---|---|---|---|
| SpargeAttn 1.3B 480p 81, official configuration | default | 32 | 32/0 | 32/0 | 32/0 | 32/0 | win |
| SpargeAttn 1.3B 720p, official configuration | default | 32 | 31/1 | 29/3 | 28/4 | 23/9 | win |
| SpargeAttn 1.3B 720p, retuned | default | 32 | 31/1 | 30/2 | 28/4 | 27/5 | win |
| Setting | Baseline | PSNR | SSIM | LPIPS | DISTS | Verdict | |
|---|---|---|---|---|---|---|---|
| Radial 1.3B 720p, decay 0.2 | default | 32 | 26/6 | 24/8 | 23/9 | 21/11 | win |
| Radial 1.3B 720p, decay 1.0 | default | 32 | 30/2 | 26/6 | 25/7 | 23/9 | win |
| Radial 14B 720p | default | 32 | 28/4 | 28/4 | 28/4 | 29/3 | win |
| Radial HunyuanVideo 720p 129 | default | 32 | 16/16 | 18/14 | 12/20 | 16/16 | tie |
| Setting | Baseline | PSNR | SSIM | LPIPS | DISTS | |
|---|---|---|---|---|---|---|
| XAttention 1.3B 480p 81 | same density for all layers (trajectory gain only) | 32 | 2/30 | 1/31 | 2/30 | 3/29 |
| XAttention 1.3B 480p 81 | trajectory gain all 1 | 32 | 0/32 | 0/32 | 0/32 | 1/31 |
| XAttention 1.3B 480p 81 | parametric shape rule | 32 | 1/31 | 1/31 | 1/31 | 3/29 |
| XAttention 1.3B 480p 81 | density-proportional cost | 32 | 14/18 | 20/12 | 16/16 | 20/12 |
| Setting | PSNR / LPIPS / DISTS | PSNR | LPIPS W/L | DISTS W/L |
|---|---|---|---|---|
| ALLOT | 25.99 / 0.098 / 0.107 | – | – | – |
| Same density for all layers (trajectory gain only) | 22.77 / 0.189 / 0.177 | [ , ] 0/32 | 0/32 | 0/32 |
| Trajectory gain all 1 | 14.33 / 0.389 / 0.187 | [ , ] 0/32 | 0/32 | 2/30 |
| Parametric shape rule | 24.86 / 0.121 / 0.129 | [ , ] 0/32 | 0/32 | 0/32 |
| Model and setting | Speedup | Uniform baseline | Strengthened baseline | ALLOT | ALLOT strengthened baseline | ALLOT uniform baseline | |
|---|---|---|---|---|---|---|---|
| Wan2.1-14B, 720p 81 | 1.29 | 16 | 24.87 | 30.49 | 31.25 | [ , ] 15/1 | [ , ] 16/0 |
| Wan2.1-1.3B, 480p 33 | 1.14 | 32 | 19.59 | 23.44 | 25.99 | [ , ] 32/0 | [ , ] 32/0 |
| Wan2.1-14B, 480p 33 | 1.09–1.11 | 32 | 19.20 | 27.26 | 27.85 | [ , ] 28/4 | [ , ] 32/0 |
| Wan2.2-A14B, 480p 33 | 1.09 | 32 | 19.36 | 24.20 ∗ | 25.86 | [ , ] 32/0 ∗ | [ , ] 32/0 |
| HunyuanVideo, 480p 33 | equal density | 32 | 27.82 | 27.46 | 28.42 | [ , ] 24/8 | [ , ] 22/10 |
| Budget | 10 | 15 | 20 | 25 | 30 | 35 | ALLOT | ALLOT best | ALLOT | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.20 | 16.92 | 19.73 | 20.23 | 19.13 | 15.84 | – | – | 22.79 | [ , ] 32/0 | [ , ] 32/0 |
| 0.30 | 17.85 | 21.00 | 22.71 | 23.44 | 23.14 | – | – | 25.99 | [ , ] 32/0 | [ , ] 32/0 |
| 0.45 | – | – | 25.15 | 26.74 | 27.77 | 28.60 | 29.05 | 31.15 | [ , ] 32/0 | [ , ] 32/0 |
| Variable | Change | Agreement (%) | Correlation of ’s shape |
|---|---|---|---|
| Probing videos | 4 1 | XAttention 96.1–98.5; mean-pooled: 1.3B 95.2–98.0, 14B 97.9–98.4, HunyuanVideo 93.4–96.3 | – |
| Probing videos | 4 2 | XAttention 95.7–99.3; mean-pooled: 1.3B 96.7–97.5, 14B 98.5–99.4, HunyuanVideo 96.7–97.7 | – |
| Calibration prompts | 8 1 | XAttention 92.3–98.5; mean-pooled: 1.3B 89.1–98.5, HunyuanVideo 86.1–97.9 | – |
| Calibration prompts | 8 4 | 96.7–99.4 | – |
| Window density | 0.30 0.15 / 0.50 | XAttention 98.9 / 98.5; mean-pooled 99.6 / 97.1 | 0.995 / 0.995 |
| Window selection strategy | mean-pooled SpargeAttn | 96.5 / 96.0 (two budgets) | 0.993 |
| Setting | Allocation | PSNR | SSIM | LPIPS | Wall-clock (s) |
|---|---|---|---|---|---|
| 30 steps | Default | 19.87 | 0.696 | 0.232 | 92.5 |
| ALLOT | 25.80 | 0.830 | 0.110 | 91.9 | |
| CFG 7.5 | Default | 17.68 | 0.668 | 0.255 | 150.1 |
| ALLOT | 24.48 | 0.827 | 0.101 | 147.7 | |
| Euler sampler | Default | 18.79 | 0.664 | 0.278 | 147.8 |
| ALLOT | 25.97 | 0.832 | 0.113 | 147.1 |
Sparse Attention
Sparse attention reduces the token interactions computed by Transformers to lower the cost of long-context modeling and inference.
See all 244 papers