Radial Attention: $O(n\log n)$ Sparse Attention with Energy Decay for Long Video Generation
Xingyang Li, Muyang Li, Tianle Cai, Haocheng Xi, Shuo Yang, Yujun Lin, Lvmin Zhang, Songlin Yang, Jinbo Hu, Kelly Peng, Maneesh Agrawala, Ion Stoica, Kurt Keutzer, Song Han
TL;DR
The paper tackles the heavy computational burden of 3D attention in diffusion-based video generation by identifying Spatiotemporal Energy Decay and introducing Radial Attention, a static $O(n \log n)$ sparse pattern that preserves essential spatiotemporal interactions. By mapping energy decay to compute density, it constructs a 4D attention mask with dense central regions and progressively sparser outer bands, achieving substantial speedups while maintaining video fidelity across multiple backbones. It further enables efficient long-video generation via LoRA-based fine-tuning and demonstrates up to 4× longer video generation with reduced training costs and faster inference. The approach outperforms strong sparse baselines (SVG, STA, PA) in quality metrics and provides a practical pathway to scalable, high-fidelity long-video diffusion. The work also includes theoretical error bounds and ablations validating design choices, with open-source code to facilitate adoption.
Abstract
Recent advances in diffusion models have enabled high-quality video generation, but the additional temporal dimension significantly increases computational costs, making training and inference on long videos prohibitively expensive. In this paper, we identify a phenomenon we term Spatiotemporal Energy Decay in video diffusion models: post-softmax attention scores diminish as spatial and temporal distance between tokens increase, akin to the physical decay of signal or waves over space and time in nature. Motivated by this, we propose Radial Attention, a scalable sparse attention mechanism with $\mathcal{O}(n \log n)$ complexity that translates energy decay into exponentially decaying compute density, which is significantly more efficient than standard $\mathcal{O}(n^2)$ dense attention and more expressive than linear attention. Specifically, Radial Attention employs a simple, static attention mask where each token attends to spatially nearby tokens, with the attention window size shrinking with temporal distance. Moreover, it allows pre-trained video diffusion models to extend their generation length with efficient LoRA-based fine-tuning. Extensive experiments show that Radial Attention maintains video quality across Wan2.1-14B, HunyuanVideo, and Mochi 1, achieving up to a 1.9$\times$ speedup over the original dense attention. With minimal tuning, it enables video generation up to 4$\times$ longer while reducing training costs by up to 4.4$\times$ compared to direct fine-tuning and accelerating inference by up to 3.7$\times$ compared to dense attention inference. Code is released at \href{https://github.com/mit-han-lab/radial-attention}{https://github.com/mit-han-lab/radial-attention}.
