VideoCoS

Write a video's world down as a Blender program, then answer questions from the program alone. It helps when the job is geometry: imagined viewpoints gain up to 21.9 points. It hurts when small errors stack: one swapped pair in an order question puts code 21.8 points behind the raw video.

Pick a question type, then make the reconstructed scene more wrong. Watch which input wins: the program (blue) or the raw video (orange). Then we build, piece by piece, the state, the agents that write and read it, and the map of where code helps.

You need a picture of a 3D scene and a camera and a little Python. We build the rest from zero.

How wrong can the scene be?

Ready

The question type (one per read family)

under 15°

Pick a question type, then drag the scene error to the right.

Accuracies are the paper's (Fig. 7 right): Gemini 3.8 Flash on VSI-Bench-Debiased, code input against video input, grouped by the error that each codified scene happened to have. The groups hold different questions; they are not controlled perturbations of one input, as the paper warns. The room and the drawn errors are illustrative.

Chapter 0

What Persists Behind the Frames

Walk a camera through a room and count the cups two ways

You film a walk through a living room. Then someone asks: how many cups are in the room? No single frame shows all six. Some cups leave the view and come back, seen from a new side.

A frame is one observation. The world state is what persists behind the frames: which objects exist, where they are, and how they and the camera move. Counting the cups needs the state, because each cup must keep one identity while it is out of view.

Today's video models keep that state implicit. A video-language model (VLM) reads the frames and predicts a count or a direction straight from visual features. A video diffusion model generates frames, with identity, geometry and viewpoint tangled inside its latents. Neither keeps a list of objects you can check.

Count the cups

The yellow cone is the camera's view as it walks. Each time a cup enters the cone, a 2D tracker starts a track. Press Walk, or drag the time, and compare the two counts.

end

Illustrative room, path and 70° view cone; no occlusion. The failure it shows is the paper's: a walkthrough revisits objects and 2D tracks break, so counting tracks overcounts; VideoCoS lifts tracks to 3D and merges revisits of one place (Sec. A.1).

Count the naive way and you get too many cups. The paper meets this problem when it builds rooms: "counting tracks would overcount objects". So it lifts each track into 3D and merges the tracks that land in one place. A room walkthrough runs up to 7.2 minutes at 10 frames per second: 7.2 × 60 × 10 = 4,320 frames, and one list of objects behind them.

VideoCoS (Video Reasoning and Generation via Code States), from UNC Chapel Hill, writes that list down as an executable Blender program. It does not ask "can code do this?". It asks when the program helps video reasoning and generation, and when it hurts, across seven task families.

The failure

Symptom
A model reports nine cups in a room that holds six, or forgets an object once it leaves the view.
Measure
Object-count accuracy. Gemini 3.8 Flash scores 59.6 reading the raw video (Table 10).
Fix
Keep one persistent identity per object in an explicit state (Chapters 1 and 3).
The paper's question. Not whether an executable world state is good, but where. It answers with a map: helps on geometry, falls short on compounding estimates and on physical realism, and the deciding factor is the accuracy of the facts a question needs.

The road

  1. The state: entities, geometry and camera, written as a program.
  2. Read and write: questions are queries, generation is an edit, seven families.
  3. Codify: build, check and fix a scene from perception evidence.
  4. The reasoner: an agent that never sees the video, and what reuse costs.
  5. Viewpoints: where code wins, in reads and in novel views.
  6. Plans and physics: good rigid plans, poor hands and fluids.
  7. Errors compound: why object order falls apart.
  8. Accuracy beats looks: what makes a state useful; the hero's numbers.
  9. The showcase: run all seven families on a toy scene, then break it.
  10. Field guide: the numbers, the core as code, the limits.
Why does counting cups across a walkthrough need a world state, not just good frames?

Chapter 1

Write the World Down as a Program

Edit one part of a scene program and watch the other parts hold still

Every frame is a 2D picture of one underlying scene, seen from one viewpoint. VideoCoS splits the scene at frame t into three parts, and claims the three together are enough to render the video again.

Call the set of objects E, their poses at frame t gt, and the camera at frame t ct.

Say it aloud

s-t equals the triple E, g-t, c-t; and V equals R of s from one to T.

st
s-t the world state at frame t.
E
E the entities: every object and structure (sofa, cup, wall), each with a fixed identity, category, mesh, look and rigid-body properties. It has no t: it does not change over the video.
gt
g-t the geometry: the 3D position, orientation and metric scale of every entity at frame t, in one world frame, in metres.
ct
c-t the camera at frame t: its pose and its intrinsics (focal length, sensor).
V
V the video: all T frames.
R
R the renderer: here Blender, which turns a state into pixels.
s1:T
s from one to T the states of every frame, in order.
In plain words

At each frame, list the objects E, where each one is (g-t) and where the camera is (c-t). Hand the whole sequence s from one to T to the renderer R, and you get the video V back.

With numbers

A 60-frame Kubric-4D clip with 8 objects (made-up count) has one E of 8 entries, 60 copies of g-t with 8 poses each, and 60 camera poses. To orbit the camera you replace the 60 values of c-t. E and all 480 object poses stay as they were.

The state is not a static annotation. It is a Python program P, scene.py, whose execution builds a live Blender scene, scene.blend, at any frame. That gives three properties the latents of VLMs and diffusion models do not expose:

Edit one factor

The program builds the room in the render. Press an edit and watch which lines of the program change. Then switch to an entangled latent and press the same edit.

The program is a short sketch in the style of the paper's scene.py (Fig. 3 shows calls such as box_mesh and arrange_room); the real one is written by the codification agent against a helper library. The latent mode is a cartoon of the paper's claim that diffusion models "frequently corrupt untargeted objects" (Sec. 1), not a model.

The failure

Symptom
A camera edit drags objects with it, or one object's edit repaints its neighbour.
Measure
Object mask IoU in a new view. Diffusion baselines reach at most 0.004 at 97° and 128° (Table 11).
Fix
Keep identity, motion and viewpoint as separate variables, and edit only the one the task names.
To render the same room from a new angle, which part of the state changes?

Chapter 2

Reading Is a Query, Writing Is an Edit

Sort seven video tasks by which parts of the state they read or change

Once the world is a state, two kinds of task fall out. Answering a question about the video reads the state and leaves it alone. Making a new video changes some part of the state, holds the rest, and renders.

Call a question q and its answer y. Call the conditioning for an edit u: a target camera, a goal, or a request to run time forward.

Say it aloud

O-read of s from one to T and q gives y; O-write of s from one to T and u gives s-prime from one to T-prime.

Oread
O-read a read: a program that queries the state and changes nothing.
s1:T
s from one to T the state of every observed frame.
q
q the question, for example "how many cups are in the scene?".
y
y the answer: a number or one of a few options.
Owrite
O-write a write: it edits or extends the targeted parts and holds the others fixed.
u
u the conditioning: a target camera, a goal, or "run five more seconds".
s′1:T′
s-prime from one to T-prime the new states, possibly longer than the original (T-prime frames). Rendering them gives the new video V-prime.
In plain words

A read takes the states s and a question q and returns an answer y. A write takes the states s and a condition u and returns new states s-prime, which the renderer turns into a video.

With numbers

Future prediction in Physics-IQ: the observed clip is 3 s, so T covers 3 s. The write must end 5 s after the last observed frame, so T-prime covers 3 + 5 = 8 s. The poses of the first 3 s must not change (Table 8).

The paper sorts public benchmarks into seven task families, each probing specific parts of the state. Pick one and see what it touches.

Seven families, one state

The three lanes are E, g and c. A read lights the parts it queries. A write draws a new version of the part it changes. Pick a family.

Families, state operations, examples and sample counts are the paper's (Table 1, Fig. 2, Sec. B). Read tasks come from VSI-Bench-Debiased (2,362 questions over 274 room walkthroughs); writes from Kubric-4D, Ego2Act and Physics-IQ.

Read tasks use the official VSI-Bench scoring: numbers earn partial credit by mean relative accuracy (MRA), and options need an exact match. Each write task has one video-level score and one state-level score, such as PSNR and object mask IoU for novel views.

There is one catch. No benchmark comes with a ground-truth program. The codifier must infer every state from raw video, so the study tests whether a noisy reconstruction still helps.

The failure

Symptom
A planning edit nudges an object on the start frame, and the video no longer starts from the real photo.
Measure
The task contract: a pose counts as unchanged only within 1 mm and 0.1° (Table 8).
Fix
The harness checks the contract at submission and returns the failed items. It submits nothing until the contract holds.
History Querying asks which object appeared first. Which parts of the state does it read?

Chapter 3

Codify the Video: Build, Check, Fix

Step a coding agent through its repair loop, then take its measurements away

Someone has to write the program. Earlier code-based reconstruction let a coding agent guess 3D structure from appearance alone. The paper says this often gives wrong room sizes, object scales and positions. Then a failed answer could come from the idea or from a bad scene, and you cannot tell which.

So VideoCoS first runs off-the-shelf perception models once per video. Depth Anything 3 gives metric depth, intrinsics and a camera pose per frame. Qwen3.8-27B names objects on 32 frames, and SAM 3 segments and tracks each named object. For rooms, the system lifts tracks to 3D boxes and merges them. Objects at least 0.25 m across get a mesh from SAM 3D Objects. This evidence is read-only.

The codification agent, Codex CLI with GPT-6.1 Terra, writes scene.py against this evidence in a sandboxed Blender 4.5 with no network. It repeats one loop:

  1. Build and render the program at the input's frames.
  2. Check: execution errors, measured repairs, and source-against-render views.
  3. Fix the flagged items, until every check passes or the budget runs out.

Step the repair loop

A side view of the scene program (blue) over the true scene (teal). Each step builds, checks or fixes. Then switch the evidence off and run it again.

The thresholds are the paper's (Sec. A.2): interpenetration over 8 mm, floating over 1 cm, silhouette IoU under 0.5 against the SAM 3 mask, and a room fails if more than 5% of its objects float. The scene and its flaws are illustrative.

A revision passes if, among other rules, the program runs, every ID is unique, every object has a rigid body, and the file is self-contained. The repair list names each flaw with its size: "cup_3 sinks 2.0 cm into table" reads like a ticket. A room run gets 30 minutes and 16 builds; the median room takes 24 minutes.

Evidence the agent getsCentre error3D IoUInterpenetrationsMinutes
Frames and cameras0.36 m0.23104.2
Fused objects (3D boxes)0.40 m0.32464.2
Unfused layers0.44 m0.2354.8
Unfused + contact query, mask overlays0.29 m0.3317.0

That is Table 13, a pilot on ten write samples with one run each. Depth only covers surfaces that face the camera, so fused boxes come out truncated and overlapping: 46 interpenetrations. A contact query, which casts rays through the bottom of an object's mask onto its support, fixes each object's footing without depth. The authors warn that geometry gaps below about 0.06 m are noise.

The failure

Symptom
Rooms come out the wrong size, objects float or pass through each other, and answers inherit the errors.
Measure
State accuracy on counts, sizes, distances and room area: 52.2 for scenes from the prior agent BVB, 57.9 for VideoCoS, with the same GPT-6.1 Terra (Table 14).
Fix
Ground the program in metric perception evidence, and repair against measured checks.
The codified scene passes every check. What do you know?

Chapter 4

A Reasoner That Never Sees the Video

Follow a blind agent's tool calls, then price a scene that answers many questions

The second agent is a language model with function calling and no image input. It gets the question, a JSON summary of the scene and a set of tools. It never sees a frame or a render. So every answer depends only on the codified state: if it is right, the state carried the fact.

For reads it has five tools, and they return text:

Writes add run_python, which edits the live scene and returns a diff, plus track_motion and reset_scene.

Ask the blind reasoner

Pick a question and press Ask. Each line is one tool call and its text result; the room lights what the tool touched. Then open Many questions.

30

Tool names and budgets are the paper's (Table 7, Sec. A.3: 6 model turns, 18 tool calls, no code for reads). The room, the replies and the left-right geometry are an illustrative sketch; the paper does not publish the tools' internals. Costs are Table 15's measured averages; the lines are the paper's linear projection (Sec. E.2).

Read tasks get 6 model turns and 18 tool calls. All three reasoners (Qwen3.8-27B, GPT-5.6 Luna, Gemini 3.8 Flash) share the tools, the prompt and the budget, and an unanswered question scores zero. The prompt insists: "use returned measurements rather than inventing them".

The scene does not depend on the question, so VideoCoS builds it once and shares it with every question and every reasoner. That changes the bill. Call the number of questions asked of one scene N.

Say it aloud

C-ours of N equals one point five two, plus zero point zero three three times N.

Cours(N)
C-ours of N the cumulative API cost, in US dollars, of N questions to one scene, build included.
1.52
one point five two the one-time cost of codifying the scene, in dollars.
0.033
zero point zero three three the cost of one question with Gemini 3.8 Flash reading the scene.
N
N the number of questions asked of the same scene.
In plain words

Pay 1.52 once to build the scene. Then pay 0.033 for each of the N questions. SpatialClaw, a video agent that starts over for every question, pays 0.180 times N.

With numbers

The lines cross where 1.52 + 0.033 N = 0.180 N, so N = 1.52 ÷ 0.147 = 10.34. From the 11th question, the shared scene is cheaper. At N = 18 it costs $2.11 against $3.24, or 65.2%.

The failure

Symptom
An agent that rebuilds its tool chain for each question pays again and again, and may give inconsistent answers about one room.
Measure
SpatialClaw: 13.5 calls and 660.8K input tokens per question; VideoCoS: 5.4 calls and 45.9K, at accuracies of 66.4 and 65.3 (Sec. C.1).
Fix
Codify once, keep the scene, and answer every later question with cheap tool calls on it.
Why does the paper's reasoning agent never see the frames?

Chapter 5

Where Code Wins: Viewpoints

Orbit the camera up to 128° and see which renders keep the scene

Finding 1 of the paper: executable states help when a task is a direct geometric operation on 3D structure. Changing the viewpoint is the clearest case, both when you read and when you write.

Reads. "If I stand by the TV and face the sofa, is the stool on my left?" A video reasoner must imagine that viewpoint from frames taken somewhere else. In the code state, objects and observers share one 3D frame, so the question becomes a transform. Viewpoint accuracy rises for all three reasoners: GPT-5.6 Luna from 40.6 to 62.5 (+21.9), Gemini from 63.2 to 80.7 (+17.5), Qwen from 59.0 to 60.2.

Relative direction, one of the two viewpoint question types, improves for every reasoner by 14.8 to 32.8 points. It also improves with every scene from BVB, the prior codifier. So the gain comes from putting everything in one frame, not from one particular reconstruction.

Writes. Novel-view synthesis on Kubric-4D gives a method a source video and a target camera, and asks for the same 60 frames from the target. The total view change is 42°, 97° or 128°. A camera write replaces only c and renders the same scene again.

Orbit the camera

Three renders of one tabletop from the new camera. Drag the view change and compare the code render (blue) and a diffusion-style render (purple) with the true view (teal). The bars are the paper's.

42°

Mask IoU and PSNR are Table 3's (best diffusion baseline per angle). The tabletop and all three renders are illustrative: the code render carries a fixed small reconstruction error and flat materials, as the paper describes; the diffusion render is a cartoon of drift that grows with the angle, not a model.

VideoCoS leads on both metrics at every angle, and its object mask IoU stays at 0.254, 0.230 and 0.224. No diffusion baseline exceeds 0.02, and at 97° and 128° they reach at most 0.004. The ground-truth video itself scores about 0.61, so the code render reaches about 40% of that ceiling: 0.254 ÷ 0.604 = 0.42.

The code numbers are nearly flat because a camera write leaves the scene untouched. A larger angle is not a harder edit. PSNR stays low for everyone (12.67 to 12.98 dB for VideoCoS): the renders reproduce the layout, not the materials or the lighting.

The failure

Symptom
A diffusion model asked for a 97° orbit produces a plausible picture with objects in the wrong places or gone.
Measure
Object mask IoU: 0.001 to 0.004 for TrajectoryCrafter, ReCamMaster and CogNVS at 97° (Table 3).
Fix
Keep the scene fixed and move only the camera; render the same state from the new pose.
Why does VideoCoS's mask IoU barely change from 42° to 128°?

Chapter 6

Plans Yes, Physics No

Plot the tested video generators by task success and physical realism, then add the hybrid

Two write tasks move objects. Goal-conditioned planning (Ego2Act, 110 cases) starts from one photo and a goal in text, such as "the tape is inside the tape dispenser". It asks for a video of about 15 s. Future prediction (Physics-IQ, 66 scenarios) shows 3 s of a physical event and asks for the next 5 s.

For planning, the agent keyframes each object along a collision-free path to its goal. For prediction, it releases bodies, sets their mass and friction, and bakes a rigid-body simulation. Ego2Act's judge gives each video a task score T (did the goal happen) and a physical score P (does it look physically right). Both run from 0 to 100.

Say it aloud

Final equals the mean over videos of the square root of T times P.

Final
Final the overall Ego2Act score of a method, 0 to 100.
meanvideos
the mean over videos compute the score for each video, then average them.
√
the square root of it turns the product back into the 0 to 100 scale (a geometric mean of two numbers).
T
T the task score of one video.
P
P the physical score of the same video.
In plain words

For each video, multiply T by P and take the square root. A video scores well only if both T and P are high. Then average over all videos.

With numbers

The Blender plan's totals are T = 68.2 and P = 50.0. The root of their product is √3,410 = 58.4, but the reported Final is 52.5 (Table 4). The gap is real: averaging per video never exceeds the root of the averages, and it drops further when T and P disagree video by video.

Control against realism

Each dot is a method. Up-and-right is better. Tap a dot to read it. Switch to future prediction, and follow the arrow from MiniMax-H3 to the hybrid.

All points are the paper's: Ego2Act totals over 110 cases (Table 4) and Physics-IQ scores (Table 5). The hybrid uses the Blender video as a reference and re-renders it with MiniMax-H3, with one hand added (Sec. A.5).

Control helps. On planning the Blender plan has the second-highest task score after Seedance-2.0, on short tasks (81.3) and long ones (64.2). On rigid motion in Physics-IQ its trajectory error is 11.1, near Cosmos3 (10.3 and 10.5) and well below MiniMax-H3 (16.9).

Realism hurts. Its physical score is the lowest of all, 50.0: the state has no hand, so objects move on their own. On non-rigid events its trajectory error is the highest (9.9 against 5.3 to 8.0), since rigid-body simulation cannot do fluids or magnets. The hybrid trades. Blender plus MiniMax-H3 lifts H3's task score from 54.3 to 63.5 and its Physics-IQ score from 38.6 to 51.9. But it lowers H3's physical score from 79.2 to 69.4.

The failure

Symptom
The tape glides into its dispenser by itself; no hand touches it.
Measure
Ego2Act gate P2, "a visible cause of motion": 0.0 on short tasks and 3.2 on long ones (Table 12).
Fix
Keep the plan in code and let a video model supply hands and pixels, the hybrid the paper argues for.
The Blender plan scores T = 68.2 but P = 50.0 on Ego2Act. What does that pattern say?

Chapter 7

Small Errors, Multiplied

Order more objects by noisy first sightings and watch the answer fall apart

Finding 2 has a second half: executable states fall short when an answer combines several noisy estimates. The clearest case is appearance order: "Which appears first in the video, the cart, the sofa or the TV?" History accuracy drops for every reasoner, by 12.5 points for Qwen and 13.2 for Gemini.

Why? To answer, the state must say when each object first becomes visible. Each of those times comes from two estimates: the object's position and the camera's path. An order of four objects needs four such times, and one bad time can swap a pair. The whole answer is wrong if any pair is wrong.

Order the first sightings

Teal ticks are when each object truly first appears. Blue dots are the state's estimates. A red link marks a swapped pair. Add objects or noise, then draw again.

4
0.60 gaps

The timeline and its noise are a toy: true sightings one gap apart, each estimate off by Gaussian noise; the curve is 4,000 simulated draws. The two big points per input are the paper's (Fig. 7 top left): at k = 4 they are the History scores 64.5 and 77.7; at k = 2 we add back the stated drops of 20.1 and 13.5 points.

The paper scores the sub-orders of k objects inside each Gemini answer. From k = 2 to k = 4, code accuracy falls 20.1 points and video accuracy 13.5. So the gap to video widens from −6.6 points to −13.2. The error ratio stays steady: (100 − 84.6) ÷ (100 − 91.2) = 1.75 at k = 2 and (100 − 64.5) ÷ (100 − 77.7) = 1.59 at k = 4.

So each code estimate is about 1.6 to 1.75 times as error-prone as the video model's, and more objects multiply the chances to fail. Raw video keeps a direct sense of "what came first" that the reconstructed camera path loses.

The failure

Symptom
The agent answers "sofa, cart, TV" when the cart appeared first.
Measure
Gemini history accuracy: 77.7 on video, 64.5 on the code state (Table 2).
Fix
Not solved here. The paper proposes a confidence per object, and checking doubtful values against the video (Sec. E.3).
Each pair in an order is right 90% of the time, independently. Roughly how often is a 4-object order (3 adjacent pairs) fully right?

Chapter 8

Accuracy Beats Looks

Find which scene metric predicts a right answer, and which does not

Finding 3 asks what makes a state useful. Three results answer it.

A state beats raw perception. Give Gemini the same perception outputs as raw JSON (per-frame depth, poses and masks) and it scores 56.3, below video at 63.1. The code state scores 65.5. A model cannot fuse fragments by reading them; the scene and its tools organise the evidence.

Task-relevant accuracy tracks answers. The authors codified each room three ways (VideoCoS, and BVB with two models). Across those three, the paper correlates scene metrics with QA accuracy. A question tracks the accuracy of the attribute it asks about, with Spearman ρ from 0.26 to 0.56. It does not track how much the renders look like the video: +0.07 for latent similarity and −0.03 for Dual VQA.

Which metric predicts the answer?

Rows are scene metrics, columns are question types. Blue means more accurate scenes give more right answers. Tap a cell. Then switch to Three inputs.

All values are the paper's (Fig. 7): Spearman correlations across the three reconstructions of each of the 274 rooms, and Gemini 3.8 Flash accuracy with video, raw perception or the code state. Boxed cells pair a state attribute with its own question.

Tolerance differs by task. No reconstruction is exact, so how wrong can it be before video is the better input? This is the hero at the top of the page. For sizes and distances, code wins by 28.8 points when the scene error is under 10% and by 11.3 at 10 to 25%, then loses. For direction it wins until the angle is off by more than 90°. For counts and orders it wins only when the scene is exactly right: one miscounted object costs 8.1 points against video, one swapped pair 21.8.

The reason is the scoring. A rough direction still picks the right side. A close distance earns partial credit. But one object off is a big error in a small count, and one swapped pair makes the whole order wrong.

The failure

Symptom
A codifier tuned for visual similarity to the video gives worse answers.
Measure
Correlation of visual similarity with QA accuracy across all questions: +0.07 (LS), −0.03 (DV).
Fix
Measure and improve the accuracy of the attributes your questions read: counts, sizes, distances, room area.
A codified room has every distance within 5% but one cup missing. Where should you trust the code state over the video?

Chapter 9

Run the Pipeline, Then Break It

Read and write a toy scene program across all seven families, and corrupt it

Here is the whole loop of the paper's Fig. 3, on a toy room. The true room is teal. The codified state is blue, and you control how wrong it is. Pick a task: four reads, three writes (future prediction twice, once rigid and once fluid). The reasoner works on the blue state only, and a judge checks its answer against the teal truth.

Read it, write it, break it

Choose a task and press Run. The trace shows the tool calls on the blue state. Then raise the position error or remove an object, and press Run 50 seeds.

The task

Break the state

8 cm

A toy, not the paper's system. Each object's codified position is the true one plus Gaussian error; each cup is seen twice, and the two sightings merge only if they land within 30 cm (the 3D merge of Sec. A.1). Orbit scores the mean box overlap of the seven large objects with the true view. Distance answers earn partial credit in 5% steps, the form of VSI-Bench's mean relative accuracy. The fluid task fails by design: the paper's state is rigid-body only (Sec. E.3).

Things to try. Leave the error at 8 cm and run all tasks: almost everything passes.

Raise it to 30 cm. Left or right still passes nearly every seed, and distance keeps most of its partial credit. Counts fall to about one seed in ten and orders to about six in ten, because one merge error or one swapped pair makes the answer wrong.

Remove the stool and both questions about it fail outright, the "object absent" rows of the hero. Pour water at any error and the write fails: the state has no fluid in it.

The toy reproduces the paper's shape, not its numbers. Geometry tolerates an approximate state; counts and orders do not; physics outside rigid bodies is not in the state at all. Reading and writing share one scene, so the scene that answers your questions is the one you edit for novel views, plans and predictions.

The failure

Symptom
At high error the count says 7 and the order flips, while the left-right answer stays right.
Measure
Success over 50 seeds per task, in the bar chart; compare the hero's error groups.
Fix
Trust the state per question type. Check counts and orders against the video, as the paper's future work suggests.

Chapter 10

Field Guide

Keep the map, the numbers, the core as code, the limits and where to go next

VideoCoS turns a video into a Blender program with perception evidence and a build, check and fix loop. A separate agent that never sees the video reads the program to answer questions and edits it to make new videos. It helps on geometry (viewpoints, novel views, rigid plans). It falls short on answers that compound noisy estimates and on physical realism. What decides a read is the accuracy of the fact it needs, not how the scene looks.

ResultCode stateAgainstSource
Viewpoint reads80.7 Gemini, 62.5 GPT63.2 and 40.6 on video (+17.5, +21.9)Table 2
History (order) reads64.5 Gemini77.7 on video (−13.2)Table 2
All reads, Gemini65.563.1 video, 56.3 raw perceptionFig. 7
Novel-view mask IoU, 42° / 97° / 128°0.254 / 0.230 / 0.224at most 0.020 for diffusion; 0.60 to 0.62 ceilingTable 3
Goal planning, task / physical68.2 / 50.077.3 / 88.9 Seedance-2.0; hybrid 63.5 / 69.4Table 4
Physics-IQ, rigid ADE / non-rigid ADE11.1 / 9.910.3 / 5.4 Cosmos3-SuperTable 5
Error tolerance, size and distance+28.8 under 10% errorloses beyond 25%Fig. 7
Error tolerance, count and order−8.1 one off, −21.8 one pairwins only when exactFig. 7
API cost$1.52 build + $0.033 per question$0.180 SpatialClaw; cheaper from question 11Sec. E.2

When to reach for an executable state

The limits

The core as code

python
import numpy as np

# A toy world state: E (identities), g (positions per frame), c (camera per frame).
def measure_pair(scene, a, b, t=0):
    return float(np.linalg.norm(scene.g[t][a] - scene.g[t][b]))   # box centres, metres

def viewpoint_relation(scene, observer, facing, subject, t=0):
    o, f, s = (scene.g[t][k][:2] for k in (observer, facing, subject))
    fwd, rel = f - o, s - o
    cross = fwd[0] * rel[1] - fwd[1] * rel[0]                # z up: positive means left
    return "left" if cross > 0 else "right"

def first_visible(scene, obj, fov_deg=70):
    for t, (pos, yaw) in enumerate(scene.c):                      # the camera path
        d = scene.g[t][obj][:2] - pos[:2]
        ang = np.degrees(np.arctan2(d[1], d[0]) - yaw)
        if abs((ang + 180) % 360 - 180) < fov_deg / 2:
            return t
    return None                                                  # absent or unseen

def orbit_camera(scene, new_path):
    scene.c = new_path                                           # a write: E and g untouched
    return scene

def cumulative_cost(n, build=1.52, per_q=0.033):
    return build + per_q * n                                     # cheaper than 0.180 n from n = 11

Keep going

Based on "VideoCoS: When Do Executable World States Help Video Reasoning and Generation?" by Shoubin Yu, Daeun Lee, Zun Wang, Han Lin, Yue Zhang and Mohit Bansal (UNC Chapel Hill, 2026), arXiv:2611.35375. Every number on this page is from the paper; the toys and their limits are labelled where they appear.

The takeaway. Write the world down as code when the question is geometry. Keep the video, or a video model, for what code cannot hold: compounding estimates, hands, fluids and light. The hybrid world model is the one that knows which is which.

Now press Present or Teach and explain from memory: the state, reads and writes, the repair loop, the blind reasoner, where code wins, where it falls short, and why accuracy beats looks. Then go back to the hero, pick Order, and say why one swapped pair costs 21.8 points.

VideoCoS: When Do Executable World States Help Video Reasoning and Generation? · Shoubin Yu, Daeun Lee, Zun Wang, Han Lin, Yue Zhang, Mohit Bansal (UNC Chapel Hill, 2026)
Read the original paper · Project page · Back to Veanors