ChatPaper.aiChatPaper

방사형 주의력: 장기 비디오 생성을 위한 에너지 감소를 통한 O(nlog n) 희소 주의력

Radial Attention: O(nlog n) Sparse Attention with Energy Decay for Long Video Generation

June 24, 2025
저자: 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
cs.AI

초록

최근 확산 모델의 발전으로 고품질 비디오 생성이 가능해졌지만, 추가된 시간 차원으로 인해 계산 비용이 크게 증가하여 긴 비디오에 대한 학습과 추론이 현실적으로 불가능해졌습니다. 본 논문에서는 비디오 확산 모델에서 '시공간 에너지 감쇠(Spatiotemporal Energy Decay)'라고 명명한 현상을 발견했습니다. 이는 소프트맥스 이후의 어텐션 점수가 토큰 간의 공간적 및 시간적 거리가 증가함에 따라 감소하는 현상으로, 자연에서 신호나 파동이 공간과 시간에 따라 감쇠하는 물리적 현상과 유사합니다. 이를 바탕으로, 우리는 O(n log n) 복잡도를 가지며 에너지 감쇠를 지수적으로 감소하는 계산 밀도로 변환하는 확장 가능한 희소 어텐션 메커니즘인 'Radial Attention'을 제안합니다. 이는 표준 O(n^2) 밀집 어텐션보다 훨씬 효율적이며 선형 어텐션보다 표현력이 뛰어납니다. 구체적으로, Radial Attention은 각 토큰이 공간적으로 가까운 토큰에 주의를 기울이고, 시간적 거리에 따라 어텐션 윈도우 크기가 줄어드는 간단한 정적 어텐션 마스크를 사용합니다. 또한, 사전 학습된 비디오 확산 모델이 효율적인 LoRA 기반 미세 조정을 통해 생성 길이를 확장할 수 있도록 합니다. 광범위한 실험을 통해 Radial Attention이 Wan2.1-14B, HunyuanVideo, Mochi 1에서 비디오 품질을 유지하면서 원래의 밀집 어텐션 대비 최대 1.9배의 속도 향상을 달성함을 보여줍니다. 최소한의 조정으로 최대 4배 더 긴 비디오 생성을 가능하게 하며, 직접 미세 조정 대비 최대 4.4배의 학습 비용 절감과 밀집 어텐션 추론 대비 최대 3.7배의 추론 가속화를 실현합니다.
English
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 O(n log n) complexity that translates energy decay into exponentially decaying compute density, which is significantly more efficient than standard 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.9times speedup over the original dense attention. With minimal tuning, it enables video generation up to 4times longer while reducing training costs by up to 4.4times compared to direct fine-tuning and accelerating inference by up to 3.7times compared to dense attention inference.
PDF303July 2, 2025