TL;DR
Ask today’s flashiest text-to-video models to generate "A cat stretches after a dog yawns," and you'll get gorgeous fur textures—with the animals acting in the wrong order, simultaneously, or one not moving at all. LogicDirector fixes this without retraining a single weight. By translating prompts into mathematical logic and checking the model's internal attention maps during early generation, it steers video diffusion models to respect time, order, and cause-and-effect.
What Problem Does This Paper Address?
Text-to-video (T2V) models have gotten remarkably good at making photorealistic clips. Recent research has focused heavily on stitching together long, multi-shot stories using LLM-generated scripts. Yet a fundamental question went largely ignored: Do T2V models actually understand basic temporal words like "before," "after," "then," and "until" inside a single clip?
As it turns out, no. When given simple two-event prompts, even top-tier commercial models (like Veo 3.1, Kling 2.5, and Hailuo 2.0) routinely fail. They reverse chronological order, mash sequential events into simultaneous chaos, or take lazy shortcuts by dropping an event or entity entirely. Existing workarounds rely on clunky post-hoc "generate-and-fix" editing loops. The authors ask whether we can instead enforce strict temporal logic natively while the video is being born from noise.
Methods
LogicDirector is a test-time guidance framework—meaning it plugs into frozen, pre-trained video diffusion models at inference time. It works by turning a text prompt into an executable checklist and playing a game of "hot or cold" during the early denoising steps.
Here is what separates the standard diffusion pipeline from what’s new:
- From Text to Fuzzy Logic (Novel): Using GPT-4.1, the prompt is parsed into First-Order Logic predicates: Entities (
frog,bird), Actions (jumps onto,flies away), and Temporal Relations (BEFORE). Because neural networks speak in continuous numbers rather than strict Booleans, the authors use product fuzzy logic to relax these rules into continuous, smooth loss functions. - Cross-Attention as Evidence (Novel formulation): Standard T2V models use spatiotemporal cross-attention maps to link text tokens to 3D patches of video frames. LogicDirector reads these maps to verify three stacked constraints: (1) Existence (do the objects/actions show up?), (2) Action Binding (are the
frogtokens lighting up in the exact same pixels and frames asjumps?), and (3) Temporal Ordering (do the frame-level activations obey before, after, then, or until?). - Gradient-Free Best-of-n Search (Novel application): Normally, if you have a differentiable loss, you backpropagate gradients to nudge the noisy latent video. In massive T2V models, however, backprop eats absurd amounts of VRAM and tends to shove the latent off the natural data manifold, creating ugly visual artifacts. Instead, LogicDirector uses the logic score purely as a verifier. In the first 10 denoising steps, it estimates the clean video, re-injects slightly different Gaussian noise to create local candidate branches, runs a fast forward pass, and keeps the candidate with the lowest logic loss (repeating for $K$ mini-iterations per step).
Datasets
Because existing video benchmarks (like VBench or EvalCrafter) focus on aesthetics or coarse text alignment and include only a tiny handful of temporal prompts, the authors built TempBench.
- TempBench (New): A diagnostic suite of 200 two-event prompts evenly split across four canonical operators (before, after, until, then), spanning human, animal, and object interactions. Crucially, it uses a Vision-Language Model (Qwen3-VL-32B) for a strict hierarchical evaluation: a model gets zero credit for temporal order unless the verifier first confirms that all entities exist and both events actually occurred.
- VBench (Existing): Used alongside TempBench to ensure that enforcing logic doesn't ruin visual quality or motion smoothness.
Key Insights and Ideas
- Time failures are secretly grounding failures: Models rarely just "swap the order" cleanly. Temporal errors are deeply entangled with missing objects and misbound actions. In ablations, forcing entities to merely exist actually hurt event motion (models just rendered static objects!). Adding spatial action-entity binding was the key unlock that allowed temporal rules to work.
- "After" is much harder than "Then": Across open-source models, Then is the easiest operator because it aligns with natural narrative order ("do X, then do Y"). After ("do Y after X") requires syntax-to-chronology inversion, causing open-source models to crater to single-digit accuracy.
- Iterative nudging beats wide guessing: In their Best-of-$n$ search, doing 3 sequential refinement steps with just 1 new candidate per step ($K=3, n=1$) beat evaluating 3 parallel candidates at once—and took far less compute.
- Logic search accidentally boosts visual quality: Instead of degrading image quality like gradient-based guidance often does, LogicDirector improved VBench aesthetic and consistency scores. Why? Choosing latents with crisp, well-separated cross-attention maps naturally filters out blurry, artifact-ridden trajectories.
Key Results
- Open-source models struggle out of the box: Even a massive 14B-parameter open model (Wan2.1-14B) scored just 14.0% average temporal relation accuracy ($S_{rel}$) on TempBench. Commercial models fared better, with Hailuo 2.0 topping the leaderboard at 59.0%—showing that even SOTA industry models fail ~40% of the time.
- LogicDirector nearly doubles temporal accuracy: Plugged into CogVideoX-2B, LogicDirector boosted average $S_{rel}$ from 10.5% to 17.5% (and Until from 6.0% to 16.0%). On Wan2.1-1.3B, it jumped from 13.0% to 24.5%—allowing a 1.3B model to comfortably beat its 14B sibling (14.0%) on temporal reasoning.
- Modest overhead, better visuals: On CogVideoX-2B, inference time rose modestly from ~52s (minimal search) to 64s for the optimal setup, while VBench Image Quality jumped from 53.95 to 60.74.
Limitations and Future Work
LogicDirector currently handles two-event compositions across four canonical operators; it isn't yet built for sprawling, multi-event causal chains or nuanced temporal spacing (like distinguishing "immediately after" from "long after"). Furthermore, the verifier relies entirely on the backbone's internal cross-attention maps—if a base model's attention is fundamentally misaligned with what it renders, the verifier flies blind. Future work aims to expand to richer multi-event logic and explore stronger, lightweight internal signals for grounding.
Summary updated