Scene-Graph Steering for Video Diffusion Models

Leonardo Stoppani1 Donald Shenaj1 Davide Bacciu1
1Department of Computer Science, University of Pisa

TL;DR — Text-to-video models often miss or misplace objects when a prompt names several relations. GraphSteer turns the prompt into a scene graph, scores every relation directly from the model's cross-attention, and steers a frozen generator towards all of them at once, with no layout and no retraining.

Wan2.2-A14B

“A yellow duck waddles along a path, to the right of a flowerpot and below a butterfly”

Base model
+ GraphSteer

01Abstract

Text-to-video diffusion models can generate remarkable videos, but still struggle when prompts involve multiple relations between objects, often missing or misplacing some of them. Existing approaches tackle this problem using box-based guidance to enforce the desired relations. However, this requires defining the scene layout in advance, manually or using an LLM, for every prompt. This makes the process impractical when scaling to more complex scenes, as it relies on a fixed layout that does not account for what the generator actually produces.

We address these limitations by introducing GraphSteer, a plug-and-play method that uses scene graphs to guide generation towards satisfying multiple relations, without requiring any predefined layout. GraphSteer represents the prompt as a scene graph, whose nodes are objects and whose edges describe their spatial relations. We design a Graph Scorer Module that scores every edge directly from cross-attention, so all relations are optimized through a single joint loss. We also observe that existing text-to-video benchmarks are not designed to evaluate multiple relations jointly, making it difficult to identify individual relation failures or assess whether all relations hold in the same video. To address this, we introduce multi-relation prompts and a global preference score based on pairwise VLM judgments. On CogVideoX-5b, GraphSteer improves the T2V-CompBench spatial score from 0.545 to 0.631 and multi-relation per-edge accuracy from 0.225 to 0.392. Finally, we show that GraphSteer transfers zero-shot to different video generation architectures, including Wan2.2-A14B and HunyuanVideo, without retraining.

02Base vs. GraphSteer

Same prompt, same seed, same initial noise. The only difference is GraphSteer acting on the first 8 of 50 denoising steps. Relations requested by the prompt are highlighted.

Single-relation prompts come from T2V-CompBench and are shown verbatim. Multi-relation prompts are shown in short form; those clips were generated from a longer, more descriptive version of the same prompt, identical for base and GraphSteer. Examples were picked by hand.

03How it works

Layout-based methods plan boxes from the text alone and never see what the generator produces. GraphSteer instead reads the relations off the generator's own attention while it denoises, and corrects them in place.

(1)❄ frozen LLM

Prompt → scene graph

An LLM parses the prompt into a graph: nodes are entities, edges are relations. Each edge is mapped to an axis (horizontal, vertical, depth) and a sign.

right of below bench dog kite
(2)🔥 the only trained part

Graph Scorer Module

Each entity's cross-attention maps from one DiT block are resampled to a fixed \(8{\times}16{\times}16\) grid and encoded as a node. A small GNN then outputs, for every edge \((i,j)\), a probability \(p^a_{ij}\) over the two signs of each axis \(a\).

horizontal
right of
vertical
below
depth
—
(3)steps 0–7 of 50

One loss, one update

Cross-entropy against the parsed targets is summed over all edges, plus a term that stops objects from vanishing. A normalized gradient step updates the latent during the first 8 steps; the generator stays frozen.

\[z_t \leftarrow z_t - \eta\,\frac{\nabla_{z_t}\mathcal{L}}{\lVert\nabla_{z_t}\mathcal{L}\rVert}\]
Overview of the GraphSteer pipeline
Pipeline. (1) An LLM parses the prompt into a scene graph with per-axis edge targets. (2) The Graph Scorer Module scores every edge on each named axis from the entity attention of the frozen video DiT, resampled to a resolution-free grid. (3) One loss over all edges compares these scores with the targets; its normalized gradient updates \(z_t\) during the first 8 denoising steps, then sampling continues unchanged.

Steering, as seen from the attention

Both runs start from the same latent, so at step 0 the scorer sees identical maps and gives “cyclist left of mailbox” a probability of 0.52.

Without guidance the cyclist drifts to the right of the mailbox: 0.02 at step 4, 0.19 at step 30. With GraphSteer it reaches 0.99 by step 4 and 1.00 afterwards. The “below” edge, already satisfied, stays satisfied.

Guidance stops at step 8, yet the arrangement persists to the final video: the early steps fix the layout, the rest fill in the details.

Entity attention maps with and without GraphSteer
Head-averaged cross-attention of the three entities on the middle latent frame (CogVideoX-5b). Dots mark attention centroids; numbers are the scorer's probabilities of the requested relations.

Layout-free

No boxes, no planner. Relations stay relative, as written in the prompt.

Frozen generator

Inference-time guidance only; the video model's weights are never touched.

Joint over the graph

Every relation shapes the same gradient, so fixing one edge does not break another.

Zero-shot transfer

Trained on CogVideoX attention, applied unchanged to Wan2.2, Wan2.1 and HunyuanVideo.

04Comparison with layout-based methods

Pick a method and compare it to GraphSteer. Layout-based methods can satisfy the planned boxes and still lose objects or relations in the final clip.

Base
GraphSteer

VideoTetris runs on VideoCrafter2 and TTOM on Wan2.1-14B with its own prompt enrichment and seed; other methods share backbone and seed. LVD at its released settings can remove objects and leave a flat background.

Show the full qualitative figure
Qualitative comparison of all methods

05Results

T2V-CompBench spatial
0.545→0.631
CogVideoX-5b
Multi-relation per-edge acc.
0.225→0.392
CogVideoX-5b
All relations hold
0.058→0.150
CogVideoX-5b, 2.6×
Zero-shot spatial
0.610→0.715
HunyuanVideo, no retraining

T2V-CompBench, spatial category

MethodLayout inputSpatial ↑
CogVideoX-5b
Base—0.545
+ ViCo—0.545
+ LVDLLM boxes0.504
+ Comp-AttnLLM boxes0.601
+ GraphSteernone0.631
HunyuanVideo
Base—0.610
+ GraphSteer (zero-shot)none0.715
Wan2.1-14B
Base—0.569
+ GraphSteer (zero-shot)none0.595

Multi-relation benchmark (CogVideoX-5b)

Our new prompt set states several relations per clip, so we can check each relation individually and whether all of them hold in the same video.

MethodLayoutleft/rightabove/belowfront/behindper-edgeall-rel.countGPU-min/clip ↓
Base—0.1250.5000.2350.2250.0580.5344.2
+ LVDLLM boxes0.1560.4550.0880.1920.0580.43211.7
+ Comp-AttnLLM boxes0.3830.5230.2790.3790.1330.6349.8
+ GraphSteernone0.3670.6360.2790.3920.1500.7405.3

A global preference score

Averaging independent per-category scores can reward methods tuned to individual categories. We also ask a VLM judge which of two clips better satisfies the whole prompt, in both presentation orders. A hard win requires both verdicts to agree.

vs. base
0.746
vs. LVD
0.863
vs. Comp-Attn
0.588
vs. VideoTetris
0.647

Hard win rate of GraphSteer on CogVideoX-5b; above 0.5 favours GraphSteer.

VLM-based global preference protocol
A real example in which GraphSteer wins in both presentation orders.

06BibTeX

@article{stoppani2026graphsteer,
  title   = {Scene-Graph Steering for Video Diffusion Models},
  author  = {Stoppani, Leonardo and Shenaj, Donald and Bacciu, Davide},
  journal = {arXiv preprint arXiv:2611.37241},
  year    = {2026}
}