Spatial Ledgers: Making Video-Language Models Commit to Where They Have Been

Vision-language models, meaning language models that also read images or video, can describe what is in a scene but lose track of where things are once they move. On egocentric video, where a wearer walks, turns and comes back, the best system tested on SAW-Bench answers 53.89% of questions correctly, against 91.55% for people. Language-only guessing reaches about 31%. The same benchmark traces much of the failure to one confusion: models mix up turning the head with walking somewhere. Generative world models fail in a parallel way. When a trajectory returns to a place it has already shown, the place is regenerated as something else (LoopNav).

We propose that the model should not answer spatial questions from free-form memory at all. Instead, as it watches short clips, it writes a spatial ledger: an append-only log in a small typed language. In that log, rotation and translation are separate, mandatory fields, and every landmark gets a persistent identifier. Decoding is grammar-constrained, meaning the model's vocabulary is masked at each step so that only tokens legal in the log language can be produced. The new element is that the mask also depends on the ledger's current contents. When the model says it is revisiting a landmark, it can only name one that already exists. Creating a new landmark requires a separate, explicit production. Once the log is written, questions such as "how do I get back to the start?" are answered by a short deterministic program that composes the logged motions. The model itself does not answer them.

Core Claim

Spatial reasoning over long egocentric trajectories fails for two separable reasons. The first is perceptual: the model misreads individual motion segments. The second is compositional: errors compound when the model must integrate many segments in its own context. Current models entangle the two. A state-dependent grammar over a typed ledger forces two kinds of commitment. Per segment, the model must separately estimate rotation and translation and link to known landmarks. The executor then carries the state and performs the composition exactly.

We claim three things. First, this closes a substantial part of the SAW-Bench gap for an open video-language model, especially on Reverse Route Plan and Spatial Memory. Second, the gain comes specifically from the state-dependent constraint and the executor rather than from asking for structured output. Third, the same ledger, built on world-model rollouts, gives an interpretable loop-closure check that pixel metrics miss.

The idea adapts divide-and-conquer prompting to a setting its originators say it cannot handle. When Splitting Makes Stronger proves that solving sub-tasks in isolated contexts limits error propagation (76.92 F1 vs. 69.41 for Tree-of-Thoughts on GPT-4 multiplication). The same paper notes that the method is limited to tasks whose sub-problems barely overlap, not stateful sequences. Our ledger is the missing piece. Clips are decoded in isolated contexts, and the state passes between them through the ledger and the executor rather than through the model's context window.

Research Program

The ledger language has three kinds of entries. A motion entry records a discretized heading change and a discretized forward, lateral and vertical displacement for one clip. Both fields are required, so the model cannot silently collapse a head turn into a walk. An observe entry states a landmark's bearing and rough distance relative to the current pose, and either references an existing identifier or opens a new one with a short category label. A revisit entry asserts that the current pose is near a previously logged landmark.

The executor keeps an estimated pose $T_t$ (heading and 2D position) and updates it as

$$T_t = T_{t-1} \circ (\Delta\theta_t, \Delta p_t),$$

where $\Delta\theta_t$ and $\Delta p_t$ are the logged heading change and displacement for clip $t$, and $\circ$ is rigid-motion composition. Revisit entries act as loop-closure constraints. When the model asserts a revisit, the executor redistributes the gap between the dead-reckoned pose and the landmark's stored pose over the intervening segments, using a least-squares correction. Question answering then becomes a program over the ledger. Reverse Route Plan inverts and reverses the motion sequence. Relative Direction and Self-Localization read bearings from stored poses. Spatial Memory queries landmark records.

The constraint layer builds on GREATGRAMMA. That work composes the tokenizer with the grammar's lexer so that subword tokens straddling grammar symbols are handled correctly, and it reports 5 to 32 ms per-token masking overhead, but only on Python, Java and Go. We keep the ledger grammar fixed. We treat the identifier terminal as a dynamic set held in a prefix tree that the executor updates after each entry, so the mask is always "legal syntax" intersected with "existing identifiers." This avoids recompiling the grammar per step, which we expect keeps overhead within GREATGRAMMA's reported range. We measure this rather than assume it.

The backbone must be an open-weight model so that logits can be masked. We use Qwen2.5-VL at 3B and 7B, the backbone family on which Scene Graph Thinking reports gains. The first stage is training-free: few-shot prompting with the ledger grammar. A second stage fine-tunes on ledgers generated from simulator ground truth, specifically Minecraft trajectories of the kind LoopNav provides, where true poses are known. Using simulator ground truth rather than a larger model's reasoning traces avoids what GCA calls the oracle paradox: distilling spatial reasoning from GPT-4o-class teachers passes on their non-geometric heuristics.

This work differs from its nearest neighbours in specific ways:

  • Structured Interfaces for Automated Reasoning with 3D Scene Graphs has a language model write graph-database queries over a prebuilt 3D scene graph, reaching 77% vs. 33% for pasting the scene into context. It motivates offloading, but it assumes the map already exists and is correct. We build the map online from video, and the model's writing of the map is itself constrained.
  • Scene Graph Thinking trains models to write scene graphs as reasoning on single images, as unconstrained text. It has neither persistence across time nor a guarantee that graphs parse.
  • GCA formalizes reference frames and measurement targets before calling verified geometry code. Its ablation, where dropping the reference-frame constraint costs 6.6 points, is the closest evidence that forcing the model to commit to a frame matters. GCA, however, works on static single or multi-view questions with no trajectory state.
  • MindJourney imagines new viewpoints with a video diffusion model at test time. Its imagined views carry no persistent geometry, which is exactly what the ledger supplies.

The third strand is a consistency audit for world models. On LoopNav's out-and-back and multi-waypoint loops, we run the ledger writer on the real frames and on each world model's generated frames. We then compare the landmark sets and revisit assertions at return time. LoopNav's own Scene Graph Consistency Score matches segmented objects frame to frame. A ledger comparison instead asks whether the model's rollout supports the claim "I am back at landmark 3." That is the property that fails when villages turn into grassland.

Baselines

The naive reference point is the same Qwen2.5-VL backbone answering SAW-Bench questions directly from the full video, under the benchmark's standard protocol and with the same frame budget. The language-only floor is about 31%, reported by SAW-Bench. The strongest reported system is Gemini 3 Flash at 53.89% overall accuracy on SAW-Bench, from the same paper.

We cannot mask Gemini's logits, so the comparison with it is a reference line, not a controlled one. The controlled claim is against the same open backbone. Beating the naive backbone by a margin larger than the spread across seeds and prompt variants counts as a controlled win. Exceeding 53.89% with a 7B open model would be the headline result.

The strongest structured competitor is a GCA-style agent adapted to video: the backbone plans, then calls geometry tools, with a 3D reconstruction model (VGGT, one of GCA's tools) estimating camera motion between clips. The answer comes from code over those estimates. No reported result found on Lacuna for GCA or any tool agent on SAW-Bench, so we run it ourselves with the same frames and the same total model-call budget as the ledger system. It counts as beaten only if the ledger system is higher on Reverse Route Plan and Spatial Memory, where landmark identity should matter most.

Three ablations each change one ingredient and isolate what the proposal adds:

  • Unconstrained ledger. The same ledger schema is requested in the prompt, with parse-and-retry up to a matched token budget. This isolates the constraint.
  • Static grammar. Syntax is enforced but identifiers are free strings. This isolates state dependence.
  • Model-reads-ledger. The ledger is produced, but the backbone rather than the executor answers from it. This isolates exact composition.
  • Single-context ledger. The whole video is decoded in one pass rather than clip by clip. This isolates the divide-and-conquer component.

Why not just…?

Why not just ask for JSON and retry on parse failures? This is the most likely way the constraint turns out to be unnecessary for syntax. Modern backbones often produce valid JSON on short schemas, and we expect the unconstrained-ledger ablation to parse most of the time. The proposal's bet is not on syntax. It is that retries do not stop the model from inventing a fresh identifier for a landmark it has seen, or from leaving the translation field at zero during a walk. Both errors are syntactically valid. The static-grammar and unconstrained ablations settle this directly. If they match the full system, the contribution reduces to the ledger-plus-executor design, and we will report it that way.

Why not just run visual odometry and hand coordinates to a text-only model? This is a real threat. STSBench finds GPT-4o given ground-truth trajectory coordinates as text (57.08%) outperforming a pixel-based VLM (InternVL 2.5 8B, 46.07%), suggesting the bottleneck is perception, not logic. A geometric pipeline may estimate motion better than any language model. We therefore let the ledger's motion fields be filled either by the model or by an odometry tool, with the grammar as a common interface. If tool-filled motion wins, the remaining question is whether model-written landmark identity and revisit assertions still add accuracy on Spatial Memory and Reverse Route Plan. Odometry alone does not supply them, and the hybrid tests exactly that.

Why not just use long-context chain-of-thought or fine-tune on spatial reasoning traces? The strongest frontier models already see whole videos in context and reach only 53.89% on SAW-Bench. Can Large Language Models Always Solve Easy Problems if They Can Solve Harder Ones? shows that step-by-step reasoning breaks on easy variants under small distractors. GCA's oracle-paradox finding argues against distilling from larger models' traces. We include chain-of-thought on the same backbone as an extra baseline. For fine-tuning, the fair comparison is supervised training on the same simulator data but with free-text rationales instead of ledgers.

Why not just train scene-graph reasoning with reinforcement learning, as Scene Graph Thinking does? Its gains are on single images (CVBench-3D 80.5 for the 7B model). Nothing in that method carries identity across time. We test its released-style prompting on SAW-Bench clips as a per-clip observer inside our executor. This shows whether better per-clip graphs, rather than persistence, explain any gain.

Proposed Experiments

The primary experiment runs all systems on SAW-Bench's six tasks and reports per-task accuracy. We make two predictions. First, the largest gains over the naive backbone appear on Reverse Route Plan and Relative Direction, where the rotation-translation split should matter. Second, removing state-dependent identifier masking hurts Spatial Memory most. If the full system does not beat the single-context ledger, divide-and-conquer adds nothing here. If it does not beat model-reads-ledger, the executor is not the source of the gain. Either result is informative and will be reported.

A diagnostic uses Minecraft trajectories with known poses, where we can score ledgers directly. Motion is scored by heading and displacement error per clip, and identity by precision and recall of revisit assertions against true landmark matches. This separates perceptual error from compositional error and tests the core claim that composition, once exact, stops being the bottleneck.

The audit experiment builds ledgers on LoopNav's real and generated return segments for Oasis, DIAMOND, MineWorld and the Navigation World Model at each distance level. LoopNav describes these models qualitatively, reporting blur after about 30 frames for Oasis and vanished villages for DIAMOND and MineWorld. No reported result found on Lacuna for LoopNav's numerical consistency scores. We therefore report our ledger agreement alongside our own recomputation of that score. The decisive check is whether ledger agreement falls with loop distance and separates models that stay sharp but forget, which pixel metrics by construction cannot do.

Finally, we measure per-token masking overhead with the dynamic identifier set. If it exceeds GREATGRAMMA's reported 5 to 32 ms range by a large factor, the design needs a cheaper identifier mechanism before it is practical.