Compositional Video Generation via Inference-Time Guidance

Ariel Shaulov, Eitan Shaar, Amit Edenzon, Gal Chechik, Lior WolfarXiv 2026

TL;DR

Compositional Video Generation (CVG) is a training-free, inference-time guidance method that significantly improves how text-to-video models handle complex, multi-entity prompts. By steering the early denoising steps using gradients from a lightweight classifier trained on internal cross-attention maps, CVG ensures precise spatial and temporal relations without retraining the video generator or requiring user-provided layouts.

What Problem Does This Paper Address?

State-of-the-art text-to-video (T2V) diffusion models excel at generating visually stunning, high-fidelity videos. However, they frequently stumble when prompts demand a precise understanding of composition—such as spatial relationships ("a goat in between two barrels"), specific motion directions ("turning left"), or exact counts ("five birds"). Standard text conditioning provides a global signal but fails to enforce these fine-grained spatiotemporal constraints, often leading to videos that are plausible but factually incorrect relative to the prompt.

Existing solutions typically involve retraining massive models, fine-tuning with reinforcement learning, or forcing users to provide bounding boxes and layouts. The authors of CVG ask a simpler question: Can we steer a frozen, pre-trained video generator to follow these complex instructions using only its own internal signals?

Qualitative comparison showing improved compositional faithfulness with CVG

Methods

CVG introduces an inference-time control framework based on a key insight: a diffusion model's internal cross-attention maps already encode how prompt concepts are grounded across space and time.

The method operates in two main phases:

  1. Training a Compositional Classifier: The authors extract subject-token cross-attention maps from a frozen T2V model. Crucially, they withhold the relation token itself (e.g., for "a dog moves behind a ball," the classifier only sees the attention maps for dog and ball). These maps are processed by a learned Aggregation Module, passed through a frozen Video-Language Model (VLM) backbone (Qwen2.5-VL-7B), and fed into a trainable classification head that predicts the spatial/motion relation.
  2. Inference-Time Guidance: During video generation, the classifier evaluates the evolving latent video at each denoising step. The cross-entropy loss between the classifier's prediction and the target relation is backpropagated to directly update and steer the latent trajectory ($z_t$). To preserve the generator's natural appearance priors, this guidance is only applied during the first 8 denoising steps, where coarse layout and motion are established.

To prevent the classifier from "cheating" by exploiting superficial textual traces in the attention maps (a phenomenon termed composition leakage), the authors implement a video analogue of dual inversion. During training, each video is inverted twice—once with the correct prompt and once with an incorrect relation prompt—but both are supervised using the same ground-truth label.

Figure 2: Overview of CVG. At inference time, CVG extracts subject-token cross-attention maps from a frozen text-to-video diffusion model and feeds them to a lightweight composition classifier. The classifier predicts the current compositional relation, and its loss with respect to the target compositional relation is backpropagated to update the latent. This provides composition-aware guidance without fine-tuning the generator or requiring external layout controls.

Datasets

The compositional classifier was trained and evaluated using a mix of real-world and synthetic datasets:

  • Training Data: Real-world video relations were sourced from VidOR and ImageNet-VidVRD to capture natural motion and object interactions. Synthetic video data was utilized from the VChain dataset to bolster coverage of rare spatial layouts.
  • Evaluation Benchmarks: The method was rigorously tested on T2V-CompBench (evaluating motion, numeracy, spatial relations, and interactions) and VBench / VBench-Long (to ensure overall video quality and temporal consistency were maintained).

Key Insights and Ideas

  • Attention Maps as Spatiotemporal Blueprints: Cross-attention maps are more than just alignment tools; they serve as low-resolution geometric and temporal maps of the scene that can be decoded by lightweight architectures.
  • Leveraging VLM Priors for Zero-Shot Generalization: By building the classifier on top of a frozen VLM, the system inherits a broad vision-language prior. This allows CVG to generalize to unseen composition labels. For example, even if the classifier wasn't explicitly trained on the word "between", it can infer the relationship at inference time by combining its learned primitives (next_to, in_front_of, behind) with the VLM's understanding of multi-object configurations.
  • The Power of Early Intervention: You don't need to guide the entire diffusion process. Tweaking just the first 8 steps locks in the correct macro-composition and motion trajectory, leaving the remaining steps free to refine textures, lighting, and fine visual details naturally.

Key Results

CVG was evaluated across multiple prominent T2V backbones, including CogVideoX-5B, Wan2.2-5B, and Wan2.2-14B, consistently outperforming both the base models and TTOM (a strong layout-guided baseline).

  • Quantitative Improvements: On VBench, CVG achieved the highest final scores across all backbones. For instance, it boosted Wan2.2-14B's Semantic Score from 82.6% to 89.2% while keeping the Quality Score stable, proving that composition improves without degrading visual fidelity.
  • T2V-CompBench Success: CVG showed massive gains in composition-sensitive dimensions like Motion and Spatial Relations, outperforming layout-based methods without requiring any user-defined bounding boxes.
  • Human Preference: A user study revealed that human raters significantly preferred CVG over TTOM for compositionality (39.6% vs 20.7% on Wan2.2-14B) and text alignment.
Table 1: VBench summary for short- and long-video generation. Comparison of base models with TTOM and CVG for short videos, and Rolling Forcing with TTOM and CVG for long videos.

Limitations and Future Work

While highly effective, CVG's performance is fundamentally bounded by the quality of the underlying generator's internal grounding signals; if the base model fails to localize an entity entirely, CVG cannot guide it. Additionally, the current framework is optimized for subject-centric compositions (clear foreground actors and actions) and may struggle with highly ambiguous prompts, subtle environmental compositions, or complex scenes featuring numerous interacting subjects.

The authors suggest that future work could extend this approach toward structured multi-entity composition graphs and automated temporal planning for multi-stage storyboarding.

Summary updated

BibTeX
@misc{shaulov2026compositional,
  author = {Ariel Shaulov and Eitan Shaar and Amit Edenzon and Gal Chechik and Lior Wolf},
  title = {{Compositional Video Generation via Inference-Time Guidance}},
  year = {2026},
  eprint = {2605.14988},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.14988},
}
Figure