文本生成视频的时序规范指南
摘要
丰田研究院与宾夕法尼亚大学提出时序规格引导(TSG),一种免训练的推理时框架,将时序逻辑规格转化为可微目标,通过梯度引导注意力偏置来改善文本到视频模型对顺序、时序与持续性约束的遵循,在五个模型上比无分类器引导(CFG)提升9.5–20个百分点的规格满足率。
查看缓存全文
缓存时间: 2026/10/16 06:51
# Temporal Specification Guidance for Text-to-Video Generation
Source: [https://arxiv.org/html/2610.20822](https://arxiv.org/html/2610.20822)
Hideki OkamotoAffiliation:Toyota Motor North America \(R&D\)Bardh HoxhaAffiliation:Toyota Motor North America \(R&D\)Georgios FainekosAffiliation:Toyota Motor North America \(R&D\)Rajeev AlurAffiliation:University of Pennsylvania
###### Abstract
Text\-to\-video models often generate the visual concepts requested in natural language prompts but fail to satisfy their intended ordering, timing, and persistence requirements\. We propose representing these requirements as specifications in a formal Temporal Logic, and introduceTemporal Specification Guidance \(TSG\), a training\-free inference\-time framework that turns temporal specifications into executable objectives for guiding video generation during sampling\. TSG scores traces of visual concept evidence using differentiable quantitative semantics and uses the score’s gradients to construct a specification\-guided denoising direction\. We instantiate this framework with video–text attention traces, efficient differentiable scores for Metric Temporal Logic, and gradient\-derived attention biases\. This instantiation requires neither an external concept classifier nor backpropagation through the video transformer\. Its attention\-steered forward pass yields a denoising direction that augments classifier\-free guidance \(CFG\)\. On a benchmark of 220 prompts spanning 11 categories of temporal constraints, including ordered object entry and state transitions, this instantiation improves specification satisfaction accuracy over CFG by 9\.5–20 percentage points across five models, with minimal memory overhead\. These results demonstrate the potential of temporal specifications and differentiable satisfaction objectives as a flexible interface for controlling video generation\.
## 1Introduction
Frame 4Frame 12Frame 20Frame 28Frame 36Frame 44Atraffic lightturnsyellowin the first third,redin the middle third, andgreenin the final third\.CFG\-only
TSG
Frame 4Frame 12Frame 20Frame 28Frame 36Frame 44Adroneremains visible throughout; aflare signalor astranded hikerappears in the second half\.CFG\-only
TSG
Figure 1:TSG improves adherence to temporal requirements\.Top:CFG produces an amber light for the first two\-thirds while TSG follows the expected yellow–red–green progression\.Bottom:CFG omits both requested rescue cues; TSG generates a flame signal while retaining the drone\. Videos are generated with CogVideoX\-5B\.Text\-to\-Video generation has seen tremendous progress in recent years, with models such as Gemini Omni\([Google DeepMind, 2026](https://arxiv.org/html/2610.20822#bib.bib8)\), Runway Gen\([Esser et al\., 2023](https://arxiv.org/html/2610.20822#bib.bib5);[Runway, 2025](https://arxiv.org/html/2610.20822#bib.bib21)\), Wan\([Wan et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib27)\), and CogVideoX\([Yang et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib30)\)producing videos with improved visual quality and semantic fidelity\. Classifier\-Free Guidance\([Ho & Salimans, 2022](https://arxiv.org/html/2610.20822#bib.bib12)\)was introduced to improve adherence to natural language prompts in image generation and is now widely adopted by video generation models\([Ho et al\., 2022b](https://arxiv.org/html/2610.20822#bib.bib14);[Ho et al\., 2022a](https://arxiv.org/html/2610.20822#bib.bib13)\)\. However, adherence to temporal constraints remains challenging\([Choi et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib3);[Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)\. Figure[1](https://arxiv.org/html/2610.20822#S1.F1)shows two examples of such failures with CogVideoX\-5B\. While the model broadly incorporates the semantic concepts described in the text prompts \(e\.g\., the presence of a traffic light or a drone\), it fails to follow the required ordering, persistence, and timing requirements\. In these examples, the model misses the intended timed color progression and the eventual appearance of a hiker or a flare signal, respectively\.
In this work, we propose expressing temporal requirements as specifications in formal Temporal Logics\. Formal temporal specifications can precisely express requirements that are implicitly described in natural language prompts\. Frame\-level visual concepts, such as the presence of a traffic light or the associated colors, can be represented as atomic propositions\. Temporal Logics offer standard Boolean operators \(negation, conjunction, and disjunction\) and temporal operators such as Always \(𝐆\\mathbf\{G\}\), Until \(𝐔\\mathbf\{U\}\), and Eventually \(𝐅\\mathbf\{F\}\) to express persistence and ordering requirements\. In this work, we present a specification language adopted from Metric Temporal Logic\([Koymans, 1990](https://arxiv.org/html/2610.20822#bib.bib17)\)to express temporal requirements with different degrees of timing precision\. Representations of temporal requirements from prior work, including timed binary masks\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)and untimed Temporal Logic formulae\([Choi et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib3)\), can also be written as specifications in this language\.
We proposeTemporal Specification Guidance\(TSG\), a training\-free inference\-time framework for improving adherence to temporal specifications with transformer\-based video generation models\. Our key insight is that temporal specifications provide an executable objective for guiding video generation during sampling\. TSG makes this practical through differentiable specification scores and attention interventions that avoid backpropagation through the video transformer\. Concretely, TSG computes traces of visual concept evidence using video\-text attention from the video transformer\. For every attention head, TSG computes biases as gradients of a differentiable specification score, steers the attention scores with these biases, and computes the specification\-guided direction from the steered forward pass through the video transformer\. Our use of attention as a proxy for visual concept presence builds on prior work on attention\-based semantic guidance in image and video generation\([Chefer et al\., 2023](https://arxiv.org/html/2610.20822#bib.bib2);[Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)\. The use of video\-text attention mitigates the need for an external concept classifier during generation\. Because differentiation is restricted to the attention\-derived traces and their specification scores, TSG avoids backpropagation through the video transformer, reducing the associated computational and memory demands\.
We compute a differentiable specification score over attention traces using a quantitative semantics for Metric Temporal Logic\. Inspired by efficient log\-domain quantitative semantics for Linear Temporal Logic\([Khare et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib16)\), our quantitative semantics aggregates support for the temporal witnesses and alternatives admitted by a specification\. Its log\-domain form provides differentiable guidance and can be efficiently evaluated in time linear in trace length for a fixed specification\. We establish monotonicity in independent literal\-support inputs and predictable concept\-score gradient signs under consistent polarity\.
We evaluate TSG on a benchmark of 220 prompts spanning temporal constraints from 11 categories, including timed state transitions, entity appearance and disappearance, persistence, and choice\. Across five models from the CogVideoX\([Yang et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib30)\)and Wan\([Wan et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib27)\)families, TSG improves specification satisfaction accuracy by 9\.5–20 percentage points over CFG\-only sampling\. We also evaluate TSG with Wan 2\.1 1\.3B on strictly\-timed prompts from the TempoControl object appearance benchmark\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\), where it outperforms CFG sampling by up to 22 percentage points in temporal accuracy and matches the state\-of\-the\-art method on that benchmark with approximately 62% lower peak GPU memory\. Together, these findings support specification\-guided attention steering as an effective and memory efficient approach to temporal control in video generation\.
## 2Temporal constraints as formal specifications
Natural Language prompts to video generation models discuss the visual concepts that must be present in the video, along with the order and optionally the timing of their appearance\. In this section, we discuss a formal specification language for these constraints\.
Letℳ\\mathcal\{M\}represent a Text\-to\-Video \(T2V\) generation model that takes a text promptppas input and outputs a videov=\[v1,…,vT\]v=\[v\_\{1\},\\ldots,v\_\{T\}\]withTTdiscrete frames\. LetCCdenote the set of all frame\-level visual concepts of interest\. Examples of such visual concepts include entity presence \(e\.g\., traffic light\), entity states \(e\.g\., the color red\), and settings with properties \(e\.g\., sky at dusk\)\. We usey\(vi,c\)∈\{0,1\}y\(v\_\{i\},c\)\\in\\\{0,1\\\}to denote the presence or absence of the visual conceptccin frameviv\_\{i\}\.
#### Specification language for temporal constraints\.
We propose a fragment of Metric Temporal Logic over finite traces \(MTLfMTL\_\{f\}\) as a suitable language for specifying temporal constraints over visual concepts\([Koymans, 1990](https://arxiv.org/html/2610.20822#bib.bib17)\)\. A specificationφ\\varphiinMTLfMTL\_\{f\}takes the following form:
φ≔\\displaystyle\\varphi\\coloneq\{\}⊤\|⊥\|c∣¬c∣φ1∧φ2∣φ1∨φ2∣𝐗Iφ∣φ1𝐔Iφ2∣𝐆Iφ\\displaystyle\\top\\mid\\bot\\mid c\\mid\\neg c\\mid\\varphi\_\{1\}\\land\\varphi\_\{2\}\\mid\\varphi\_\{1\}\\lor\\varphi\_\{2\}\\mid\\mathbf\{X\}\_\{I\}\\varphi\\mid\\varphi\_\{1\}\\mathbf\{U\}\_\{I\}\\varphi\_\{2\}\\mid\\mathbf\{G\}\_\{I\}\\varphi
where⊤\\topand⊥\\botrepresentTrueandFalse, respectively, andccdenotes an atomic proposition corresponding to a visual conceptcc\. The Boolean operators¬\\neg,∧\\land, and∨\\lordenote negation, conjunction, and disjunction, respectively\. The temporal operators𝐗I\\mathbf\{X\}\_\{I\},𝐔I\\mathbf\{U\}\_\{I\}and𝐆I\\mathbf\{G\}\_\{I\}denoteNext,Until, andAlways, in intervalI⊆\[0,1\]I\\subseteq\[0,1\], resp\. The temporal operatorEventually𝐅I\\mathbf\{F\}\_\{I\}can be derived as𝐅Iφ=⊤𝐔Iφ\\mathbf\{F\}\_\{I\}\\varphi=\\top\\mathbf\{U\}\_\{I\}\\varphi\.
This language can be used to specify several interesting constraints on persistence, order, and timing of visual concepts\. Time intervalsI=\[t1,t2\]I=\[t\_\{1\},t\_\{2\}\]allow us to express specifications with varying timing precision: untimed \(t1=0,t2=1t\_\{1\}=0,t\_\{2\}=1\), interval\-timed \(t1≥0,t2≤1t\_\{1\}\\geq 0,t\_\{2\}\\leq 1\), and strictly\-timed \(0≤t1=t2≤10\\leq t\_\{1\}=t\_\{2\}\\leq 1\)\. Note that the intervalsI=\[t1,t2\]I=\[t\_\{1\},t\_\{2\}\]are written over time normalized in\[0,1\]\[0,1\]and the corresponding offsets can be computed as\[⌈t1\(T−1\)⌉,⌊t2\(T−1\)⌋\]\[\\left\\lceil t\_\{1\}\(T\-1\)\\right\\rceil,\\left\\lfloor t\_\{2\}\(T\-1\)\\right\\rfloor\]\. The constraint from Figure[1](https://arxiv.org/html/2610.20822#S1.F1)that requires the drone to remain visiblethroughout the videoand at least one of the two rescue cues to appearat some pointin the second half can be written in this language as:
φrescue=𝐆\[0,1\]𝖽𝗋𝗈𝗇𝖾∧𝐅\[0\.5,1\]\(𝖿𝗅𝖺𝗋𝖾\_𝗌𝗂𝗀𝗇𝖺𝗅∨𝗌𝗍𝗋𝖺𝗇𝖽𝖾𝖽\_𝗁𝗂𝗄𝖾𝗋\)\\varphi\_\{\\mathrm\{rescue\}\}=\\mathbf\{G\}\_\{\[0,1\]\}\\mathsf\{drone\}\\land\\mathbf\{F\}\_\{\[0\.5,1\]\}\(\\mathsf\{flare\\\_signal\}\\lor\\mathsf\{stranded\\\_hiker\}\)
#### Representing temporal constraints from prior work\.
This specification language can be used to express temporal constraints from recent works, including untimed Temporal Logic \(TL\) specifications\([Choi et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib3)\)and binary temporal masks that prescribe the presence or absence of a visual concept in each frame\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)\. Untimed TL specifications can be written with the trivial\[0,1\]\[0,1\]intervals\. A temporal mask can be encoded as a conjunction of*Always*constraints over intervals where the mask is constant, usingccfor presence and¬c\\neg cfor absence\. Additionally, we can write specifications that correspond to a set of temporal masks, including the choice between visual concepts and the disappearance of an object within an interval\. In other words, a temporal mask corresponds to a given valid trace while our specifications can admit several valid traces\.
#### Deciding whether a video satisfies a specification\.
These specifications can be supplied directly with the text prompt, or can be extracted from the prompt using a Large Language Model \(LLM\)\. Given the frame\-level labelsy\(vi,c\)y\(v\_\{i\},c\)for visual concepts, the labely\(v,φ,t\)y\(v,\\varphi,t\)for a videovvsatisfying specificationφ\\varphistarting from frame1≤t≤T1\\leq t\\leq Tcan be computed deterministically using the standard Boolean semantics forMTLfMTL\_\{f\}\. We present this semantics, along with examples of other specifications, in Appendix[A](https://arxiv.org/html/2610.20822#A1)\. The examples in Figure[1](https://arxiv.org/html/2610.20822#S1.F1)thus scorey\(v,φ,1\)=0y\(v,\\varphi,1\)=0with CFG\-only sampling, which we discuss next, andy\(v,φ,1\)=1y\(v,\\varphi,1\)=1with TSG, discussed in Section[4](https://arxiv.org/html/2610.20822#S4)\.
## 3Video Generation and Classifier Free Guidance
We focus on latent text\-to\-video models that generate videos from text prompts through iterative sampling in a compressed latent space, using a transformer to predict a denoising direction at each step\. This formulation encompasses model families such as CogVideoX\([Yang et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib30)\)and Wan\([Wan et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib27)\)\. The sampling process takes place in a compressed spatio\-temporal latent space\. A videov∈ℝT×H×W×3v\\in\\mathbb\{R\}^\{T\\times H\\times W\\times 3\}corresponds to a latentz∈ℝTz×Hz×Wz×Czz\\in\\mathbb\{R\}^\{T\_\{z\}\\times H\_\{z\}\\times W\_\{z\}\\times C\_\{z\}\}, whereTzT\_\{z\}and\(Hz,Wz\)\(H\_\{z\},W\_\{z\}\)denote the latent temporal and spatial resolutions respectively, andCzC\_\{z\}denotes the number of latent channels\. A 3D Variational Autoencoder \(VAE\) is trained to decode the videov=D\(z\)v=D\(z\)\. Given a text promptpp, a text encoder produces a sequence of tokensepe\_\{p\}\. Sampling begins with a Gaussian latentzN∼𝒩\(0,I\)z\_\{N\}\\sim\\mathcal\{N\}\(0,I\)and proceeds throughNNsteps\. At stepkk, the Transformer𝒯θ\\mathcal\{T\}\_\{\\theta\}predicts the update directiondkd\_\{k\}as:
dk=Tθ\(zk,ep,k\),zk−1=Stepk\(zk,dk\)\.d\_\{k\}=T\_\{\\theta\}\(z\_\{k\},e\_\{p\},k\),\\qquad z\_\{k\-1\}=\\operatorname\{Step\}\_\{k\}\(z\_\{k\},d\_\{k\}\)\.We refer todkd\_\{k\}as the update direction ordenoising directioninterchangeably\.Stepk\\operatorname\{Step\}\_\{k\}incorporates the sampling rule and update schedule, and can vary across models\. The latent generated from the final step \(z0z\_\{0\}\) is then de\-compressed by the VAE decoderDDto the output videov=D\(z0\)v=D\(z\_\{0\}\)\.
#### Classifier\-free Guidance\.
Conditioning on the text prompt alone may not provide sufficient control over the content of the generated video\. Classifier\-free guidance \(CFG\)\([Ho & Salimans, 2022](https://arxiv.org/html/2610.20822#bib.bib12)\)was proposed to strengthen this conditioning during sampling, without requiring an external classifier\. At each sampling step, CFG combines two update directions using the transformer:
dk,u=Tθ\(zk,eref,k\),dk,c=Tθ\(zk,ep,k\),dk,cfg=dk,u\+λcfg\(dk,c−dk,u\)\.d\_\{k,u\}=T\_\{\\theta\}\(z\_\{k\},e\_\{\\mathrm\{ref\}\},k\),\\qquad d\_\{k,c\}=T\_\{\\theta\}\(z\_\{k\},e\_\{p\},k\),\\qquad d\_\{k,\\mathrm\{cfg\}\}=d\_\{k,u\}\+\\lambda\_\{\\mathrm\{cfg\}\}\(d\_\{k,c\}\-d\_\{k,u\}\)\.Here,erefe\_\{\\mathrm\{ref\}\}represents the embedding of an empty prompt or a negative prompt\. The update direction for stepkk,dk,cfgd\_\{k,\\mathrm\{cfg\}\}is computed using the predictions from the unconditional or reference branchdk,ud\_\{k,u\}and the prompt conditional branchdk,cd\_\{k,c\}\. The strength of the extrapolation is controlled by theCFG guidance scaleλcfg∈ℝ\\lambda\_\{\\mathrm\{cfg\}\}\\in\\mathbb\{R\}, with different recommendations across models\.
## 4TSG: Specification Guidance for Text\-to\-Video Generation
We propose Temporal Specification Guidance \(TSG\), a training\-free sampling\-time framework that augments CFG with an update directiondk,tsgd\_\{k,\\mathrm\{tsg\}\}guided by the temporal specificationφ\\varphi\. This framework has three components: temporal traces that provide evidence of visual concepts, a differentiable scoring function that evaluates these traces against the specificationφ\\varphi, and an update mechanism that uses gradients of this score to steer generation\. In this work, we compute traces of visual concept evidence using video\-text attention within the transformerTθT\_\{\\theta\}, score them againstφ\\varphiwith a differentiable quantitative semantics forMTLfMTL\_\{f\}, and use the gradients as attention logit biases\. This attention\-steered forward pass produces the specification\-guided directiondk,φd\_\{k,\\varphi\}\. We present the overall process in Figure[2](https://arxiv.org/html/2610.20822#S4.F2)and discuss each step in detail now\.
#### Temporal Specification\-guided sampling\.
Letdk,ud\_\{k,u\}anddk,cd\_\{k,c\}denote the reference and prompt\-conditional direction predictions from Section[3](https://arxiv.org/html/2610.20822#S3)\. Similarly, letdk,cfgd\_\{k,\\mathrm\{cfg\}\}andλk,cfg\\lambda\_\{k,\\mathrm\{cfg\}\}denote the CFG\-predicted direction and the CFG guidance scale, respectively\. At sampling stepkk, TSG computes a*specification\-guided*directiondk,φd\_\{k,\\varphi\}usingφ\\varphiand yields the update directiondk,tsgd\_\{k,\\mathrm\{tsg\}\}as:
dk,tsg=dk,cfg\+λk,tsg\(dk,φ−dk,c\),zk−1=Stepk\(zk,dk,tsg\)\.d\_\{k,\\mathrm\{tsg\}\}=d\_\{k,\\mathrm\{cfg\}\}\+\\lambda\_\{k,\\mathrm\{tsg\}\}\(d\_\{k,\\varphi\}\-d\_\{k,c\}\),\\qquad z\_\{k\-1\}=\\operatorname\{Step\}\_\{k\}\(z\_\{k\},d\_\{k,\\mathrm\{tsg\}\}\)\.
As with CFG, the strength of TSG is controlled by theTSG guidance scaleλk,tsg≥0\\lambda\_\{k,\\mathrm\{tsg\}\}\\geq 0\. As the CFG guidance scaleλk,cfg\\lambda\_\{k,\\mathrm\{cfg\}\}usually takes values recommended by model providers and can dynamically vary across sampling steps, we computeλtsg\\lambda\_\{\\mathrm\{tsg\}\}using the ratio between the TSG contribution and theλcfg\\lambda\_\{\\mathrm\{cfg\}\}\-scaled CFG contribution as:
λk,tsg=ρk,tsg⋅‖λk,cfg\(dk,c−dk,u\)‖2⏞Scaled CFG contribution‖dk,φ−dk,c‖2⏟Unscaled TSG contribution\.\\lambda\_\{k,\\mathrm\{tsg\}\}=\\rho\_\{k,\\mathrm\{tsg\}\}\\cdot\\,\\frac\{\{\\color\[rgb\]\{0\.4,0\.4,0\.4\}\\overbrace\{\{\\color\[rgb\]\{0,0,0\}\\left\\\|\\lambda\_\{k,\\mathrm\{cfg\}\}\(d\_\{k,\\mathrm\{c\}\}\-d\_\{k,u\}\)\\right\\\|\_\{2\}\}\}^\{\\text\{Scaled CFG contribution\}\}\}\}\{\{\\color\[rgb\]\{0\.4,0\.4,0\.4\}\\underbrace\{\{\\color\[rgb\]\{0,0,0\}\\left\\\|d\_\{k,\\varphi\}\-d\_\{k,c\}\\right\\\|\_\{2\}\}\}\_\{\\text\{Unscaled TSG contribution\}\}\}\}\.\(1\)The parameterρk,tsg\\rho\_\{k,\\mathrm\{tsg\}\}denotes the relative strength of TSG with respect to CFG\. Withρk,tsg=1\\rho\_\{k,\\mathrm\{tsg\}\}=1, TSG’s contribution is scaled to match that of CFG\. We apply TSG for the firstNtsgN\_\{\\mathrm\{tsg\}\}update steps, with CFG applied during the remaining steps\. We next describe how the directiondk,φd\_\{k,\\varphi\}is computed\.
#### Attention\-derived temporal traces for visual concepts\.
To mitigate the need for an external concept classifier and inspired by recent work\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\), we use video\-text attention to compute temporal traces of visual concepts\. The text promptppand video latentzzprovide tokens to serve as text keys and video queries, respectively, for every attention headhhin layerℓ\\ellof transformer𝒯θ\\mathcal\{T\}\_\{\\theta\}\. We map every concept propositionccin specificationφ\\varphito the set of token indicesPcP\_\{c\}in promptpp\. LetQtQ\_\{t\}be the set of spatial video queries for latent frameztz\_\{t\}andA\[q,j\]A\[q,j\]represent the post\-softmax attention score for video tokenq∈Qtq\\in Q\_\{t\}and text token indexjj\. We construct the raw attention trace for conceptccat layerℓ\\elland headhh,at,ca\_\{t,c\}and the corresponding concept score trace,y^\(zt,c\)\\hat\{y\}\(z\_\{t\},c\)as:
at,c=1\|𝒬t\|∑q∈𝒬tmaxj∈𝒫cA\[q,j\],y^\(zt,c\)=σ\(at,c−μcτsc\+ϵ\)\.a\_\{t,c\}=\\frac\{1\}\{\|\\mathcal\{Q\}\_\{t\}\|\}\\sum\_\{q\\in\\mathcal\{Q\}\_\{t\}\}\\max\_\{j\\in\\mathcal\{P\}\_\{c\}\}A\[q,j\],\\qquad\\hat\{y\}\(\{z\_\{t\},c\}\)=\\sigma\\\!\\left\(\\frac\{a\_\{t,c\}\-\\mu\_\{c\}\}\{\\tau s\_\{c\}\+\\epsilon\}\\right\)\.\(2\)The scoreat,ca\_\{t,c\}corresponds to the maximum attention to any token corresponding to conceptcc, averaged over all spatial positions for latent frameztz\_\{t\}\. We compute concept presence scoresy^\(zt,c\)\\hat\{y\}\(z\_\{t\},c\)by scaling attention scores over latent frames using thesigmoid\\operatorname\{sigmoid\}function with temporal meanμc\\mu\_\{c\}and population standard deviationscs\_\{c\}\.τ\>0\\tau\>0is a temperature, andϵ\>0\\epsilon\>0stabilizes the denominator\.
Note that the latent frameztz\_\{t\}does not correspond to video framevtv\_\{t\}because it is defined at the latent temporal resolutionTz<TT\_\{z\}<T\. We limit steering to this latent resolution and convert normalized specification intervals to offsets on this grid using the convention in Section[2](https://arxiv.org/html/2610.20822#S2), withTTreplaced byTzT\_\{z\}\.
Tθ\(zk,eref,k\)T\_\{\\theta\}\(z\_\{k\},e\_\{\\mathrm\{ref\}\},k\)reference promptTθ\(zk,ep,k\)T\_\{\\theta\}\(z\_\{k\},e\_\{p\},k\)unmodified conditional passTθ\(zk,ep,k\)T\_\{\\theta\}\(z\_\{k\},e\_\{p\},k\)Aℓ,hA^\{\\ell,h\}A~ℓ,h\\widetilde\{A\}^\{\\ell,h\}online layerwise steeringzkz\_\{k\}zkz\_\{k\}zkz\_\{k\}erefe\_\{\\mathrm\{ref\}\}epe\_\{p\}epe\_\{p\}CFGdcfg=du\+λcfg\(dc−du\)d\_\{\\mathrm\{cfg\}\}=d\_\{u\}\+\\lambda\_\{\\mathrm\{cfg\}\}\(d\_\{c\}\-d\_\{u\}\)dud\_\{u\}TSG \(ours\)dtsg=dcfg\+λtsg\(dφ−dc\)d\_\{\\mathrm\{tsg\}\}=d\_\{\\mathrm\{cfg\}\}\+\\lambda\_\{\\mathrm\{tsg\}\}\(d\_\{\\varphi\}\-d\_\{c\}\)dφd\_\{\\varphi\}dcfgd\_\{\\mathrm\{cfg\}\}dcd\_\{c\}CFG throughoutCFG \+ TSG \(first 15 steps\)→\\toCFGLatentzkz\_\{k\}Text promptppDog:stand→\\tosit→\\tolie down; equal thirds\.Specificationφ\\varphi𝐅\[0,1/3\)stand∧𝐅\[1/3,2/3\)sit∧𝐅\[2/3,1\]lie down\\mathbf\{F\}\_\{\[0,1/3\)\}\\text\{\{\\color\[rgb\]\{0\.7227,0\.3984,0\}\{stand\}\}\}\\land\\mathbf\{F\}\_\{\[1/3,2/3\)\}\\text\{\{\\color\[rgb\]\{0\.1523,0\.4063,0\.7109\}\{sit\}\}\}\\land\\mathbf\{F\}\_\{\[2/3,1\]\}\\text\{\{\\color\[rgb\]\{0\.5703,0\.2266,0\.5938\}\{lie down\}\}\}Inputs at denoising stepkkCurrent layer’s tracesaℓ,ha^\{\\ell,h\}standsitlie downfirstmiddlelastScore \+ logit biasSℓ,h=Score\(y^ℓ,h,φ\)S\_\{\\ell,h\}=\\operatorname\{Score\}\(\\hat\{y\}^\{\\ell,h\},\\varphi\)L~z,pℓ,h=Lz,pℓ,h\+Bias\(∇aℓ,hSℓ,h\)\\widetilde\{L\}\_\{z,p\}^\{\\ell,h\}=L\_\{z,p\}^\{\\ell,h\}\+\\operatorname\{Bias\}\(\\nabla\_\{a^\{\\ell,h\}\}S\_\{\\ell,h\}\)Traces after local steeringa~ℓ,h\\widetilde\{a\}^\{\\ell,h\}standsitlie downfirstmiddlelastInside the guided pass: steer the current layer, then continueφ\\varphiIllustrative attention: low to high
Figure 2:*Temporal Specification Guidance \(TSG\)\.*During an additional conditional pass, TSG scores each head’s attention traces against the specification and applies gradient\-derived logit biases\. The resulting prediction augments CFG\. Transformer weights receive no gradients\. The example presents videos generated with Wan2\.2 5B\.
#### Differentiable Specification Scores with LogSTOP\.
Inspired by efficient quantitative semantics for Linear Temporal Logic specifications over videos\([Khare et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib16)\), we define an efficient interval\-aware sum–product quantitative semantics in log space forMTLfMTL\_\{f\}specifications\. Given an MTL specificationφ\\varphiand concept score tracesy^\(zt,c\)\\hat\{y\}\(z\_\{t\},c\)at attention layerℓ\\elland headhh, we can compute the scorey^\(z,φ\)\\hat\{y\}\(z,\\varphi\)recursively using Algorithm[1](https://arxiv.org/html/2610.20822#alg1)in Appendix[B](https://arxiv.org/html/2610.20822#A2)\. Intuitively, conjunction and Always multiply support for their requirements, while disjunction, Eventually, and Until sum support for admissible alternatives or temporal witnesses\.
The score for any specificationφ\\varphican be computed usingO\(\|φ\|Tz\)O\(\|\\varphi\|T\_\{z\}\)arithmetic operations \(Proposition[B\.2](https://arxiv.org/html/2610.20822#A2.Thmmytheorem2)\)\. The score is non\-decreasing in independent literal\-support inputs, as proved in Proposition[B\.3](https://arxiv.org/html/2610.20822#A2.Thmmytheorem3)\. This yields predictable gradient signs for concept–time inputs with consistent polarity \(Corollary[B\.4](https://arxiv.org/html/2610.20822#A2.Thmmytheorem4)\)\. The direction is determined by the surrounding trace when a concept appears with both polarities\. Appendix[B](https://arxiv.org/html/2610.20822#A2)provides further details on this monotonicity property, the algorithm’s complexity, and examples of the resulting gradients\.
#### Online attention steering\.
For each layerℓ\\ell, headhh, and conceptc∈φc\\in\\varphi, we differentiatey^\(zt,φ\)\\hat\{y\}\(z\_\{t\},\\varphi\)with respect to the raw traceat,ca\_\{t,c\}:
g⋅,c=∇a⋅,cy^\(zt,φ\),b⋅,c=ηg⋅,c/∥g⋅,c∥∞,B\[q,j\]=∑c:j∈𝒫cbt\(q\),c\.g\_\{\\cdot,c\}=\\nabla\_\{a\_\{\\cdot,c\}\}\\hat\{y\}\(z\_\{t\},\\varphi\),\\qquad b\_\{\\cdot,c\}=\\eta\\,g\_\{\\cdot,c\}/\\\|g\_\{\\cdot,c\}\\\|\_\{\\infty\},\\qquad B\[q,j\]=\\sum\_\{c:\\,j\\in\\mathcal\{P\}\_\{c\}\}b\_\{t\(q\),c\}\.wherebt,cb\_\{t,c\}is the normalizedattention biasfor temporal positionttand conceptcc\. We setb⋅,c=0b\_\{\\cdot,c\}=0for negligible gradients\. The step sizeη\\etacontrols the bias magnitude\. We broadcast temporal biasbt,cb\_\{t,c\}to every spatial queryq∈Qtq\\in Q\_\{t\}at positiont\(q\)t\(q\)and every text tokenjjassociated with the conceptccasB\[q,j\]B\[q,j\]\. For spatial queryqq, we further center the biases by the mean bias over all text keys andclip\\operatorname\{clip\}them in a given range\[bmin,bmax\]\[b\_\{\\min\},b\_\{\\max\}\]\.
We apply the resulting bias to the logits for layerℓ\\elland headhhas:
L~z,pℓ,h=Lz,pℓ,h\+Bℓ,h\\widetilde\{L\}\_\{z,p\}^\{\\ell,h\}=L\_\{z,p\}^\{\\ell,h\}\+B^\{\\ell,h\}\(3\)The biased attention is used to compute the layer’s output, and the forward pass continues with the updated representations\. Biases are computed anew at each selected layer and sampling step, separately for each head\. The completed guided pass yields the specification\-guided directiondk,φd\_\{k,\\varphi\}\.
## 5Experimental Evaluation
Two\-state transition001/21/211Three\-state transition001/31/32/32/311Reversible state return001/31/32/32/311Persistent\-entity transition001/21/211Ordered entry \(one\)001/21/211Ordered entry \(two\)001/31/32/32/311Overlapping handover001/31/32/32/311Entity exit and re\-entry001/31/32/32/311∅\\emptysetTriggered transition001/31/32/32/311Anchored entity choice001/31/311orAlternative final state001/31/311orcathorserabbittreepersonstandspersonsitsdogstandsdogsitsdoglies
Figure 3:TSG benchmark with interval\-timed temporal requirements from 11 categories\.Shaded intervals indicate permitted event timing within the video duration;∅\\emptysetdenotes absence, and “or” denotes mutually exclusive outcomes\. Pictograms are illustrative\.### 5\.1Setup and Benchmarks
#### The TSG Benchmark with interval\-timed temporal constraints\.
Existing benchmarks primarily focus on untimed constraints, such as state transitions in TC\-Bench\([Feng et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib6)\)and NeuS\-V\([Sharan et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib23)\), and strictly\-timed constraints such as TempoControl\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)\. To evaluate TSG on interval\-timed constraints, we construct a benchmark with 220 text prompts from 11 categories of temporal constraints\. These categories are presented in Figure[3](https://arxiv.org/html/2610.20822#S5.F3)and include variations in the requested timing, ordering, persistence, and choice among visual concepts\.
We useGPT\-5\.6\-Solto propose 50 entities spanning objects from VBench\([Huang et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib15)\)and background settings, with associated states \(e\.g\., pose of an object, or time of day for a setting\)\. We construct sets of 20 prompts for each temporal constraint category in Figure[3](https://arxiv.org/html/2610.20822#S5.F3)\. We restrict the intervals to halves and thirds within 5–6\-second videos, allowing transitions to occur at any point within each interval\. Finally, we manually assign temporal specification templates for each category and instructGPT\-5\.6\-Solto instantiate the specifications with atomic propositions mapped to respective visual concepts in each prompt\. Appendix[D](https://arxiv.org/html/2610.20822#A4)provides further details on examples of prompts for each category along with the list of temporal specification templates\.
#### Baselines and Models\.
We evaluate text\-to\-video generation models with CFG sampling as our main baseline\. We include five models from two model families: CogVideoX\-2B and CogVideoX\-5B\([Yang et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib30)\), and Wan2\.1 T2V\-1\.3B, Wan2\.2 TI2V\-5B, and Wan2\.2 T2V A14B\([Wan et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib27)\)\. These models cover both joint video–text attention, used by CogVideoX, and dedicated video\-to\-text cross\-attention, used by Wan\. We use the CFG settings recommended by the model providers\. On the strictly\-timed prompts from the TempoControl benchmark, we also compare TSG against the TempoControl method\. We use TSG during the first 15 sampling steps withρk,tsg=1\\rho\_\{k,\\mathrm\{tsg\}\}=1\. Appendices[E\.1](https://arxiv.org/html/2610.20822#A5.SS1)and[E\.2](https://arxiv.org/html/2610.20822#A5.SS2)describe the model settings and TSG configuration; Appendices[E\.3](https://arxiv.org/html/2610.20822#A5.SS3)and[E\.5](https://arxiv.org/html/2610.20822#A5.SS5)detail the TempoControl comparison and compute measurements\.
Table 1:TSG improves satisfaction accuracy on a benchmark of 220 prompts\.Latency and Memory measurements are on B200 for all models, except for Wan2\.2 A14B which was run on H200\.
#### Metrics\.
We uniformly sample 21 decoded frames from each video, and evaluate the frame\-level presence of a visual concept usingQwen2\.5\-VL\-7B\-Instruct\. We use the ground\-truth semantics of MTL described in Appendix[A](https://arxiv.org/html/2610.20822#A1)to compute the specification satisfaction accuracy \(Sat Acc\.\)\. We also evaluate visual quality of the generated videos using VBench’s MUSIQ\-SPAQ imaging quality scorer\([Huang et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib15)\), along with the time taken for generation \(latency\) and the peak GPU memory allocated to the process\. Appendix[E\.6](https://arxiv.org/html/2610.20822#A5.SS6)provides further details\.
### 5\.2RQ1\. Does TSG improve adherence to temporal specifications?
#### Result 1: TSG consistently outperforms CFG\-only on interval\-timed and strictly\-timed temporal constraints\.
Table[1](https://arxiv.org/html/2610.20822#S5.T1)presents the results comparing TSG against CFG\-only sampling on the TSG benchmark\. TSG improves satisfaction accuracy by 9\.5–20 percentage points across models, with Wan 2\.2 A14B reporting the highest satisfaction accuracy of46\.8%46\.8\\%with TSG\. Interestingly, Wan2\.1 1\.3B reports a31\.4%31\.4\\%accuracy with TSG compared to Wan2\.2 5B’s25%25\\%with CFG\-only sampling, despite having fewer parameters\. We see this pattern more broadly:smaller models with TSG report higher or comparable satisfaction accuracies to larger models with CFG only\. On the strictly\-timed prompts from the TempoControl benchmark, TSG improves temporal accuracy over CFG\-only by 17\.6–22\.0 percentage points across splits, and exceeds full TempoControl by 2\.97 and 0\.58 percentage points on the one\-object and two\-object splits, respectively \(Table[2](https://arxiv.org/html/2610.20822#S5.T2)\)\.
### 5\.3RQ2\. What are the computational and quality costs of TSG?
#### Result 2: TSG incurs little to no memory overhead but increases time taken for generation\.
TSG matches the CFG\-only sampling in terms of the peak GPU memory allocated to the model\. This is expected as attention steering detaches the computational graph and hence does not need to store gradients with respect to model weights\. TSG uses 30\.52 GiB versus 79\.43 GiB for full TempoControl, a reduction of approximately 62%, as TempoControl optimizes video latents requiring a gradient computation graph through the entire video transformer \(Table[2](https://arxiv.org/html/2610.20822#S5.T2)\)\.
The additional specification\-guided forward pass through the transformer incurs a latency cost with TSG\. This scales with the size of the model as expected, with TSG taking around 1 extra minute with Wan2\.1 1\.3B to 11 extra minutes with Wan2\.2 A14B \(Table[1](https://arxiv.org/html/2610.20822#S5.T1)\)\. Full TempoControl takes approximately4\.9×4\.9\\timesand3\.6×3\.6\\timesas long as TSG on the one\-object and two\-object splits, respectively \(Table[2](https://arxiv.org/html/2610.20822#S5.T2)\)\. Limiting TempoControl to one optimization round brings its latency close to TSG’s but retains approximately 79\.4 GiB peak memory; TSG improves temporal accuracy over this variant by 20\.1% and 27\.5% relative to its one\-object and two\-object scores\.
#### Result 3: TSG modestly impacts the visual quality of the generated videos\.
TSG lowers imaging quality by up to3\.03\.0points on four models and improves it by3\.23\.2points on Wan2\.2 A14B \(Table[1](https://arxiv.org/html/2610.20822#S5.T1)\)\.
Table 2:TempoControl benchmark results with Wan2\.1 1\.3B\.Parentheses show accuracy changes in percentage points and computational\-cost ratios relative to CFG\. Latency reports mean ± standard deviation; memory reports peak allocation\. We present setup details in Appendix[E\.3](https://arxiv.org/html/2610.20822#A5.SS3)\.MethodTemporal Acc↑\\uparrowLatency \(min/video\)↓\\downarrowPeak GPU mem \(GiB\)↓\\downarrowOne object\(N=80\)Base69\.40%\(0\.0%\)1\.29±\\pm0\.01\(1\.00×\\times\)30\.48\(1\.00×\\times\)TempoControl \(one round\)72\.44%\(\+3\.0%\)2\.23±\\pm0\.01\(1\.72×\\times\)79\.41\(2\.61×\\times\)TempoControl \(full\)84\.05%\(\+14\.6%\)9\.87±\\pm2\.10\(7\.63×\\times\)79\.43\(2\.61×\\times\)TSG87\.02%\(\+17\.6%\)2\.02±\\pm0\.01\(1\.56×\\times\)30\.52\(1\.00×\\times\)Two object\(N=82\)Base36\.12%\(0\.0%\)1\.30±\\pm0\.01\(1\.00×\\times\)30\.48\(1\.00×\\times\)TempoControl \(one round\)45\.53%\(\+9\.4%\)2\.28±\\pm0\.10\(1\.75×\\times\)79\.42\(2\.61×\\times\)TempoControl \(full\)57\.49%\(\+21\.4%\)8\.11±\\pm3\.41\(6\.24×\\times\)79\.43\(2\.61×\\times\)TSG58\.07%\(\+22\.0%\)2\.27±\\pm0\.01\(1\.74×\\times\)30\.52\(1\.00×\\times\)
## 6Analysis and Discussion
#### Category\-wise results and qualitative examples\.
Figure[4](https://arxiv.org/html/2610.20822#S6.F4)\(left\) shows category\-wise satisfaction accuracies, averaged across five models, with whiskers indicating the minimum and maximum\. TSG improves mean accuracy across all 11 categories by approximately 2–43 percentage points\. The largest gains occur for alternative final states \(23% to 66%\), two\-state transitions \(35% to 71%\), and reversible state returns \(21% to 43%\)\. Performance nevertheless varies substantially across models: with TSG, accuracy ranges from 20% to 75% for reversible state returns and from 10% to 80% for transitions with a persistent entity\. Handover with overlap, triggered responses, and three ordered entries remain challenging, with mean accuracies of approximately 9%, 17%, and 12%, respectively, and gains of only about 2 percentage points\. These results show that TSG is particularly effective for state\-transition requirements, while coordinating multiple entity appearances, disappearances, and dependencies remains challenging\.
Figures[1](https://arxiv.org/html/2610.20822#S1.F1),[2](https://arxiv.org/html/2610.20822#S4.F2), and[5](https://arxiv.org/html/2610.20822#S6.F5)illustrate how TSG improves adherence over CFG\-only sampling across temporal requirements from various categories in Figure[3](https://arxiv.org/html/2610.20822#S5.F3)\.
#### Varying the TSG Guidance strength\.
We vary the TSG strengthρ∈\{0,1,2,3,4,5\}\\rho\\in\\\{0,1,2,3,4,5\\\}on a fixed 25\-prompt subset per model \(top\-right in Figure[4](https://arxiv.org/html/2610.20822#S6.F4)\), withρ=0\\rho=0corresponding to CFG\-only sampling\. Both models attain their highest satisfaction accuracy atρ=1\\rho=1:32%32\\%for Wan2\.1 1\.3B and36%36\\%for Wan2\.2 5B, improving over CFG\-only by 16 and 12 percentage points, respectively\. The accuracy is non\-increasing beyondρ=1\\rho=1, and atρ=5\\rho=5it matches or falls below the respective CFG\-only baseline\. These results supportρ=1\\rho=1as the default among the tested strengths on this subset and show that increasing specification guidance beyond this level does not improve adherence\. Appendix[E\.4](https://arxiv.org/html/2610.20822#A5.SS4)provides the sampling configurations and ablation protocol\.
#### TSG\-CFG interaction\.
To evaluate whether the gains from TSG are an artifact of a higher guidance strength alone, we compare it against CFG with twice the guidance strength \(bottom\-right in Figure[4](https://arxiv.org/html/2610.20822#S6.F4)\)\. We further evaluate the need for the additional prompt\-conditional pass by comparing our hybrid CFG \+ TSG setup against TSG only, and TSG only for the first 15 denoising steps followed by CFG\. Combined CFG \+ TSG reports the highest specification satisfaction accuracies of32%32\\%and36%36\\%on Wan2\.1 1\.3B and Wan2\.2 5B, respectively\. Doubling the CFG strength yields24%24\\%and20%20\\%, respectively, falling short of combined guidance on both models\. The effects of replacing CFG with TSG are mixed across models\. These results support our design choice of combining CFG with TSG\.
Alternative final stateTwo\-state transitionReversible state returnThree\-state transitionExit and returnPersistent\-entity transitionAnchored entity choiceTwo ordered entriesHandover with overlapTriggered responseThree ordered entriesCFG\-onlyTSG001122334455001010202030304040TSG strengthρ\\rho\(00: CFG\-only\)Sat Acc\. \(%\)Wan2\.1 1\.3BWan2\.2 5BCFGCFG \(2×2\\times\)TSG\-onlyTSG→\\rightarrowCFGCFG \+ TSG001010202030304040Sat Acc\. \(%\)Wan2\.1 1\.3BWan2\.2 5B
Figure 4:Category\-wise results and ablations\.Left: mean satisfaction accuracy across five models, with min–max whiskers\. Right: guidance\-strength \(top\) and CFG–TSG \(bottom\) ablations\.Frame 7Frame 20Frame 33Frame 47Frame 60Frame 73Acandleremains visible; acupjoins in the middle third and ateapotin the final third\.CFG\-only
TSG
Frame 7Frame 20Frame 33Frame 47Frame 60Frame 73A beach is shown indaylightin the first third, atsunsetin the middle third, and atnightin the final third\.CFG\-only
TSG
Frame 10Frame 30Frame 50Frame 70Frame 90Frame 110Anappleappears first; abananajoins in the middle third and remains alone in the final third\.CFG\-only
TSG
Figure 5:Representative examples comparing CFG\-only sampling \(top row of each panel\) with TSG \(bottom row\) on ordered entry, three\-state transition, and overlapping handover respectively\. The first two examples are generated using Wan2\.1 T2V\-1\.3B, and the third example is generated using Wan2\.2 TI2V\-5B in text\-to\-video mode\.
## 7Related work
#### Test\-time control for video generation\.
Methods for controllable video generation differ primarily in terms of thecontrol surfaceand thetime of control\(during or post sampling\)\. Control surfaces include spatiotemporal scene layouts\([Lian et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib18);[Qu et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib20)\), and motion transfer using reference videos\([Ling et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib19)\), which are complementary to TSG’s focus on temporal constraints over frame\-level visual concepts\. Closest to our work, TempoControl\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)aligns concept attention traces with prescribed binary temporal masks by repeatedly optimizing video latents during sampling\. TSG offers control over more expressive temporal constraints and outperforms TempoControl on strict\-timed traces with lower computational overhead \(Table[2](https://arxiv.org/html/2610.20822#S5.T2)\)\. Post\-sampling temporal control methods include NeuS\-E\([Choi et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib3)\)that uses Vision Language Models \(VLM\) to detect visual concepts and feedback from a Temporal Logic Model Checker to edit faulty video frames\. TSG and NeuS\-E offer tradeoffs as TSG does not require access to a VLM or Image Editing model, while NeuS\-E can be applied to black\-box models\. MinT\([Wu et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib29)\)learns temporal control by fine\-tuning a video diffusion transformer on temporally grounded data\. TSG operates at test\-time with frozen parameters and no additional training data\.
#### Attention steering for text, image, and video generation\.
Attention provides both a signal of concept grounding and a mechanism for controlling generation of text\([Zhang et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib31);[Guardieiro et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib9)\), and images\([Hertz et al\., 2022](https://arxiv.org/html/2610.20822#bib.bib11);[Chefer et al\., 2023](https://arxiv.org/html/2610.20822#bib.bib2)\)\. VideoTetris\([Tian et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib26)\)composes attention maps across space and time to control spatial positions of concepts\. TSG supports richer temporal compositions beyond transitions but does not directly support control of spatial positions\.
#### Benchmarks for video generation\.
VBench\([Huang et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib15)\)assesses visual quality, temporal consistency, and semantic alignment, while T2V\-CompBench\([Sun et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib25)\)evaluates compositional capabilities such as attribute binding, spatial relationships, actions, and motion\. These broader evaluations remain complementary to specification satisfaction\. TC\-Bench\([Feng et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib6)\)and NeuS\-V\([Sharan et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib23)\)evaluate untimed state transitions and temporal relationships, while TempoControl\([Schiber et al\., 2026](https://arxiv.org/html/2610.20822#bib.bib22)\)tests exact timing of object appearance\. These temporal constraints complement theinterval\-timedconstraints in our benchmark\. Our benchmark additionally evaluates alternate outcomes through choice, not supported by any prior benchmark\.
## 8Conclusion and Future Work
We present Temporal Specification Guidance \(TSG\), a training\-free framework that turns temporal specifications into executable objectives for guiding video generation during sampling\. We instantiate TSG with attention\-derived concept traces, differentiable Metric Temporal Logic scores, and attention interventions that avoid backpropagation through the video transformer\. This instantiation improves specification adherence across five models on a 220\-prompt benchmark spanning 11 categories and achieves comparable temporal accuracy to TempoControl at lower computational cost\.
Future work should explore traces of concept evidence beyond video\-text attention maps, along with other scoring functions\. TSG is limited to the latent temporal resolution of models and extending it to finer\-grained temporal constraints is an interesting direction, along with identifying richer specification languages to express temporal requirements\.
### AI use statement
In this work, we used generative AI tools to assist benchmark construction, including proposing entities and states and drafting prompts and specification instances \(Appendix[D](https://arxiv.org/html/2610.20822#A4)\), and to assist manuscript editing and LaTeX preparation\. We have reviewed all AI\-assisted work and take responsibility for the final content of this work, including text, claims, and artifacts produced with the aid of generative AI\.
### Reproducibility statement
We present details on benchmark construction, along with specification templates and example prompts, in Appendix[D](https://arxiv.org/html/2610.20822#A4)\. We further document settings used with different video generation models, along with detailed evaluation protocol in Appendix[E](https://arxiv.org/html/2610.20822#A5)\. Finally, we present pseudocode for the TSG algorithm in Appendix[C](https://arxiv.org/html/2610.20822#A3)and the quantitative semantics in Appendix[B](https://arxiv.org/html/2610.20822#A2)\.
## References
- Bai et al\. \(2025\)Shuai Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Sibo Song, Kai Dang, Peng Wang, Shijie Wang, Jun Tang, Humen Zhong, Yuanzhi Zhu, Mingkun Yang, Zhaohai Li, Jianqiang Wan, Pengfei Wang, Wei Ding, Zheren Fu, Yiheng Xu, Jiabo Ye, Xi Zhang, Tianbao Xie, Zesen Cheng, Hang Zhang, Zhibo Yang, Haiyang Xu, and Junyang Lin\.Qwen2\.5\-vl technical report\.*arXiv preprint arXiv:2502\.13923*, 2025\.
- Chefer et al\. \(2023\)Hila Chefer, Yuval Alaluf, Yael Vinker, Lior Wolf, and Daniel Cohen\-Or\.Attend\-and\-excite: Attention\-based semantic guidance for text\-to\-image diffusion models\.*ACM transactions on Graphics \(TOG\)*, 42\(4\):1–10, 2023\.
- Choi et al\. \(2025\)Minkyu Choi, SP Sharan, Harsh Goel, Sahil Shah, and Sandeep Chinchali\.We’ll fix it in post: Improving text\-to\-video generation with neuro\-symbolic feedback\.*arXiv preprint arXiv:2504\.17180*, 2025\.
- Dahary et al\. \(2024\)Omer Dahary, Or Patashnik, Kfir Aberman, and Daniel Cohen\-Or\.Be yourself: Bounded attention for multi\-subject text\-to\-image generation\.In*European Conference on Computer Vision*, pp\. 432–448\. Springer, 2024\.
- Esser et al\. \(2023\)Patrick Esser, Johnathan Chiu, Parmida Atighehchian, Jonathan Granskog, and Anastasis Germanidis\.Structure and content\-guided video synthesis with diffusion models\.In*2023 IEEE/CVF International Conference on Computer Vision \(ICCV\)*, pp\. 7312–7322\. IEEE, 2023\.
- Feng et al\. \(2024\)Weixi Feng, Jiachen Li, Michael Saxon, Tsu\-jui Fu, Wenhu Chen, and William Yang Wang\.Tc\-bench: Benchmarking temporal compositionality in text\-to\-video and image\-to\-video generation\.*arXiv preprint arXiv:2406\.08656*, 2024\.
- Feng et al\. \(2025\)Weixi Feng, Chao Liu, Sifei Liu, William Yang Wang, Arash Vahdat, and Weili Nie\.Blobgen\-vid: Compositional text\-to\-video generation with blob video representations\.In*2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition \(CVPR\)*, pp\. 12989–12998\. IEEE, 2025\.
- Google DeepMind \(2026\)Google DeepMind\.Gemini Omni Flash model card\.[https://deepmind\.google/models/model\-cards/gemini\-omni\-flash/](https://deepmind.google/models/model-cards/gemini-omni-flash/), 2026\.
- Guardieiro et al\. \(2025\)Vitoria Guardieiro, Avishree Khare, Adam Stein, and Eric Wong\.Instruction following by principled boosting attention of large language models\.*arXiv preprint arXiv:2506\.13734*, 2025\.
- He et al\. \(2024\)Hao He, Yinghao Xu, Yuwei Guo, Gordon Wetzstein, Bo Dai, Hongsheng Li, and Ceyuan Yang\.Cameractrl: Enabling camera control for text\-to\-video generation\.*arXiv preprint arXiv:2404\.02101*, 2024\.
- Hertz et al\. \(2022\)Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen\-Or\.Prompt\-to\-prompt image editing with cross attention control\.*arXiv preprint arXiv:2208\.01626*, 2022\.
- Ho & Salimans \(2022\)Jonathan Ho and Tim Salimans\.Classifier\-free diffusion guidance\.*arXiv preprint arXiv:2207\.12598*, 2022\.
- Ho et al\. \(2022a\)Jonathan Ho, William Chan, Chitwan Saharia, Jay Whang, Ruiqi Gao, Alexey Gritsenko, Diederik P Kingma, Ben Poole, Mohammad Norouzi, David J Fleet, et al\.Imagen video: High definition video generation with diffusion models\.*arXiv preprint arXiv:2210\.02303*, 2022a\.
- Ho et al\. \(2022b\)Jonathan Ho, Tim Salimans, Alexey Gritsenko, William Chan, Mohammad Norouzi, and David Fleet\.Video diffusion models\.*Advances in neural information processing systems*, 35:8633–8646, 2022b\.
- Huang et al\. \(2024\)Ziqi Huang, Yinan He, Jiashuo Yu, Fan Zhang, Chenyang Si, Yuming Jiang, Yuanhan Zhang, Tianxing Wu, Qingyang Jin, Nattapol Chanpaisit, et al\.Vbench: Comprehensive benchmark suite for video generative models\.In*2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition \(CVPR\)*, pp\. 21807–21818\. IEEE, 2024\.
- Khare et al\. \(2025\)Avishree Khare, Hideki Okamoto, Bardh Hoxha, Georgios Fainekos, and Rajeev Alur\.Logstop: Temporal scores over prediction sequences for matching and retrieval\.*arXiv preprint arXiv:2510\.06512*, 2025\.
- Koymans \(1990\)Ron Koymans\.Specifying real\-time properties with metric temporal logic\.*Real\-Time Syst\.*, 2\(4\):255–299, October 1990\.ISSN 0922\-6443\.doi:10\.1007/BF01995674\.URL[https://doi\.org/10\.1007/BF01995674](https://doi.org/10.1007/BF01995674)\.
- Lian et al\. \(2024\)Long Lian, Baifeng Shi, Adam Yala, Boyi Li, et al\.Llm\-grounded video diffusion models\.In*International Conference on Learning Representations*, volume 2024, pp\. 50207–50227, 2024\.
- Ling et al\. \(2024\)Pengyang Ling, Jiazi Bu, Pan Zhang, Xiaoyi Dong, Yuhang Zang, Tong Wu, Huaian Chen, Jiaqi Wang, and Yi Jin\.Motionclone: Training\-free motion cloning for controllable video generation\.*arXiv preprint arXiv:2406\.05338*, 2024\.
- Qu et al\. \(2026\)Leigang Qu, Ziyang Wang, Na Zheng, Wenjie Wang, Liqiang Nie, and Tat\-Seng Chua\.Ttom: Test\-time optimization and memorization for compositional video generation\.In*International Conference on Learning Representations*, volume 2026, pp\. 70225–70247, 2026\.
- Runway \(2025\)Runway\.Runway Gen\-4\.5: State\-of\-the\-art AI video generation\.[https://runway\.com/research/introducing\-runway\-gen\-4\.5](https://runway.com/research/introducing-runway-gen-4.5), 2025\.
- Schiber et al\. \(2026\)Shira Schiber, Ofir Lindenbaum, and Idan Schwartz\.Tempocontrol: Temporal attention guidance for text\-to\-video models\.In*Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition*, pp\. 36670–36679, 2026\.
- Sharan et al\. \(2025\)SP Sharan, Minkyu Choi, Sahil Shah, Harsh Goel, Mohammad Omama, and Sandeep Chinchali\.Neuro\-symbolic evaluation of text\-to\-video models using formal verification\.In*2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition \(CVPR\)*, pp\. 8395–8405\. IEEE, 2025\.
- Shaulov et al\. \(2026\)Ariel Shaulov, Itay Hazan, Lior Wolf, and Hila Chefer\.Flowmo: Variance\-based flow guidance for coherent motion in video generation\.*Advances in Neural Information Processing Systems*, 38:82725–82754, 2026\.
- Sun et al\. \(2025\)Kaiyue Sun, Kaiyi Huang, Xian Liu, Yue Wu, Zihan Xu, Zhenguo Li, and Xihui Liu\.T2v\-compbench: A comprehensive benchmark for compositional text\-to\-video generation\.In*2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition \(CVPR\)*, pp\. 8406–8416\. IEEE, 2025\.
- Tian et al\. \(2024\)Ye Tian, Ling Yang, Haotian Yang, Yuan Gao, Yufan Deng, Jingmin Chen, Xintao Wang, Zhaochen Yu, Xin Tao, Pengfei Wan, et al\.Videotetris: Towards compositional text\-to\-video generation\.*Advances in Neural Information Processing Systems*, 37:29489–29513, 2024\.
- Wan et al\. \(2025\)Team Wan, Ang Wang, Baole Ai, Bin Wen, Chaojie Mao, Chen\-Wei Xie, Di Chen, Feiwu Yu, Haiming Zhao, Jianxiao Yang, et al\.Wan: Open and advanced large\-scale video generative models\.*arXiv preprint arXiv:2503\.20314*, 2025\.
- Wang et al\. \(2024\)Ao Wang, Hui Chen, Lihao Liu, Kai Chen, Zijia Lin, Jungong Han, and Guiguang Ding\.Yolov10: Real\-time end\-to\-end object detection\.*Advances in neural information processing systems*, 37:107984–108011, 2024\.
- Wu et al\. \(2025\)Ziyi Wu, Aliaksandr Siarohin, Willi Menapace, Ivan Skorokhodov, Yuwei Fang, Varnith Chordia, Igor Gilitschenski, and Sergey Tulyakov\.Mind the time: Temporally\-controlled multi\-event video generation\.In*2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition \(CVPR\)*, pp\. 23989–24000\. IEEE, 2025\.
- Yang et al\. \(2025\)Zhuoyi Yang, Jiayan Teng, Wendi Zheng, Ming Ding, Shiyu Huang, Jiazheng Xu, Yuanming Yang, Wenyi Hong, Xiaohan Zhang, Guanyu Feng, et al\.Cogvideox: Text\-to\-video diffusion models with an expert transformer\.In*International Conference on Learning Representations*, volume 2025, pp\. 83048–83077, 2025\.
- Zhang et al\. \(2024\)Qingru Zhang, Chandan Singh, Liyuan Liu, Xiaodong Liu, Bin Yu, Jianfeng Gao, and Tuo Zhao\.Tell your model where to attend: Post\-hoc attention steering for llms\.In*International Conference on Learning Representations*, volume 2024, pp\. 42411–42430, 2024\.
## Appendix ABoolean MTL semantics and examples
Given the frame\-level labelsy\(vi,c\)y\(v\_\{i\},c\)for visual concepts, the labely\(v,φ,t\)y\(v,\\varphi,t\)for a videovvsatisfying specificationφ\\varphistarting from frame1≤t≤T1\\leq t\\leq Tcan be computed deterministically using the standard Boolean semantics forMTLfMTL\_\{f\}as follows:
- •y\(v,⊤,t\)=1y\(v,\\top,t\)=1andy\(v,⊥,t\)=0y\(v,\\bot,t\)=0\.
- •y\(v,c,t\)=y\(vt,c\)y\(v,c,t\)=y\(v\_\{t\},c\)\.
- •y\(v,¬c,t\)=1y\(v,\\neg c,t\)=1iffy\(v,c,t\)=0y\(v,c,t\)=0\.
- •y\(v,φ1∧φ2,t\)=1y\(v,\\varphi\_\{1\}\\land\\varphi\_\{2\},t\)=1iffy\(v,φ1,t\)=1y\(v,\\varphi\_\{1\},t\)=1andy\(v,φ2,t\)=1y\(v,\\varphi\_\{2\},t\)=1\.
- •y\(v,φ1∨φ2,t\)=1y\(v,\\varphi\_\{1\}\\lor\\varphi\_\{2\},t\)=1iffy\(v,φ1,t\)=1y\(v,\\varphi\_\{1\},t\)=1ory\(v,φ2,t\)=1y\(v,\\varphi\_\{2\},t\)=1\.
- •y\(v,𝐗Iφ,t\)=1y\(v,\\mathbf\{X\}\_\{I\}\\varphi,t\)=1ifft<Tt<T,aI≤1≤bIa\_\{I\}\\leq 1\\leq b\_\{I\}, andy\(v,φ,t\+1\)=1y\(v,\\varphi,t\+1\)=1
- •y\(v,𝐆Iφ,t\)=1y\(v,\\mathbf\{G\}\_\{I\}\\varphi,t\)=1iffy\(v,φ,t′\)=1y\(v,\\varphi,t^\{\\prime\}\)=1for every integert′t^\{\\prime\}satisfyingt\+aI≤t′≤min\{t\+bI,T\}t\+a\_\{I\}\\leq t^\{\\prime\}\\leq\\min\\\{t\+b\_\{I\},T\\\}\.
- •y\(v,φ1𝐔Iφ2,t\)=1y\(v,\\varphi\_\{1\}\\mathbf\{U\}\_\{I\}\\varphi\_\{2\},t\)=1iff there exists an integert′t^\{\\prime\}satisfyingt\+aI≤t′≤min\{t\+bI,T\}t\+a\_\{I\}\\leq t^\{\\prime\}\\leq\\min\\\{t\+b\_\{I\},T\\\}such thaty\(v,φ2,t′\)=1y\(v,\\varphi\_\{2\},t^\{\\prime\}\)=1andy\(v,φ1,t′′\)=1y\(v,\\varphi\_\{1\},t^\{\\prime\\prime\}\)=1for every integert′′t^\{\\prime\\prime\}satisfyingt≤t′′<t′t\\leq t^\{\\prime\\prime\}<t^\{\\prime\}\.
where\[aI,bI\]\[a\_\{I\},b\_\{I\}\]is the integer\-offset interval corresponding toI=\[t1,t2\]I=\[t\_\{1\},t\_\{2\}\], withaI=⌈t1\(T−1\)⌉a\_\{I\}=\\left\\lceil t\_\{1\}\(T\-1\)\\right\\rceilandbI=⌊t2\(T−1\)⌋b\_\{I\}=\\left\\lfloor t\_\{2\}\(T\-1\)\\right\\rfloor\.
#### Example: departure with different timing constraints\.
For instance, we can represent "a dog leaves the scene" in a 5\-s long video, with decreasing flexibility in timing as:
𝖽𝗈𝗀𝐔\(𝐆¬𝖽𝗈𝗀\)⏟Leaves at an unspecified time𝖽𝗈𝗀𝐔\[0\.5,1\]\(𝐆¬𝖽𝗈𝗀\)⏟Leaves at some point during the second half𝖽𝗈𝗀𝐔\[0\.6,0\.6\]\(𝐆¬𝖽𝗈𝗀\)⏟Leaves at the 3s mark\.\\underbrace\{\\mathsf\{dog\}\\,\\mathbf\{U\}\\,\(\\mathbf\{G\}\\neg\\mathsf\{dog\}\)\}\_\{\{\\color\[rgb\]\{0\.4,0\.4,0\.4\}\\text\{Leaves at an unspecified time\}\}\}\\qquad\\underbrace\{\\mathsf\{dog\}\\,\\mathbf\{U\}\_\{\[0\.5,1\]\}\\,\(\\mathbf\{G\}\\neg\\mathsf\{dog\}\)\}\_\{\{\\color\[rgb\]\{0\.4,0\.4,0\.4\}\\text\{Leaves at some point during the second half\}\}\}\\qquad\\underbrace\{\\mathsf\{dog\}\\,\\mathbf\{U\}\_\{\[0\.6,0\.6\]\}\\,\(\\mathbf\{G\}\\neg\\mathsf\{dog\}\)\}\_\{\{\\color\[rgb\]\{0\.4,0\.4,0\.4\}\\text\{Leaves at the 3s mark\}\}\}\.
## Appendix BQuantitative semantics for MTL
We define a differentiable sum–product score for the fragment ofMTLfMTL\_\{f\}in Section[2](https://arxiv.org/html/2610.20822#S2)\. Inspired by the log\-domain computation of LogSTOP\([Khare et al\., 2025](https://arxiv.org/html/2610.20822#bib.bib16)\), this construction aggregates support for the witnesses permitted by a specification\. The score need not lie in\[0,1\]\[0,1\]and is not interpreted as a probability\. In particular, disjunction and existential temporal operators sum support for alternatives, rather than combining them through complements of composite scores\.
### B\.1Score definition and evaluation
Fix a sampling step, attention layer, and head, and writept,c=y^\(zt,c\)∈\[0,1\]p\_\{t,c\}=\\hat\{y\}\(z\_\{t\},c\)\\in\[0,1\]for the calibrated concept scores at latent framest=1,…,Nt=1,\\ldots,N, whereN=TzN=T\_\{z\}\. LetQψ\[t\]≥0Q\_\{\\psi\}\[t\]\\geq 0denote the score of subformulaψ\\psistarting at framett, and letSψ\[t\]=logQψ\[t\]S\_\{\\psi\}\[t\]=\\log Q\_\{\\psi\}\[t\], withlog0=−∞\\log 0=\-\\infty\. The scalar objective for steering isy^\(z,φ\)=Sφ\[1\]\\hat\{y\}\(z,\\varphi\)=S\_\{\\varphi\}\[1\]\.
For a normalized intervalI=\[ℓI,uI\]I=\[\\ell\_\{I\},u\_\{I\}\], define
aI\\displaystyle a\_\{I\}=⌈ℓI\(N−1\)⌉,bI=⌊uI\(N−1\)⌋,\\displaystyle=\\left\\lceil\\ell\_\{I\}\(N\-1\)\\right\\rceil,\\qquad b\_\{I\}=\\left\\lfloor u\_\{I\}\(N\-1\)\\right\\rfloor,\(4\)JI\(t\)\\displaystyle J\_\{I\}\(t\)=\{j∈ℤ:t\+aI≤j≤min\(t\+bI,N\)\}\.\\displaystyle=\\\{j\\in\\mathbb\{Z\}:t\+a\_\{I\}\\leq j\\leq\\min\(t\+b\_\{I\},N\)\\\}\.An omitted interval denotes\[0,1\]\[0,1\]\. Every interval is relative to the evaluation frame of its operator; the conversion to offsets always uses the full trace lengthNN, including for nested operators\. The setJI\(t\)J\_\{I\}\(t\)can be empty\.
The literal scores areQc\[t\]=pt,cQ\_\{c\}\[t\]=p\_\{t,c\}andQ¬c\[t\]=1−pt,cQ\_\{\\neg c\}\[t\]=1\-p\_\{t,c\}, withQ⊤\[t\]=1Q\_\{\\top\}\[t\]=1andQ⊥\[t\]=0Q\_\{\\bot\}\[t\]=0\. Conjunction and Always multiply their operand scores, whereas disjunction and Eventually sum them\. Next selects the score att\+1t\+1if this frame exists and1∈\[aI,bI\]1\\in\[a\_\{I\},b\_\{I\}\], and is zero otherwise\. Until is defined by
Qα𝐔Iβ\[t\]=∑j∈JI\(t\)Qβ\[j\]∏r=tj−1Qα\[r\]\.Q\_\{\\alpha\\mathbf\{U\}\_\{I\}\\beta\}\[t\]=\\sum\_\{j\\in J\_\{I\}\(t\)\}Q\_\{\\beta\}\[j\]\\prod\_\{r=t\}^\{j\-1\}Q\_\{\\alpha\}\[r\]\.\(5\)Each summand represents a witness atjj: the left operand is supported at every preceding frame, and the right operand is supported atjj\. There is no requirement that the right operand fail beforejj\. In particular,Q𝐅Iβ\[t\]=∑j∈JI\(t\)Qβ\[j\]=Q⊤𝐔Iβ\[t\]Q\_\{\\mathbf\{F\}\_\{I\}\\beta\}\[t\]=\\sum\_\{j\\in J\_\{I\}\(t\)\}Q\_\{\\beta\}\[j\]=Q\_\{\\top\\mathbf\{U\}\_\{I\}\\beta\}\[t\]\.
For integer offsets0≤a≤b0\\leq a\\leq b, writeUa,b\(t\)=Qα𝐔\[a,b\]β\[t\]U\_\{a,b\}\(t\)=Q\_\{\\alpha\\mathbf\{U\}\_\{\[a,b\]\}\\beta\}\[t\]\. Equation[5](https://arxiv.org/html/2610.20822#A2.E5)also gives the recurrence
Ua,b\(t\)=\{Qα\[t\]Ua−1,b−1\(t\+1\),a\>0,Qβ\[t\]\+Qα\[t\]U0,b−1\(t\+1\),a=0,U\_\{a,b\}\(t\)=\\begin\{cases\}Q\_\{\\alpha\}\[t\]U\_\{a\-1,b\-1\}\(t\+1\),&a\>0,\\\\ Q\_\{\\beta\}\[t\]\+Q\_\{\\alpha\}\[t\]U\_\{0,b\-1\}\(t\+1\),&a=0,\\end\{cases\}\(6\)where a remainder with no valid witness has score zero\. Thus the recurrence inside the permitted window isB\+ARB\+AR, whereAA,BB, andRRare the left\-operand, right\-operand, and remaining Until scores, respectively\.
### B\.2Linear\-time evaluation
Evaluating Equation[5](https://arxiv.org/html/2610.20822#A2.E5)independently at every starting frame would repeat work across overlapping windows\. Instead, we compute all windows using associative summaries\. For fixed child\-score arraysAt=Qα\[t\]A\_\{t\}=Q\_\{\\alpha\}\[t\]andBt=Qβ\[t\]B\_\{t\}=Q\_\{\\beta\}\[t\], summarize a consecutive block\[i,j\]\[i,j\]by
Pi:j=∏r=ijAr,Ri:j=∑k=ijBk∏r=ik−1Ar\.P\_\{i:j\}=\\prod\_\{r=i\}^\{j\}A\_\{r\},\\qquad R\_\{i:j\}=\\sum\_\{k=i\}^\{j\}B\_\{k\}\\prod\_\{r=i\}^\{k\-1\}A\_\{r\}\.\(7\)The first component is the left\-operand product, and the second is the weighted witness sum starting at the block’s first frame\. An empty block has summary\(1,0\)\(1,0\)\.
###### Lemma B\.1\(Composition of consecutive blocks\)
Summaries of consecutive blocks combine in temporal order under the associative operation
\(P1,R1\)∘\(P2,R2\)=\(P1P2,R1\+P1R2\),\(P\_\{1\},R\_\{1\}\)\\circ\(P\_\{2\},R\_\{2\}\)=\(P\_\{1\}P\_\{2\},\\ R\_\{1\}\+P\_\{1\}R\_\{2\}\),\(8\)with identity\(1,0\)\(1,0\)\.
###### Proof\.
The left\-operand product over the concatenation isP1P2P\_\{1\}P\_\{2\}\. A witness either lies in the first block, contributingR1R\_\{1\}, or lies in the second and requires the left operand throughout the first, contributingP1R2P\_\{1\}R\_\{2\}\. Both parenthesizations of three summaries give\(P1P2P3,R1\+P1R2\+P1P2R3\)\(P\_\{1\}P\_\{2\}P\_\{3\},R\_\{1\}\+P\_\{1\}R\_\{2\}\+P\_\{1\}P\_\{2\}R\_\{3\}\), establishing associativity\. The identity follows by substitution\. The argument allows zero scores and does not require division\. ∎
For a nonempty witness window, the Until score factors as
Qα𝐔Iβ\[t\]=\(∏r=tt\+aI−1Ar\)Rt\+aI:min\(t\+bI,N\)\.Q\_\{\\alpha\\mathbf\{U\}\_\{I\}\\beta\}\[t\]=\\left\(\\prod\_\{r=t\}^\{t\+a\_\{I\}\-1\}A\_\{r\}\\right\)R\_\{t\+a\_\{I\}:\\min\(t\+b\_\{I\},N\)\}\.\(9\)The prefix maintains the left operand before the window; the block summary handles all witnesses inside it\. Both factors can be obtained for all starting frames by sliding windows\. An empty witness window still has score zero\.
We compute block summaries in log space\. For\(u,v\)=\(logP,logR\)\(u,v\)=\(\\log P,\\log R\), Equation[8](https://arxiv.org/html/2610.20822#A2.E8)becomes
\(u,v\)⋆\(u′,v′\)=\(u\+u′,logaddexp\(v,u\+v′\)\),\(u,v\)\\star\(u^\{\\prime\},v^\{\\prime\}\)=\\bigl\(u\+u^\{\\prime\},\\operatorname\{logaddexp\}\(v,u\+v^\{\\prime\}\)\\bigr\),\(10\)with identity\(0,−∞\)\(0,\-\\infty\)\. A single frame has summary\(Sα\[t\],Sβ\[t\]\)\(S\_\{\\alpha\}\[t\],S\_\{\\beta\}\[t\]\)\. This avoids direct products of scores and differences of potentially infinite prefix sums\.
Algorithm 1Linear\-time interval\-aware sum–product scoring in log space1:Concept scores
pt,c=y^\(zt,c\)∈\[0,1\]p\_\{t,c\}=\\hat\{y\}\(z\_\{t\},c\)\\in\[0,1\],
t=1,…,N=Tzt=1,\\ldots,N=T\_\{z\}; specification
φ\\varphi
2:Log score
Sφ\[1\]=y^\(z,φ\)S\_\{\\varphi\}\[1\]=\\hat\{y\}\(z,\\varphi\)for a fixed sampling step, layer, and head
3:Convert each normalized interval to
\(aI,bI\)\(a\_\{I\},b\_\{I\}\)as in Equation[4](https://arxiv.org/html/2610.20822#A2.E4)\.
4:
WindowFold\(x,a,b,∘,e\)\\textsc\{WindowFold\}\(x,a,b,\\circ,e\)returns all window aggregates \(Algorithm[2](https://arxiv.org/html/2610.20822#alg2)\)\.
5:
⋆\\staris the log\-domain block operation in Equation[10](https://arxiv.org/html/2610.20822#A2.E10)\.
6:foreach distinct subformula
ψ\\psiin postorder \(children before parents\)do
7:if
ψ=𝐆Iα\\psi=\\mathbf\{G\}\_\{I\}\\alphathen
8:
Sψ←WindowFold\(Sα,aI,bI,\+,0\)S\_\{\\psi\}\\leftarrow\\textsc\{WindowFold\}\(S\_\{\\alpha\},a\_\{I\},b\_\{I\},\+,0\)
9:elseif
ψ=𝐅Iα\\psi=\\mathbf\{F\}\_\{I\}\\alphathen
10:
Sψ←WindowFold\(Sα,aI,bI,logaddexp,−∞\)S\_\{\\psi\}\\leftarrow\\textsc\{WindowFold\}\(S\_\{\\alpha\},a\_\{I\},b\_\{I\},\\operatorname\{logaddexp\},\-\\infty\)
11:elseif
ψ=α𝐔Iβ\\psi=\\alpha\\,\\mathbf\{U\}\_\{I\}\\,\\betathen
12:
H←WindowFold\(Sα,0,aI−1,\+,0\)H\\leftarrow\\textsc\{WindowFold\}\(S\_\{\\alpha\},0,a\_\{I\}\-1,\+,0\)⊳\\trianglerightLeft operand before the window
13:
xj←\(Sα\[j\],Sβ\[j\]\)x\_\{j\}\\leftarrow\(S\_\{\\alpha\}\[j\],S\_\{\\beta\}\[j\]\)for
j=1,…,Nj=1,\\ldots,N
14:
W←WindowFold\(x,aI,bI,⋆,\(0,−∞\)\)W\\leftarrow\\textsc\{WindowFold\}\(x,a\_\{I\},b\_\{I\},\\star,\(0,\-\\infty\)\)
15:
Sψ\[t\]←H\[t\]\+W\[t\]2S\_\{\\psi\}\[t\]\\leftarrow H\[t\]\+W\[t\]\_\{2\}for
t=1,…,Nt=1,\\ldots,N
16:else
17:for
t=1,…,Nt=1,\\ldots,Ndo
18:
Sψ\[t\]←\{0ψ=⊤,−∞ψ=⊥,logpt,cψ=c,log\(1−pt,c\)ψ=¬c,Sα\[t\]\+Sβ\[t\]ψ=α∧β,logaddexp\(Sα\[t\],Sβ\[t\]\)ψ=α∨β,Sα\[t\+1\]ψ=𝐗Iα,t<N,aI≤1≤bI,−∞ψ=𝐗Iαotherwise\.\\displaystyle S\_\{\\psi\}\[t\]\\leftarrow\\begin\{cases\}0&\\psi=\\top,\\\\ \-\\infty&\\psi=\\bot,\\\\ \\log p\_\{t,c\}&\\psi=c,\\\\ \\log\(1\-p\_\{t,c\}\)&\\psi=\\neg c,\\\\ S\_\{\\alpha\}\[t\]\+S\_\{\\beta\}\[t\]&\\psi=\\alpha\\land\\beta,\\\\ \\operatorname\{logaddexp\}\(S\_\{\\alpha\}\[t\],S\_\{\\beta\}\[t\]\)&\\psi=\\alpha\\lor\\beta,\\\\ S\_\{\\alpha\}\[t\+1\]&\\psi=\\mathbf\{X\}\_\{I\}\\alpha,\\ t<N,\\ a\_\{I\}\\leq 1\\leq b\_\{I\},\\\\ \-\\infty&\\psi=\\mathbf\{X\}\_\{I\}\\alpha\\text\{ otherwise\}\.\\end\{cases\}
19:endfor
20:endif
21:Cache
Sψ\[1:N\]S\_\{\\psi\}\[1:N\]\.
22:endfor
23:return
Sφ\[1\]S\_\{\\varphi\}\[1\]
24:
W\[t\]2W\[t\]\_\{2\}denotes the second component; each
SψS\_\{\\psi\},
HH, and
WWis a length\-
NNarray\.
25:
log0=−∞\\log 0=\-\\infty; empty windows return the supplied identity
ee\.
26:
logaddexp\(x,y\)=log\(ex\+ey\)\\operatorname\{logaddexp\}\(x,y\)=\\log\(e^\{x\}\+e^\{y\}\), evaluated stably\.
#### Sliding\-window aggregation\.
Algorithm[2](https://arxiv.org/html/2610.20822#alg2)computes all window aggregates for an associative operation with a constant\-size summary\. Its queue is implemented with a front stack and a back stack\. Every stack entry stores its value and a cached aggregate\. The front aggregateGFG\_\{F\}runs from the top to the bottom of the front stack; the back aggregateGBG\_\{B\}runs from the bottom to the top of the back stack\. An empty stack has aggregateee\. The operations are:
- •PushBack\(x\)\\operatorname\{PushBack\}\(x\): push\(x,GB∘x\)\(x,G\_\{B\}\\circ x\)onto the back stack\.
- •PopFront\(\)\\operatorname\{PopFront\}\(\): if the front stack is empty, transfer all values from the back stack, popping each valuexxand pushing\(x,x∘GF\)\(x,x\\circ G\_\{F\}\)onto the front stack\. Then pop the front stack\.
- •Aggregate\(\)\\operatorname\{Aggregate\}\(\): returnGF∘GBG\_\{F\}\\circ G\_\{B\}\.
The order of combination is essential because the Until operation is not commutative\. Each value enters the back stack once, transfers to the front stack at most once, and leaves the queue at most once\. Push and aggregate operations have constant cost; removal has amortized constant cost\. No inverse operation is needed, so zero child scores and empty windows are handled directly\.
Algorithm 2All sliding\-window aggregates in linear time1:Sequence
x1,…,xNx\_\{1\},\\ldots,x\_\{N\}; integer offsets
a≥0,ba\\geq 0,b; associative operation
∘\\circwith identity
ee
2:
W\[t\]=xt\+a∘⋯∘xmin\(t\+b,N\)W\[t\]=x\_\{t\+a\}\\circ\\cdots\\circ x\_\{\\min\(t\+b,N\)\}, or
eefor an empty window
3:functionWindowFold\(
x,a,b,∘,ex,a,b,\\circ,e\)
4:if
a\>ba\>bthen
5:return
\[e,…,e\]\[e,\\ldots,e\]⊳\\trianglerightIncludes the empty prefix whena=0,b=−1a=0,b=\-1
6:endif
7:Initialize an empty aggregate queue
DDwith operation
∘\\circand identity
ee\.
8:
l←1l\\leftarrow 1;
r←0r\\leftarrow 0
9:for
t=1,…,Nt=1,\\ldots,Ndo
10:
L←min\(t\+a,N\+1\)L\\leftarrow\\min\(t\+a,N\+1\);
R←min\(t\+b,N\)R\\leftarrow\\min\(t\+b,N\)
11:while
r<Rr<Rdo
12:
r←r\+1r\\leftarrow r\+1;
D\.PushBack\(xr\)D\.\\operatorname\{PushBack\}\(x\_\{r\}\)
13:endwhile
14:while
l<Ll<Ldo
15:
D\.PopFront\(\)D\.\\operatorname\{PopFront\}\(\);
l←l\+1l\\leftarrow l\+1
16:endwhile
17:
W\[t\]←D\.Aggregate\(\)W\[t\]\\leftarrow D\.\\operatorname\{Aggregate\}\(\)
18:endfor
19:return
WW
20:endfunction
21:The queue uses two stacks with cached aggregates, as defined in Appendix[B\.2](https://arxiv.org/html/2610.20822#A2.SS2)\.
22:Each element is inserted once and removed at most once; aggregation preserves sequence order\.
###### Proposition B\.2\(Correctness and complexity of evaluation\)
Algorithm[1](https://arxiv.org/html/2610.20822#alg1)computes the stated sum–product log score usingO\(\|φ\|N\)O\(\|\\varphi\|N\)arithmetic operations andO\(\|φ\|N\)O\(\|\\varphi\|N\)storage, including for nested temporal operators\. These bounds count operations on scalar scores as constant\-time operations\.
###### Proof\.
For fixed offsetsa≤ba\\leq b, both endpoints of the clipped window advance monotonically withtt\. Algorithm[2](https://arxiv.org/html/2610.20822#alg2)therefore inserts each sequence element once and removes it at most once\. The cached stack aggregates preserve the sequence order by associativity, so each returned value is the requested window aggregate\. Including transfers between stacks, the total work for allNNwindows isO\(N\)O\(N\)\. Ifa\>ba\>b, the algorithm directly returns the identity at every frame inO\(N\)O\(N\)time\.
Always uses addition of log scores with identity zero; Eventually uses log\-add\-exp with identity−∞\-\\infty\. Until uses one window computation for the prefix log product and one for the log\-domain block summaries\. Lemma[B\.1](https://arxiv.org/html/2610.20822#A2.Thmmytheorem1)and Equation[9](https://arxiv.org/html/2610.20822#A2.E9)show that their combination equals Equation[5](https://arxiv.org/html/2610.20822#A2.E5), including empty windows\. Constants, literals, Boolean operators, and Next takeO\(N\)O\(N\)work by pointwise evaluation\. Processing subformulas in postorder proves correctness by induction and evaluates each distinct subformula once, givingO\(\|φ\|N\)O\(\|\\varphi\|N\)total work\. Cached score arrays requireO\(\|φ\|N\)O\(\|\\varphi\|N\)storage, and the working arrays and aggregate queues requireO\(N\)O\(N\)additional space per subformula\. The argument depends only on the number of subformulas, not on their nesting depth\. ∎
The computation also hasO\(\|φ\|N\)O\(\|\\varphi\|N\)scalar intermediate operations\. At differentiable inputs, reverse\-mode differentiation can therefore use the same asymptotic time and storage bounds, with structurally zero branches handled as constants\. This is an arithmetic complexity statement; it does not establish a wall\-clock speedup over a vectorized quadratic implementation on a GPU\.
#### Numerical evaluation\.
The mathematical definition admits exact zeros and ones\. For numerical gradients, literal inputs can be clipped to\[ϵLS,1−ϵLS\]\[\\epsilon\_\{\\mathrm\{LS\}\},1\-\\epsilon\_\{\\mathrm\{LS\}\}\], separately from the calibration in Equation[2](https://arxiv.org/html/2610.20822#S4.E2)\. Composite scores are not clipped to one, and negation is applied only to atoms\. Products are computed as sums of logarithms, and sums as log\-sum\-exp reductions\. Empty products are one and empty sums are zero: Always on an empty window has log score zero, while Eventually and Until have log score−∞\-\\infty\. On the domain whereQφ\[1\]\>0Q\_\{\\varphi\}\[1\]\>0, the log score is differentiable for literal inputs strictly between zero and one\. Structurally zero branches, including log\-add\-exp with two constant−∞\-\\inftyinputs, should be handled explicitly when differentiating\. If the entire score is identically zero, for example because a required witness window is empty, its logarithm provides no finite gradient; the specification must be checked for feasibility on the chosen grid, and that objective should not produce a steering update\.
### B\.3Monotonicity and its scope
To distinguish support for a literal from the underlying concept score, introduce independent nonnegative inputsxt,c\+x^\{\+\}\_\{t,c\}andxt,c−x^\{\-\}\_\{t,c\}forccand¬c\\neg c, respectively\. Write𝒬φ\(x\)\\mathcal\{Q\}\_\{\\varphi\}\(x\)for the score obtained from the same rules with these literal inputs\. The score on a concept trace is recovered by substitutingxt,c\+=pt,cx^\{\+\}\_\{t,c\}=p\_\{t,c\}andxt,c−=1−pt,cx^\{\-\}\_\{t,c\}=1\-p\_\{t,c\}\.
###### Proposition B\.3\(Monotonicity in literal support\)
Fix a finite temporal grid and the intervals of a specificationφ\\varphiin the stated fragment\. The function𝒬φ\\mathcal\{Q\}\_\{\\varphi\}is a polynomial with nonnegative coefficients in the independent literal\-support inputs\. Consequently, for any componentwise ordered inputs0≤x≤x′0\\leq x\\leq x^\{\\prime\},
𝒬φ\(x\)≤𝒬φ\(x′\)\.\\mathcal\{Q\}\_\{\\varphi\}\(x\)\\leq\\mathcal\{Q\}\_\{\\varphi\}\(x^\{\\prime\}\)\.The same inequality holds for their logarithms wherever both scores are positive\. The claim allows arbitrary nesting of the supported operators and is non\-strict\.
###### Proof\.
We proceed by structural induction on the formula, simultaneously for every starting frame\. Constants are nonnegative constant polynomials, and literal scores are individual input variables\. Conjunction and Always take finite products of child scores; disjunction and Eventually take finite sums\. These operations preserve polynomials with nonnegative coefficients, including their empty\-product and empty\-sum conventions\. Next selects a child score or the constant zero\. Finally, each Until score in Equation[5](https://arxiv.org/html/2610.20822#A2.E5)is a finite sum of products of child scores, and therefore has the same property\. This completes the induction\. Every monomial with a nonnegative coefficient is nondecreasing in nonnegative inputs, so their sum is nondecreasing as well\. The logarithm is increasing on the positive real numbers\. ∎
###### Corollary B\.4\(Monotonicity in a concept–time coordinate\)
Expand the score at a fixed starting frame into literal\-support inputs\. If a concept–time pair\(t,c\)\(t,c\)occurs only positively, the specification score is nondecreasing inpt,cp\_\{t,c\}; if it occurs only negatively, the specification score is nonincreasing inpt,cp\_\{t,c\}, with all other concept scores fixed\. These directions also hold for its logarithm wherever the specification score is positive\.
###### Proof\.
In the first case, increasingpt,cp\_\{t,c\}increases the only relevant literal inputxt,c\+x^\{\+\}\_\{t,c\}\. In the second, it decreases the only relevant inputxt,c−=1−pt,cx^\{\-\}\_\{t,c\}=1\-p\_\{t,c\}\. Apply Proposition[B\.3](https://arxiv.org/html/2610.20822#A2.Thmmytheorem3)\. ∎
Consistency of polarity is required only for the concept–time coordinate in this sufficient condition, not for an entire concept throughout the formula\. For example, presence in an early interval and absence in a disjoint later interval have consistent directions at each frame\. Both polarities are allowed at the same frame, but then
∂Qφ\[1\]∂pt,c=∂𝒬φ∂xt,c\+−∂𝒬φ∂xt,c−,\\frac\{\\partial Q\_\{\\varphi\}\[1\]\}\{\\partial p\_\{t,c\}\}=\\frac\{\\partial\\mathcal\{Q\}\_\{\\varphi\}\}\{\\partial x^\{\+\}\_\{t,c\}\}\-\\frac\{\\partial\\mathcal\{Q\}\_\{\\varphi\}\}\{\\partial x^\{\-\}\_\{t,c\}\},\(11\)evaluated at the corresponding literal inputs\. Each term on the right is nonnegative; their difference need not have a fixed sign\. A formula with mixed polarity can nevertheless be monotone after simplification, as the untimed Until example below demonstrates\. No probabilistic independence assumption is needed for these algebraic claims\.
#### Agreement with Boolean satisfaction\.
For exact Boolean concept inputs,Qφ\[t\]\>0Q\_\{\\varphi\}\[t\]\>0if and only if the trace satisfiesφ\\varphiatttunder Section[2](https://arxiv.org/html/2610.20822#S2)\. This follows by structural induction: a product of nonnegative scores is positive exactly when all its factors are positive, and a sum is positive exactly when at least one summand is positive\. Applied to Equation[5](https://arxiv.org/html/2610.20822#A2.E5), these conditions are precisely an admissible right\-operand witness and satisfaction of the left operand at all preceding frames\. The constants, literals, Next, and empty\-window cases follow their Boolean definitions\. This statement concerns the unclipped score; it does not prescribe a satisfaction threshold for soft inputs\.
Different satisfying traces can have different scores, and logically equivalent formulas need not have identical soft scores\. Summing alternatives rewards multiple supported witnesses, and repeating a disjunct changes its weight\. We therefore retain the input formula’s structure rather than treating Boolean rewrites as score\-preserving transformations\.
### B\.4Examples and implications for gradients
For the following examples, letpt=y^\(zt,𝖽𝗈𝗀\)∈\(0,1\)p\_\{t\}=\\hat\{y\}\(z\_\{t\},\\mathsf\{dog\}\)\\in\(0,1\), and letut=logit\(pt\)u\_\{t\}=\\operatorname\{logit\}\(p\_\{t\}\)be its calibrated trace logit\. Thisutu\_\{t\}is distinct from a transformer attention logit\. We writeQ=Qφ\[1\]Q=Q\_\{\\varphi\}\[1\]andS=logQS=\\log Q, assumingQ\>0Q\>0\.
#### Presence and absence in prescribed intervals\.
Forφ=𝐆I\+𝖽𝗈𝗀∧𝐆I−¬𝖽𝗈𝗀\\varphi=\\mathbf\{G\}\_\{I\_\{\+\}\}\\mathsf\{dog\}\\land\\mathbf\{G\}\_\{I\_\{\-\}\}\\neg\\mathsf\{dog\}, letE=JI\+\(1\)E=J\_\{I\_\{\+\}\}\(1\)andA=JI−\(1\)A=J\_\{I\_\{\-\}\}\(1\)be disjoint\. Then
S=∑t∈Elogpt\+∑t∈Alog\(1−pt\),∂S∂ut=𝟏\{t∈E\}\(1−pt\)−𝟏\{t∈A\}pt\.S=\\sum\_\{t\\in E\}\\log p\_\{t\}\+\\sum\_\{t\\in A\}\\log\(1\-p\_\{t\}\),\\qquad\\frac\{\\partial S\}\{\\partial u\_\{t\}\}=\\mathbf\{1\}\_\{\\\{t\\in E\\\}\}\(1\-p\_\{t\}\)\-\\mathbf\{1\}\_\{\\\{t\\in A\\\}\}p\_\{t\}\.\(12\)Gradient ascent thus increases presence evidence inEE, decreases it inAA, and leaves unconstrained frames unaffected\. A strictly timed witness is likewise obtained by restricting an existential operator to a singleton window, provided the requested time lies on the grid\.
#### Untimed departure without persistence\.
Forφ=𝖽𝗈𝗀𝐔¬𝖽𝗈𝗀\\varphi=\\mathsf\{dog\}\\,\\mathbf\{U\}\\,\\neg\\mathsf\{dog\}, the witness sum telescopes:
Q=∑j=1N\(1−pj\)∏r<jpr=1−∏t=1Npt,∂Q∂pt=−∏r≠tpr≤0\.Q=\\sum\_\{j=1\}^\{N\}\(1\-p\_\{j\}\)\\prod\_\{r<j\}p\_\{r\}=1\-\\prod\_\{t=1\}^\{N\}p\_\{t\},\\qquad\\frac\{\\partial Q\}\{\\partial p\_\{t\}\}=\-\\prod\_\{r\\neq t\}p\_\{r\}\\leq 0\.\(13\)Increasing absence evidence at any frame cannot decrease this score, despite its mixed polarity\. Under Boolean semantics, the formula is equivalent to𝐅¬𝖽𝗈𝗀\\mathbf\{F\}\\neg\\mathsf\{dog\}: choose the first absent frame as the Until witness, and all earlier frames necessarily contain the dog\. An immediate witness is permitted, and no constraint is imposed after the witness\. Nevertheless, our score for𝐅¬𝖽𝗈𝗀\\mathbf\{F\}\\neg\\mathsf\{dog\}is∑t\(1−pt\)\\sum\_\{t\}\(1\-p\_\{t\}\), illustrating that Boolean equivalence does not imply equality of soft scores\.
#### Departure followed by persistent absence\.
Forφ=𝖽𝗈𝗀𝐔I\(𝐆¬𝖽𝗈𝗀\)\\varphi=\\mathsf\{dog\}\\,\\mathbf\{U\}\_\{I\}\\,\(\\mathbf\{G\}\\neg\\mathsf\{dog\}\), define
wj=∏r<jpr⏟presence beforej∏r≥j\(1−pr\)⏟absence fromj,Q=∑j∈JI\(1\)wj,πj=wjQ\.w\_\{j\}=\\underbrace\{\\prod\_\{r<j\}p\_\{r\}\}\_\{\\text\{presence before \}j\}\\quad\\underbrace\{\\prod\_\{r\\geq j\}\(1\-p\_\{r\}\)\}\_\{\\text\{absence from \}j\},\\qquad Q=\\sum\_\{j\\in J\_\{I\}\(1\)\}w\_\{j\},\\qquad\\pi\_\{j\}=\\frac\{w\_\{j\}\}\{Q\}\.\(14\)Each term corresponds to one complete departure pattern\. DifferentiatinglogQ\\log Qgives a weighted combination of the gradients of these patterns:
∂S∂ut=∑j∈JI\(1\)πj∂logwj∂ut=∑j∈JI\(1\)j\>tπj⏟support for being present att−pt\.\\frac\{\\partial S\}\{\\partial u\_\{t\}\}=\\sum\_\{j\\in J\_\{I\}\(1\)\}\\pi\_\{j\}\\frac\{\\partial\\log w\_\{j\}\}\{\\partial u\_\{t\}\}=\\underbrace\{\\sum\_\{\\begin\{subarray\}\{c\}j\\in J\_\{I\}\(1\)\\\\ j\>t\\end\{subarray\}\}\\pi\_\{j\}\}\_\{\\text\{support for being present at \}t\}\-p\_\{t\}\.\(15\)Before the earliest admissible departure this derivative is1−pt1\-p\_\{t\}; at or after the latest admissible departure it is−pt\-p\_\{t\}\. Within the window its sign depends on the relative support for departure times on either side oftt\. Thus the objective encourages a coherent departure, rather than absence independently at every permitted frame\.
An unconditional claim that more absence always helps would contradict the required persistence\. For untimed Until, the Boolean trace\[1,1,1,0\]\[1,1,1,0\]has score one, whereas changing its second frame to obtain\[1,0,1,0\]\[1,0,1,0\]gives score zero: the dog now returns after an earlier disappearance\. Also, the formula as written permits absence throughout\. To require initial presence, one must explicitly conjoin𝖽𝗈𝗀\\mathsf\{dog\}\.
#### Nested departure and return\.
Forφ=𝖽𝗈𝗀𝐔I1\(¬𝖽𝗈𝗀𝐔I2𝖽𝗈𝗀\)\\varphi=\\mathsf\{dog\}\\,\\mathbf\{U\}\_\{I\_\{1\}\}\(\\neg\\mathsf\{dog\}\\,\\mathbf\{U\}\_\{I\_\{2\}\}\\mathsf\{dog\}\), recursive evaluation yields
Q=∑j∈JI1\(1\)∑k∈JI2\(j\)∏r<jpr⏟before departure∏r=jk−1\(1−pr\)⏟absent until returnpk⏟return\.Q=\\sum\_\{j\\in J\_\{I\_\{1\}\}\(1\)\}\\sum\_\{k\\in J\_\{I\_\{2\}\}\(j\)\}\\underbrace\{\\prod\_\{r<j\}p\_\{r\}\}\_\{\\text\{before departure\}\}\\quad\\underbrace\{\\prod\_\{r=j\}^\{k\-1\}\(1\-p\_\{r\}\)\}\_\{\\text\{absent until return\}\}\\quad\\underbrace\{p\_\{k\}\}\_\{\\text\{return\}\}\.\(16\)Each admissible pair\(j,k\)\(j,k\)contributes gradients that favor presence beforejj, absence fromjjthroughk−1k\-1, and presence atkk; it imposes no condition afterkk\. The log\-score gradient is their weighted combination, with weights proportional to the corresponding summands\. Replacing the final𝖽𝗈𝗀\\mathsf\{dog\}by𝐆𝖽𝗈𝗀\\mathbf\{G\}\\mathsf\{dog\}replacespkp\_\{k\}by∏r=kNpr\\prod\_\{r=k\}^\{N\}p\_\{r\}and requires persistence after return\.
The second interval is measured fromjj, not from the start of the video\. A lower boundaI2≥1a\_\{I\_\{2\}\}\\geq 1requires at least one absent frame between departure and return\. In particular, forN≥2N\\geq 2andI1=I2=\[0\.5,1\]I\_\{1\}=I\_\{2\}=\[0\.5,1\], departure must occur at the midpoint and return at the final frame\. This pair exists only if the midpoint lies on the sampled grid: writingd=⌈\(N−1\)/2⌉d=\\lceil\(N\-1\)/2\\rceil, two successive delays require2d≤N−12d\\leq N\-1\. Otherwise the witness set is empty\. Shorter lower bounds permit multiple departure–return pairs\.
#### Alternative outcomes\.
Forφ=α∨β\\varphi=\\alpha\\lor\\betawith positive operand scores,
∇S=QαQα\+Qβ∇logQα\+QβQα\+Qβ∇logQβ\.\\nabla S=\\frac\{Q\_\{\\alpha\}\}\{Q\_\{\\alpha\}\+Q\_\{\\beta\}\}\\nabla\\log Q\_\{\\alpha\}\+\\frac\{Q\_\{\\beta\}\}\{Q\_\{\\alpha\}\+Q\_\{\\beta\}\}\\nabla\\log Q\_\{\\beta\}\.\(17\)The update combines the directions for both alternatives according to their current support\. A disjunction alone does not impose exclusivity or select a single branch; when exclusivity is intended, it must be encoded in the specification\. Similarly, summing temporal witnesses can favor support at several admissible times rather than only one\.
#### Transferring gradients to attention biases\.
For any differentiable input representation andQ\>0Q\>0,∇S=∇Q/Q\\nabla S=\\nabla Q/Q\. Thus the nonzero gradients ofSSandQQhave the same direction after the infinity\-norm normalization used by TSG, before numerical thresholds and clipping\. The score need not be bounded by one for this normalization to apply\. If the calibration statistics are held fixed while differentiating Equation[2](https://arxiv.org/html/2610.20822#S4.E2), thenut,c=\(at,c−μc\)/\(τsc\+ϵ\)u\_\{t,c\}=\(a\_\{t,c\}\-\\mu\_\{c\}\)/\(\\tau s\_\{c\}\+\\epsilon\)gives
∂S∂at,c=1τsc\+ϵ∂S∂ut,c\.\\frac\{\\partial S\}\{\\partial a\_\{t,c\}\}=\\frac\{1\}\{\\tau s\_\{c\}\+\\epsilon\}\\frac\{\\partial S\}\{\\partial u\_\{t,c\}\}\.The positive factor preserves the gradient signs described above\.
## Appendix CThe TSG algorithm
Algorithm 3Temporal Specification Guidance with online attention steering1:Prompt embeddings
ep,erefe\_\{p\},e\_\{\\mathrm\{ref\}\}, specification
φ\\varphi, transformer
TθT\_\{\\theta\}, decoder
DD
2:Sampling steps
NN, guided steps
𝒦\\mathcal\{K\}, selected layer–head pairs
ℋ\\mathcal\{H\}
3:CFG scale
λcfg\\lambda\_\{\\mathrm\{cfg\}\}, TSG norm ratio
ρ\\rho, bias step size
η\\eta, bounds
\[bmin,bmax\]\[b\_\{\\min\},b\_\{\\max\}\]
4:Calibration temperature
τ\\tauand stabilizer
ϵ\\epsilon
5:Generated video
vv
6:Map concepts in
φ\\varphito prompt\-token sets
𝒫c\\mathcal\{P\}\_\{c\}
7:Initialize
zN∼𝒩\(0,I\)z\_\{N\}\\sim\\mathcal\{N\}\(0,I\); convert intervals in
φ\\varphito the latent temporal grid
8:for
k=N,N−1,…,1k=N,N\-1,\\ldots,1do
9:
dk,c←Tθ\(zk,ep,k\)d\_\{k,c\}\\leftarrow T\_\{\\theta\}\(z\_\{k\},e\_\{p\},k\)without steering
10:
dk,u←Tθ\(zk,eref,k\)d\_\{k,u\}\\leftarrow T\_\{\\theta\}\(z\_\{k\},e\_\{\\mathrm\{ref\}\},k\)without steering
11:
dk,cfg←dk,u\+λcfg\(dk,c−dk,u\)d\_\{k,\\mathrm\{cfg\}\}\\leftarrow d\_\{k,u\}\+\\lambda\_\{\\mathrm\{cfg\}\}\(d\_\{k,c\}\-d\_\{k,u\}\)
12:
dk←dk,cfgd\_\{k\}\\leftarrow d\_\{k,\\mathrm\{cfg\}\}
13:if
k∈𝒦k\\in\\mathcal\{K\}then
14:Begin an additional conditional evaluation of
Tθ\(zk,ep,k\)T\_\{\\theta\}\(z\_\{k\},e\_\{p\},k\)without a transformer gradient graph
15:forselected attention layers
ℓ\\ell, in forward orderdo
16:Advance this guided pass to layer
ℓ\\ell, using outputs of the preceding layers
17:for allheads
hhwith
\(ℓ,h\)∈ℋ\(\\ell,h\)\\in\\mathcal\{H\}do
18:Compute current attention
Aℓ,hA^\{\\ell,h\}before the local intervention
19:Form raw traces
aℓ,ha^\{\\ell,h\}using Equation[2](https://arxiv.org/html/2610.20822#S4.E2); detach and enable trace gradients
20:Calibrate to
y^ℓ,h\\hat\{y\}^\{\\ell,h\}using Equation[2](https://arxiv.org/html/2610.20822#S4.E2), holding statistics fixed
21:
Sℓ,h←Score\(y^ℓ,h,φ\)S\_\{\\ell,h\}\\leftarrow\\operatorname\{Score\}\(\\hat\{y\}^\{\\ell,h\},\\varphi\)
22:for allconcepts
ccin
φ\\varphido
23:
g⋅,c←∇a⋅,cSℓ,hg\_\{\\cdot,c\}\\leftarrow\\nabla\_\{a\_\{\\cdot,c\}\}S\_\{\\ell,h\}
24:
b⋅,c←ηg⋅,c/‖g⋅,c‖∞b\_\{\\cdot,c\}\\leftarrow\\eta g\_\{\\cdot,c\}/\\\|g\_\{\\cdot,c\}\\\|\_\{\\infty\}; use zero for negligible gradients
25:endfor
26:Broadcast
bbto query–text pairs; center across text keys and clip to obtain
Bℓ,hB^\{\\ell,h\}
27:Detach
Bℓ,hB^\{\\ell,h\}and apply it at this head using Equation[3](https://arxiv.org/html/2610.20822#S4.E3)
28:endfor
29:Complete layer
ℓ\\ellwith the biased attention; release local scoring buffers
30:endfor
31:
dk,φ←d\_\{k,\\varphi\}\\leftarrowoutput of the completed guided forward pass
32:
rk←dk,φ−dk,cr\_\{k\}\\leftarrow d\_\{k,\\varphi\}\-d\_\{k,c\}; compute
λk,tsg\\lambda\_\{k,\\mathrm\{tsg\}\}using Equation[1](https://arxiv.org/html/2610.20822#S4.E1)
33:
dk←dk,cfg\+λk,tsgrkd\_\{k\}\\leftarrow d\_\{k,\\mathrm\{cfg\}\}\+\\lambda\_\{k,\\mathrm\{tsg\}\}r\_\{k\}
34:endif
35:
zk−1←Stepk\(zk,dk\)z\_\{k\-1\}\\leftarrow\\operatorname\{Step\}\_\{k\}\(z\_\{k\},d\_\{k\}\)
36:endfor
37:return
D\(z0\)D\(z\_\{0\}\)
Algorithm[3](https://arxiv.org/html/2610.20822#alg3)presents TSG with online attention steering\. The guided steps are the firstNtsgN\_\{\\mathrm\{tsg\}\}sampling updates, i\.e\.,𝒦=\{N−Ntsg\+1,…,N\}\\mathcal\{K\}=\\\{N\-N\_\{\\mathrm\{tsg\}\}\+1,\\ldots,N\\\}\. The loop over selected attention layers takes place within a single additional forward pass: normal transformer operations proceed between interventions, and later layers use the representations produced by earlier steered layers\. Differentiation is enabled only for the detached traces, their calibration, and the specification score\.
## Appendix DThe TSG benchmark
Table 3:The 11 temporal constraint categories in the main benchmark, each containing 20 examples\. Descriptions summarize the temporal structure; individual specifications also encode timing, absence, and persistence requirements\.#### Visual concepts as states of entities\.
We first useGPT\-5\.6\-Solto propose 50 entities spanning object and setting classes, together with associated states or attributes, such as color and time of day\. This collection includes object classes from VBench\([Huang et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib15)\), augmented with states\. One author manually reviews the collection to exclude unfamiliar entities and implausible entity–state combinations\. Visual concepts represent entity presence or an entity assuming a particular state\. The final inventory contains 50 entries: 36 objects and 14 scenes or settings\. Examples of object entities with states are presented in Table[4](https://arxiv.org/html/2610.20822#A4.T4)and of setting entities with states in Table[5](https://arxiv.org/html/2610.20822#A4.T5)\.
#### Benchmark categories\.
We manually define 11 categories of temporal constraints covering state transitions, entity appearance and disappearance, and choice\. Table[3](https://arxiv.org/html/2610.20822#A4.T3)illustrates each category\. For each category, one author collaborates withGPT\-5\.6\-Solto construct 20 prompts, reviewing them for relevance, diversity of entities and states, and realism\. We specify temporal intervals using halves and thirds of the video duration, allowing meaningful time for each event in a five\-second video\.
Table 4:Examples of object entities with corresponding states\.Table 5:Examples of scene and setting entities with corresponding states\.
#### Specification templates for different categories\.
We then instantiate manually designed specification templates to encode each prompt’s temporal requirements\. These interval\-timed specifications allow the requested transitions to occur anywhere within the designated intervals, subject to any ordering and persistence requirements\. Thus, as in the examples in Section[2](https://arxiv.org/html/2610.20822#S2), they do not prescribe a frame\-by\-frame schedule for each concept\.
LetTTdenote video duration\. We use half intervalsH1=\[0,T/2\)H\_\{1\}=\[0,T/2\)andH2=\[T/2,T\]H\_\{2\}=\[T/2,T\], or thirdsI1=\[0,T/3\)I\_\{1\}=\[0,T/3\),I2=\[T/3,2T/3\)I\_\{2\}=\[T/3,2T/3\), andI3=\[2T/3,T\]I\_\{3\}=\[2T/3,T\]\. Thus, adjacent phases do not share a boundary frame\. For a phase with positive propositionsP\+P^\{\+\}and negative propositionsP−P^\{\-\}, its predicate is
p=⋀a∈P\+a∧⋀b∈P−¬b\.p=\\bigwedge\_\{a\\in P^\{\+\}\}a\\;\\land\\\!\\bigwedge\_\{b\\in P^\{\-\}\}\\neg b\.Only the listed propositions are constrained; unrelated scene content is not prohibited\. A state proposition includes its entity \(e\.g\.,*sitting dog*\), and persistent\-entity transitions retain these compound propositions rather than factoring them into separate entity and state atoms\.
For compactness, writeWJ\(p\)W\_\{J\}\(p\)for an eventually–always requirement: there must be a consecutive run satisfyingppwholly withinJJ, with the steering persistence parameter set toδ=0\.5\\delta=0\.5seconds\. In continuous notation this is𝐅\{t∈J:\[t,t\+δ\]⊆J\}𝐆\[0,δ\]p\\mathbf\{F\}\_\{\\\{t\\in J:\[t,t\+\\delta\]\\subseteq J\\\}\}\\mathbf\{G\}\_\{\[0,\\delta\]\}p; the discrete implementation is specified below\. Define
S2\(p1,p2\)=WH1\(p1\)∧WH2\(p2\),S3\(p1,p2,p3\)=⋀j=13WIj\(pj\)\.S\_\{2\}\(p\_\{1\},p\_\{2\}\)=W\_\{H\_\{1\}\}\(p\_\{1\}\)\\land W\_\{H\_\{2\}\}\(p\_\{2\}\),\\qquad S\_\{3\}\(p\_\{1\},p\_\{2\},p\_\{3\}\)=\\bigwedge\_\{j=1\}^\{3\}W\_\{I\_\{j\}\}\(p\_\{j\}\)\.The steering templates are:
1. 1\.*Two\-state transition \(2ST\):*S2\(A∧¬B,B∧¬A\)S\_\{2\}\(A\\land\\neg B,B\\land\\neg A\)\.
2. 2\.*Three\-state transition \(TST\):*S3\(A∧¬B∧¬C,B∧¬A∧¬C,C∧¬A∧¬B\)S\_\{3\}\(A\\land\\neg B\\land\\neg C,B\\land\\neg A\\land\\neg C,C\\land\\neg A\\land\\neg B\)\.
3. 3\.*Two ordered entries \(OE2\):*S2\(A∧¬B,A∧B\)S\_\{2\}\(A\\land\\neg B,A\\land B\)\.
4. 4\.*Three ordered entries \(OE3\):*S3\(A∧¬B∧¬C,A∧B∧¬C,A∧B∧C\)S\_\{3\}\(A\\land\\neg B\\land\\neg C,A\\land B\\land\\neg C,A\\land B\\land C\)\.
5. 5\.*Handover with overlap \(HWO\):*S3\(A∧¬B,A∧B,B∧¬A\)S\_\{3\}\(A\\land\\neg B,A\\land B,B\\land\\neg A\)\.
6. 6\.*Exit and return \(EXR\):*S3\(A,¬A,A\)S\_\{3\}\(A,\\neg A,A\)\.
7. 7\.*Reversible state return \(RSR\):*S3\(A∧¬B,B∧¬A,A∧¬B\)S\_\{3\}\(A\\land\\neg B,B\\land\\neg A,A\\land\\neg B\)\.
8. 8\.*Persistent\-entity transition \(PST\):*𝐆\[0,T\]E∧S2\(A∧¬B,B∧¬A\)\\mathbf\{G\}\_\{\[0,T\]\}E\\land S\_\{2\}\(A\\land\\neg B,B\\land\\neg A\)\.
9. 9\.*Triggered response \(TRG\):*S3\(A∧¬B∧¬E,A∧E∧¬B,B∧E∧¬A\)S\_\{3\}\(A\\land\\neg B\\land\\neg E,A\\land E\\land\\neg B,B\\land E\\land\\neg A\)\. HereEEis the entering trigger andA,BA,Bare the original and response states\. This specifies an observed temporal sequence, not a causal intervention\.
10. 10\.*Alternative final state \(AFS\):*𝐆I1\(A∧¬B∧¬C\)∧\[𝐆I3\(B∧¬A∧¬C\)∨𝐆I3\(C∧¬A∧¬B\)\]\\mathbf\{G\}\_\{I\_\{1\}\}\(A\\land\\neg B\\land\\neg C\)\\land\[\\mathbf\{G\}\_\{I\_\{3\}\}\(B\\land\\neg A\\land\\neg C\)\\lor\\mathbf\{G\}\_\{I\_\{3\}\}\(C\\land\\neg A\\land\\neg B\)\]\.
11. 11\.*Anchored entity choice \(AEC\):*𝐆\[0,T\]E∧𝐆I1\(¬A∧¬B\)∧\[𝐆I3\(A∧¬B\)∨𝐆I3\(B∧¬A\)\]\\mathbf\{G\}\_\{\[0,T\]\}E\\land\\mathbf\{G\}\_\{I\_\{1\}\}\(\\neg A\\land\\neg B\)\\land\[\\mathbf\{G\}\_\{I\_\{3\}\}\(A\\land\\neg B\)\\lor\\mathbf\{G\}\_\{I\_\{3\}\}\(B\\land\\neg A\)\]\.
In the state\-transition templates,A,B,CA,B,Crefer to states of the same subject or setting; in the entry, handover, and entity\-choice templates they denote entity presence\.EEdenotes an anchor or trigger as indicated\. Every category has 20 examples\. Choice formulas use an ordinary disjunction between*exclusive branch predicates*: either branch is acceptable, but both alternatives cannot satisfy the same required frame\. Placing the disjunction outside the final\-region always operators selects one fixed branch throughout that region\. The middle third is unconstrained by AFS steering and, apart from anchor persistence, by AEC steering; these formulas do not prohibit transient alternative states in that gap\.
#### Concrete examples of prompts\.
The following are exact released prompts, with proposition assignments that instantiate the corresponding templates above\.
1. 1\.*Two\-state transition*\(2st\-181\_person\_stand\_to\_sit\)\.A=A=standing person;B=B=sitting person\. “A continuous full\-body studio shot follows one person against a simple background\. The person begins standing and holds that pose for roughly the first half of the video\. Around the midpoint, they sit down on the floor and remain seated for the rest of the video\. The same person remains in frame throughout, with no cuts, duplicate people, or camera movement\.”
2. 2\.*Three\-state transition*\(tst\-001\_traffic\_light\_yellow\_red\_green\)\.A=A=yellow traffic light;B=B=red traffic light;C=C=green traffic light\. “A cinematic, photorealistic 4K close\-up follows one street traffic light at dusk from a fixed tripod camera\. The signal is solid yellow for roughly the first third of the video\. About one\-third of the way through, that same signal changes cleanly to solid red\. Around two\-thirds of the way through, it changes to solid green and remains green through the end\. The softly blurred urban background stays unchanged, with no camera movement, scene cuts, duplicate traffic lights, or extra signal flicker\.”
3. 3\.*Ordered entry of two entities*\(oe2\-201\_person\_then\_dog\)\.A=A=person;B=B=dog\. “One person waits alone in a quiet park clearing for roughly the first half of a continuous medium\-wide shot\. Around the midpoint, a dog runs into the clearing and stops nearby\. The same person and dog remain fully visible together through the end, with no cuts, duplicate subjects, or camera movement\.”
4. 4\.*Ordered entry of three entities*\(oe3\-121\_dog\_cat\_rabbit\)\.A=A=dog;B=B=cat;C=C=rabbit\. “One dog waits alone on a broad living\-room rug for roughly the first third of a fixed shot\. A cat then walks into the room and settles within the same view while the dog stays\. Around two\-thirds of the way through, a rabbit hops in through the open doorway\. The dog, cat, and rabbit all remain visible together until the end, with no duplicate animals or camera movement\.”
5. 5\.*Entity handover with overlap*\(hwo\-021\_horse\_to\_rabbit\)\.A=A=horse;B=B=rabbit\. “A horse stands alone in a grassy paddock at the beginning of a steady wide shot\. About one\-third of the way through, a rabbit hops into the foreground while the horse remains nearby\. Around the two\-thirds point, the horse walks calmly out through an open gate, leaving the rabbit in view until the end\. The camera does not cut or change position\.”
6. 6\.*Entity exit and re\-entry*\(exr\-061\_dog\_exit\_return\)\.A=A=dog\. “A fixed living\-room shot begins with one dog standing in clear view\. About one\-third of the way through, the dog walks out through the left side until it is completely absent\. Near the two\-thirds point, the same dog walks back in from the left and remains in the room until the end\. There are no cuts or other dogs\.”
7. 7\.*Reversible state return*\(rsr\-081\_person\_stand\_sit\_stand\)\.A=A=standing person;B=B=sitting person\. “A continuous full\-body studio shot begins with one person standing against a simple background\. About one\-third of the way through, they lower themselves and sit on the floor\. Near the two\-thirds point, the same person rises to stand again and remains standing through the end\. The camera stays fixed without cuts or other people\.”
8. 8\.*State transition with a persistent entity or setting*\(pst\-101\_person\_dog\_stand\_sit\)\.E=E=person;A=A=standing dog;B=B=sitting dog\. “A person and one standing dog share a clear full\-body studio shot\. The person stays in the same spot throughout the video\. Around halfway through, the dog lowers into a seated pose and remains sitting beside the person until the end\. The camera does not move and no additional subjects enter\.”
9. 9\.*Trigger\-conditioned state transition*\(trg\-041\_person\_triggers\_dog\_standing\)\.E=E=person;A=A=sitting dog;B=B=standing dog\. “A continuous full\-body shot begins with one dog sitting alone in a quiet room\. The dog remains seated for roughly the first third of the video\. About one\-third of the way through, a person walks into the frame and approaches while the dog remains seated\. Around two\-thirds of the way through, the dog responds to the person by standing up, and the person remains nearby through the end\. The same dog and person stay in frame, with no cuts, duplicate subjects, or camera movement\.”
10. 10\.*Alternative final state*\(afs\-161\_dog\_sit\_to\_stand\_or\_lie\)\.A=A=sitting dog;B=B=standing dog;C=C=lying dog\. “One dog sits upright in a clear full\-body studio view for the opening third\. During the middle third, it either rises onto all four paws or lowers into a lying pose, but it does not perform both actions\. By the start of the final third, the dog is either standing or lying and remains in that selected pose through the end\.”
11. 11\.*Anchored entity choice*\(aec\-141\_tree\_dog\_or\_cat\)\.E=E=tree;A=A=dog;B=B=cat\. “A single tree remains centered and alone throughout the opening third of a fixed garden view\. During the middle third, either one dog may walk in or one cat may walk in, but not both\. Whichever animal arrives stays near the tree throughout the final third without any duplicate animals\.”
#### Evaluation specifications\.
We assign each sampled frame its timestamp and use half\-open phase intervals, except that the final phase includes the video endpoint\. We evaluate temporal adherence using a phase\-based criterion\. Letti=iΔt\_\{i\}=i\\Deltadenote the sampled timestamps and letr=⌈δ/Δ⌉r=\\lceil\\delta/\\Delta\\rceil, whereδ=0\.5\\delta=0\.5seconds\. A phase predicateppsatisfies the persistence requirement within intervalJJif
WJ\(p\)=1⟺∃i:\{ti,…,ti\+r\}⊆J∧⋀k=0rp\(vi\+k\),W\_\{J\}\(p\)=1\\quad\\Longleftrightarrow\\quad\\exists i:\\;\\\{t\_\{i\},\\ldots,t\_\{i\+r\}\\\}\\subseteq J\\;\\land\\;\\bigwedge\_\{k=0\}^\{r\}p\(v\_\{i\+k\}\),where the witness must use valid sampled\-frame indices\. Thus,ppmust hold atr\+1r\+1consecutive sampled frames whose first\-to\-last timestamp span is at leastδ\\delta, with the entire run contained inJJ\.
The predicateppjointly encodes the required presence and absence of visual concepts\. Explicit persistence requirements are evaluated over their stated intervals rather than reduced to a0\.50\.5\-second witness\. We use the same duration threshold across the evaluated 5–6\-second videos to require sustained evidence beyond an isolated frame while allowing flexibility in transition timing\.
Interpretation of the criterion\.We evaluate whether each required phase occurs within its designated interval and persists for at least 0\.5 seconds\. We intentionally leave the intervening transitions unconstrained: intermediate configurations may not map unambiguously to the discrete propositions\. For example, a partially open door may be labeled either open or closed while it moves between states\. Requiring a sustained witness for each phase establishes that the requested states occur in the specified temporal order without prescribing the duration or frame\-by\-frame labeling of the transition between them\. This criterion does not require each phase to occupy its entire interval or restrict behavior outside the witness runs, except where the specification imposes explicit persistence or absence constraints\.
## Appendix EExperimental setup and evaluation
### E\.1Models and sampling settings
We evaluate TSG on the 220 prompt–specification pairs described in Appendix[D](https://arxiv.org/html/2610.20822#A4)\. Table[6](https://arxiv.org/html/2610.20822#A5.T6)summarizes the generation settings\. Resolutions are given as height×\\timeswidth\. We define duration as the time between the first and last decoded frames,T=\(F−1\)/fT=\(F\-1\)/f, whereFFis the frame count andffis the frame rate\. Thus the Wan clips span five seconds and the CogVideoX clips span six seconds\. Fractional specification intervals are compiled for each model’s actual duration and temporal grid\.
Table 6:Generation settings for the TSG benchmark\. Wan 2\.2 A14B uses CFG scales 4 and 3 for its high\- and low\-noise experts, respectively\. CogVideoX 5B uses its dynamic CFG schedule with scale parameter 6\. All methods compared within a model share these settings\. The TempoControl comparison uses the Wan 2\.1 row\.We use the diffusers library to obtain model implementations\. The checkpoints areWan\-AI/Wan2\.1\-T2V\-1\.3B\-Diffusers,Wan\-AI/Wan2\.2\-TI2V\-5B\-Diffusers,Wan\-AI/Wan2\.2\-T2V\-A14B\-Diffusers,THUDM/CogVideoX\-2b, andTHUDM/CogVideoX\-5b\. The TI2V checkpoint is used in text\-to\-video mode\. Wan usesUniPCMultistepScheduler, with flow shift 3 for Wan 2\.1 and 5 for both Wan 2\.2 models\. The fused prediction is passed to the scheduler once per denoising step, preserving its multistep state\. CogVideoX 2B usesCogVideoXDDIMScheduler; CogVideoX 5B usesCogVideoXDPMScheduler\. Both use trailing timestep spacing\. For CogVideoX 5B, the implemented dynamic scale is
g\(t\)=1\+61−cos\(π\(\(N−t\)/N\)5\)2,g\(t\)=1\+6\\,\\frac\{1\-\\cos\\\!\\left\(\\pi\\left\(\(N\-t\)/N\\right\)^\{5\}\\right\)\}\{2\},whereN=50N=50andttis the scheduler timestep value, not the zero\-based sampling\-step index\. Other CFG scales remain constant, except for the expert\-dependent A14B scales\.
For each model and method, we generate one video per prompt\. The TSG benchmark seed is5000\+j5000\+j, wherejjis the numeric component of the example identifier\. Each base run saves its initial latent tensor; the paired TSG run reloads that tensor, with shape, dtype, and SHA\-256 checks\. CogVideoX 5B additionally records and replays the sampling\-generator state used by its stochastic DPM sampler\. Prompts and negative prompts are identical within each paired comparison\. The Wan negative prompt on this benchmark is: “bright tones, overexposed, static, blurred details, subtitles, text, watermark, low quality, worst quality, jpeg artifacts, deformed”\. CogVideoX uses no negative prompt\.
### E\.2TSG implementation and hyperparameters
The main TSG benchmark uses online attention steering with norm ratioρ=1\\rho=1, applied during the first 15 denoising steps \(indices 0–14\)\. Ordinary CFG remains active throughout sampling\. We set the additional weight to zero when the residual norm is at most10−1210^\{\-12\}\. We use the z\-score–sigmoid calibration with temperatureτ=1\.0\\tau=1\.0and denominator stabilizerϵ=10−6\\epsilon=10^\{\-6\}, holding the temporal mean and standard deviation fixed during differentiation\. After broadcasting and centering the attention\-logit biases, we clip them to\[bmin,bmax\]=\[−1\.0,1\.0\]\[b\_\{\\min\},b\_\{\\max\}\]=\[\-1\.0,1\.0\]\. We use bias step sizeη=1\\eta=1\. We steer all attention heads in all transformer layers: 30 layers for Wan 2\.1, Wan 2\.2 TI2V, and CogVideoX 2B; 40 per active expert for Wan 2\.2 A14B; and 42 for CogVideoX 5B\.
### E\.3TempoControl comparison
We use all 80 one\-object and 82 two\-object prompts from the official TempoControl benchmark repository\. One\-object prompts request an initially absent object that appears during the second, third, fourth, or last second and remains visible, with 20 prompts for each onset\. Two\-object prompts require a static object throughout, with another object appearing in the second half\. Binary masks are derived from the requested timing and the actual video frame rate and duration, rather than reusing the original 21\-bin masks at a different duration\. For our five\-second Wan clips, the four one\-object onsets occur at sampled indices 4, 8, 12, and 16, respectively; the object must be absent before its onset and present from that index through index 20\. Two\-object masks require absence of the entering object at indices 0–9 and presence at indices 10–20, together with the static object throughout\.
To obtain TSG specifications, we convert each maximal constant segment of a binary mask into an always requirement for the proposition or its negation and conjoin the segment requirements\. The static\-object requirement is a global always formula\. The runtime steering grid with Wan2\.1 1\.3B has 21 latent frames\. All four comparison methods, i\.e\., CFG\-only, TempoControl, one\-round TempoControl, and TSG, use Wan 2\.1 at480×832480\\times 832, 81 frames, 16 FPS, 50 steps, CFG 6, and flow shift 3\. We use seed 42 and replay the initial latent tensor saved by the full TempoControl run for each prompt\.
Our TempoControl port preserves the released optimization order using the Diffusers backbone: latent optimization follows the scheduler update and queries attention at the preceding timestep\. It optimizes the latent with AdamW \(weight decay 0\.01\) at steps 0–10, with learning rate5×10−45\\times 10^\{\-4\}for one\-object and10−310^\{\-3\}for two\-object prompts\. The objective uses energy weight 0\.3 and entropy weight 10, with query chunks of 512 positions and activation checkpointing for the attention forward pass\. The full variant allows up to ten optimization updates per guided step, following official recommendations in the repository\. Early stopping checks whether the first controlled concept’s Pearson correlation with its target mask exceeds 0\.9, before applying the next update\. The one\-round variant changes only the maximum update count to one; it retains this early\-stopping check and the same 11 guided steps\.
### E\.4Ablation protocol and parameter selection
The guidance\-strength ablations in Section[6](https://arxiv.org/html/2610.20822#S6)compare Wan 2\.1 and Wan 2\.2 TI2V on the same 25 samples\. Every configuration replays its model’s saved base latent tensor for each example\. We retain the model\-specific settings in Table[6](https://arxiv.org/html/2610.20822#A5.T6), all attention layers and heads, the first 15 guided steps, step size 1, and the calibration and clipping settings above\. The additional strengths areρ∈\{2,3,4,5\}\\rho\\in\\\{2,3,4,5\\\}, compared with the existing base andρ=1\\rho=1runs\. Onlyρ\\rhochanges within this sweep\.
The CFG interaction ablations also use the same base settings but modify the sampling as required\. For the double strength CFG runs, we double the CFG strengths in Table[6](https://arxiv.org/html/2610.20822#A5.T6)for Wan2\.1 and Wan2\.2 5B\. For TSG\-only, we run TSG for all 50 steps and replace the conditional directions in CFG’s update with the TSG predicted specification\-guided direction \(CFG’s guidance scale is used\)\.
### E\.5Compute and measurement protocol
Wan 2\.1, Wan 2\.2 TI2V, both CogVideoX models, and the TempoControl comparison are run on a cluster with NVIDIA B200 GPUs\. The Wan 2\.2 A14B model is run on a cluster with NVIDIA H200s\. The models use bfloat16 except CogVideoX 2B, which uses float16; the VAE uses float32\. The recorded runtime is PyTorch 2\.9\.1 with CUDA 12\.8, Diffusers 0\.36\.0, and Transformers 4\.57\.3\. CogVideoX enables VAE tiling and slicing\. The attention implementation uses PyTorch scaled\-dot\-product attention for ordinary computation and explicit attention\-score computation where needed for capture and steering; the exact kernel selected by the runtime is not recorded in the per\-video profiles\.
Timing uses a monotonic clock with CUDA synchronization at measurement boundaries\. Before each measured video, the profiler empties the CUDA allocator cache and resets peak\-memory statistics after model loading\. There is no separate discarded warm\-up video in this measurement procedure\. Generation latency includes initial\-noise preparation or replay, prompt encoding, denoising and guidance, and VAE decoding\. It excludes model loading, video export, evaluation, and separately timed diagnostic artifacts\. Diagnostic memory allocations can still contribute to the recorded peak\. When reported as mean±\\pmstandard deviation, the standard deviation is the sample standard deviation across videos, not a confidence interval or variation over repeated seeds\. Peak memory is the maximum of the per\-video PyTorch allocated\-memory peaks, including resident model weights, converted to GiB; it is not device\-wide memory usage or allocator\-reserved memory\. Hardware differs for A14B, so cross\-model latency comparisons also reflect that difference\.
### E\.6Evaluation metrics
#### Frame sampling and specification accuracy\.
We evaluate 21 uniformly spaced decoded frames for every model, including the first and last frame\. For a video withFFframes, sampled indexiiis⌊i\(F−1\)/20⌋\\lfloor i\(F\-1\)/20\\rfloor, fori=0,…,20i=0,\\ldots,20\. We extract binary concept traces usingQwen/Qwen2\.5\-VL\-7B\-Instruct\.*Specification satisfaction accuracy \(Sat Acc\.\)*evaluates the prompt\-derived specification under the Boolean semantics from Appendix[A](https://arxiv.org/html/2610.20822#A1)\.
#### Visual quality\.
We use the MUSIQ\-SPAQ model underlying VBench’s imaging\-quality dimension\([Huang et al\., 2024](https://arxiv.org/html/2610.20822#bib.bib15)\)\. It scores the same sampled frames used for specification evaluation, resizing the longer side to at most 512 pixels according to the VBench preprocessing\. We average over frames within each video and then over videos\. The table reports raw MUSIQ units, with larger values indicating better perceptual frame quality\. Latency and peak GPU memory follow the measurement definitions above\.
#### Evaluator configuration\.
The Qwen evaluator makes one request per sampled frame, asking for all relevant propositions together\. The frame is converted to a uint8 PIL image and passed through the model’s image processor and chat template\. The application sends one user message containing the image and the verification prompt\. Decoding is greedy, with at most 256 new tokens and one frame per request\. The evaluator sees proposition definitions but not the requested temporal schedule or neighboring frames\.
The fixed user\-prompt preamble is reproduced below; the schema\-specific field definitions are then appended from each example’s proposition contexts\.
> Inspect only the supplied frame\. Report what is visibly supported, not what ought to happen\. The scene may be stylized or synthetic\. Do not infer missing objects or a desired temporal phase\. Return only one JSON object with exactly the keys described below, without explanations\. Object\-presence fields: “present” means any recognizable visible part, even at the edge, small, or partially occluded\. “absent” means confidently not visible\. “unclear” means the evidence cannot establish presence or absence; do not equate uncertainty with absence\. State fields: return a JSON list of the exact state names visibly supported\. Normally one state applies\. If multiple states visibly coexist, list all of them; do not force a valid phase\. Return \[\] only when you can confidently establish that none applies\. Return \[“unclear”\] if the state cannot be determined, the transition is ambiguous, or the relevant entity is not recognizable\. Do not combine “unclear” with other labels\. Use the same visible entity when distinguishing its states\. A closed door is shut; an open or ajar door is not closed\. If the opening cannot be seen clearly, use unclear\. Standing and sitting refer to the actual pose; an ambiguous intermediate pose is unclear\. For traffic lights, judge the illuminated signal, not an unlit colored lens\.
For example, a pose\-transition request appends astatefield listing the allowed compound state labels and their definitions\. Entity\-presence fields instead allowpresent,absent, orunclear\. City\-lighting alternatives additionally receive explicit daytime, sunset, and nighttime definitions\.
Parsing accepts a JSON object, optionally within a JSON code fence, and normalizes case, whitespace, underscores, and Unicode dash separators in labels\. Multiple supported states may be returned simultaneously; we do not force the answer to match a valid temporal phase\. Explicit unclear labels and omitted fields map to false in the binary trace\. Unknown fields are ignored; invalid known fields, unknown state labels, and inconsistent aliases raise protocol errors\. The current evaluator allows two schema\-correction retries on the same frame and preserves the invalid responses; exhausted retries leave an error record rather than a fabricated verdict\. Earlier saved evaluations without retries remain identified by their raw\-response records and source snapshots\.
Across all five models, Qwen returned “unclear” labels for at least one proposition in 433 of 46,200 individual frames \(0\.94%\)\. We assessed sensitivity to these labels using conservative and optimistic treatments across all five models\. Conservatively, unclear labels support neither positive nor negative literals;no currently passing video fails under this treatment, leaving reported accuracies unchanged\. Optimistically, unclear labels may take Boolean values that satisfy the specification\. With models weighted equally, this increases CFG accuracy by0\.730\.73percentage points and TSG accuracy by1\.361\.36percentage points\.
#### TempoControl object and action metrics\.
Object evaluation uses theYOLOv10xdetector with Ultralytics 8\.4\.152 on 21 sampled frames\. The detector is invoked with its prediction defaults\. Detected class names and requested labels are compared literally after lowercasing\.
For one\-object clips, a sampled frame is correct if detected presence matches the target mask\. For two\-object clips, correctness additionally requires the static object in both phases: before entry, the static object must be detected and the entering object absent; after entry, both must be detected\. Temporal accuracy is the mean per\-video fraction of correct frames\. This frame\-wise metric differs from the whole\-video specification accuracy used on the TSG benchmark\.
\*相似文章
跨越时空的视觉化思考:面向视频分割的接地推理
TCoVP 引入了时空绑定的视频推理链(Temporal Chain of Video Primitives),将实体引用与带时间戳的空间证据相关联,用于视频推理分割任务,并通过 SFT 与链对齐强化学习数据集在多个基准上取得了提升。
FrameMorrow:面向长时序视频生成的前瞻式未来引导帧选择方法
FrameMorrow 提出一种面向长时序视频生成的前瞻式帧选择方法,通过预测代表未来信息需求的紧凑 prospective tokens 来从历史中挑选相关帧,实现跨生成器的即插即用集成,并在五个基准、11 个生成模型上取得一致提升。
趁尚未消退:在 VideoLLM 推理阶段强化时序表征
论文提出 Temporal Activation Injection (TAI),通过分析 VideoLLM 中帧序反转引发的层间表征差异(temporal divergence vector),在推理时沿实测衰减曲线重新注入时序信息,无需训练即可在三个 VideoLLM 和四个基准上一致提升时序推理能力。
VIS-Ground:具有上下文锚定的视频交互式叙事
VIS-Ground 提出将异构输入上下文转化为可执行约束模型的上下文接地框架,通过结构化上下文抽象、生成约束归纳和约束化视频生成三个阶段,在三个视频生成骨干上平均取得 10.3 分的绝对提升。
# Event-STVG:面向长时序事件推理的时空视频定位 (Event-STVG: Spatio-Temporal Video Grounding for Long-Form Event Reasoning)
Event-STVG 提出一个面向长视频事件推理的时空视频定位基准,涵盖足球等 8 个领域、共 4,016 条标注事件;在 10 分钟时长的视频上,现有最强 MLLM 仅取得 5.4% 的 m-vIoU,凸显出长上下文事件推理与多目标定位所面临的显著挑战。