Understanding Attention Mechanism in Video Diffusion Models
Bingyan Liu, Chengyu Wang, Tongtong Su, Huan Ten, Jun Huang, Kailing Guo, Kui Jia
TL;DR
This paper analyzes how spatial and temporal attention in diffusion-based video diffusion models (VDMs) influence frame quality, motion, and structure. By perturbing attention maps with identity $I$ and uniform $U$ matrices and evaluating via entropy $\\mathcal{H}$ and energy $\\mathcal{E}$, it reveals that high-entropy attention maps correlate with better imaging quality while low-entropy maps carry structural information. It introduces information entropy-driven adaptation (IE-Adapt), a lightweight, training-free approach that leverages entropy cues to (i) enhance video synthesis during denoising and (ii) enable text-guided video editing by entropy-aware layer intervention. The methods are validated across multiple datasets and VDMs, showing improvements in video quality metrics and editing fidelity, with practical guidance on which layers to perturb. The work offers a principled lens on attention in VDMs and establishes a foundation for entropy-guided manipulation to improve both generation and editing in video diffusion pipelines.
Abstract
Text-to-video (T2V) synthesis models, such as OpenAI's Sora, have garnered significant attention due to their ability to generate high-quality videos from a text prompt. In diffusion-based T2V models, the attention mechanism is a critical component. However, it remains unclear what intermediate features are learned and how attention blocks in T2V models affect various aspects of video synthesis, such as image quality and temporal consistency. In this paper, we conduct an in-depth perturbation analysis of the spatial and temporal attention blocks of T2V models using an information-theoretic approach. Our results indicate that temporal and spatial attention maps affect not only the timing and layout of the videos but also the complexity of spatiotemporal elements and the aesthetic quality of the synthesized videos. Notably, high-entropy attention maps are often key elements linked to superior video quality, whereas low-entropy attention maps are associated with the video's intra-frame structure. Based on our findings, we propose two novel methods to enhance video quality and enable text-guided video editing. These methods rely entirely on lightweight manipulation of the attention matrices in T2V models. The efficacy and effectiveness of our methods are further validated through experimental evaluation across multiple datasets.
