S2AG-Vid: Enhancing Multi-Motion Alignment in Video Diffusion Models via Spatial and Syntactic Attention-Based Guidance

Yuanhang Li, Qi Mao, Lan Chen, Zhen Fang, Lei Tian, Xinyan Xiao, Libiao Jin, Hua WuarXiv 2024 · DOI

TL;DR

StarVid is a training-free, plug-and-play framework designed to resolve "semantic misalignment" in text-to-video (T2V) generation. By integrating LLM-based trajectory planning with spatial and syntactic constraints on cross-attention maps, it ensures that multi-subject videos accurately reflect complex prompts, where specific objects perform designated actions in precise locations.

The Compositional Challenge in T2V

Despite the rapid advancement of diffusion-based video models, they frequently struggle with "compositional" prompts involving multiple subjects and actions. For instance, a prompt like "a man walking and a dog sitting" often results in two primary failures:

  1. Subject Count Mismatch: The model may omit a subject or generate an incorrect number of entities.
  2. Incorrect Motion Binding: Subjects may swap actions (e.g., the dog walks while the man sits), a phenomenon known as "motion leakage."
StarVid corrects subject neglect and motion leakage compared to baseline models.

These issues stem from Cross-Attention (CA) maps. In early denoising stages, noun-related attention maps often fail to converge into distinct regions, and verb-related maps do not consistently "stick" to their corresponding nouns. StarVid addresses this by strengthening the semantic "glue" between text and temporal modules.

The StarVid Framework

StarVid introduces a three-pronged, training-free approach to refocus attention maps:

1. Two-Stage LLM Motion Planner

StarVid utilizes an LLM (e.g., GPT-4o) as a "director" to plan scene layout:

  • Reasoning Stage: The LLM parses the prompt to identify subjects, counts, and specific motions.
  • Prediction Stage: It generates a sequence of bounding boxes (trajectories) for each subject, ensuring physical consistency (e.g., perspective and gravity).

2. Spatial-Aware Attention Refocusing ($L_{sp}$)

The LLM-generated trajectories serve as spatial priors. StarVid applies a loss function during early denoising to force CA maps for nouns and verbs into these bounding boxes, using foreground and background losses to concentrate attention and prevent unintended subject placement.

3. Syntax-Guided Contrastive Constraint ($L_{syt}$)

To prevent motion leakage, StarVid leverages the prompt's linguistic structure. A contrastive loss pulls a verb's CA map closer to its specific noun while pushing it away from unrelated words. A multi-frame strategy ensures temporal smoothness, preventing subjects from flickering or changing appearance.

Experimental Results

The authors evaluated StarVid using the Action Binding Benchmark (from T2V-CompBench) and a new, more complex LLM-Generated Benchmark featuring prompts with three or more subjects.

StarVid enables high-fidelity generation of multi-subject scenes with distinct, well-aligned motions.

Key quantitative findings include:

  • Human Preference: Users preferred StarVid over the ZeroScope baseline 94% of the time.
  • Semantic Alignment: Action Binding scores improved significantly, rising from 0.551 to 0.674 on ZeroScope and 0.531 to 0.724 on VideoCrafter2.
  • Numeracy: Subject count accuracy nearly doubled in complex scenarios compared to base models.

Insights and Limitations

A key insight is that while CA maps capture motion trajectories, they are too "blurry" early on. Refocusing them at the start of generation bakes the correct layout into the latent space. Furthermore, syntactic binding is essential; spatial boxes alone cannot prevent a verb's attention from leaking into a neighbor's region.

However, StarVid introduces computational overhead, with inference times roughly 3x longer than baselines due to latent optimization at each step. It also requires significant VRAM (approx. 30GB for ZeroScope). Future work will focus on acceleration techniques and testing on more advanced backbone models.

Summary updated

Abstract

Recent advances in text-to-video (T2V) generation with diffusion models have garnered significant attention. However, they typically perform well in scenes with a single object and motion, struggling in compositional scenarios with multiple objects and distinct motions to accurately reflect the semantic content of text prompts. To address these challenges, we propose \textbf{StarVid}, a plug-and-play, training-free method that improves semantic alignment between multiple subjects, their motions, and text prompts in T2V models. StarVid first leverages the spatial reasoning capabilities of large language models (LLMs) for two-stage motion trajectory planning based on text prompts. Such trajectories serve as spatial priors, guiding a spatial-aware loss to refocus cross-attention (CA) maps into distinctive regions. Furthermore, we propose a syntax-guided contrastive constraint to strengthen the correlation between the CA maps of verbs and their corresponding nouns, enhancing motion-subject binding. Both qualitative and quantitative evaluations demonstrate that the proposed framework significantly outperforms baseline methods, delivering videos of higher quality with improved semantic consistency.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
VideoCrafter2 · quantitative comparisonS²AG-Vid on VideoCrafter2Pick Score21.34+0.14 vs baselineText to Video Generation
Source quote
L500: Ours │ 0.96 │ 21.34 │ 28.66
VideoCrafter2 · quantitative comparisonS²AG-Vid on VideoCrafter2CLIP-T28.66+1.17 vs baselineText to Video Generation · backbone=CLIP
Source quote
L500: Ours │ 0.96 │ 21.34 │ 28.66
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
VideoCrafter2 · quantitative comparisonVideoCrafter2 baselinePick Score21.20Text to Video Generation
Source quote
L499: VideoCrafter2~\cite{chen2024videocrafter2} │ 0.96 │ 21.20 │ 27.49
VideoCrafter2 · quantitative comparisonVideoCrafter2 baselineCLIP-T27.49Text to Video Generation · backbone=CLIP
Source quote
L499: VideoCrafter2~\cite{chen2024videocrafter2} │ 0.96 │ 21.20 │ 27.49
BibTeX
@misc{li2024s,
  author = {Yuanhang Li and Qi Mao and Lan Chen and Zhen Fang and Lei Tian and Xinyan Xiao and Libiao Jin and Hua Wu},
  title = {{S2AG-Vid: Enhancing Multi-Motion Alignment in Video Diffusion Models via Spatial and Syntactic Attention-Based Guidance}},
  year = {2024},
  eprint = {2409.15259},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.15259},
}
Figure