Spatial Harness: Grounding Spatial Reasoning in Executable World States with Physics Engines

Chentao Cao, Zhanke Zhou, Sangni Duan, Bo Han, Hang LiNeurIPS 2026

TL;DR

Vision-language models (VLMs) struggle with spatial reasoning because they try to map a 3D scene and mentally rotate it inside a black box, often losing track of geometry along the way. Spatial Harness decouples perception from reasoning by translating images and text constraints into an explicit 3D scene inside a physics engine. Instead of imagining what happens when an observer turns around, the VLM writes Python code to literally move the camera, take measurements, and inspect rendered views—turning guesswork into deterministic geometry.

What Problem Does This Paper Address?

Imagine looking at three photos of a room taken as someone turns to their right, and answering: "If you start at View 1 and turn 180 degrees, what is behind you?"

For humans, this requires building a mental map and rotating our perspective. Today's best VLMs struggle mightily with this—on the MindCube spatial benchmark, GPT-5 gets just 47.59% (barely beating 32.35% random guessing). Why? Because standard VLMs conflate two distinct challenges in a single forward pass: perception (figuring out where objects and cameras are) and reasoning (calculating how spatial relations change after movement).

Figure 1: From model-internal reasoning to executable world states. Both approaches proceed from scene representation through spatial transformation to answer derivation. Top: a VLM implicitly represents the scene and imagines the requested turn, leaving the resulting spatial relation unchecked. Bottom: Spatial Harness constructs an explicit world state and executes the turn in a physics engine, grounding the answer in computed feedback. This makes both the estimated layout and the consequences of the transformation available for inspection. Execution enforces consistency with this state, whose accuracy still depends on the available language constraints and visual estimates.

When a VLM gets a spatial question wrong, you can't tell if it misread the scene or botched the mental rotation. Even if you hand a VLM a ground-truth text map of the room, it still frequently fails to compute the transformations accurately in its head.

Methods

Spatial Harness separates seeing from thinking by introducing an explicit, executable world state instantiated inside the MuJoCo physics engine. Both modules run on the same underlying VLM, augmented with external tools:

  1. The Perceiver (Building the State): Takes the input images and question to compile a structured JSON world state. A text channel uses the VLM to parse target entities and hard constraints stated in the prompt (e.g., "the camera turned 90° right"). Simultaneously, a visual channel deploys off-the-shelf vision specialists—LocateAnything-3B (detection), MoGe-2 (depth), Orient Anything V2 (object orientation), and Reloc3r (relative camera pose)—alongside qualitative VLM descriptions. A deterministic local search aligns these multi-view observations and constraints into a single shared 2D/3D coordinate grid.
  2. The Reasoner (Executing the State): Instantiates this layout in MuJoCo. Because generating realistic 3D meshes from scratch is brittle, objects are spawned as simple labeled cylinder proxies with heading markers. In an interactive loop (up to 5 steps), the VLM writes Python calls (mujoco_sim) to move/rotate the virtual camera, query exact distances, and capture new rendered views. The VLM inspects this deterministic feedback until it can confidently answer the question.
Figure 4: Overview of Spatial Harness. The Perceiver combines question-derived constraints with specialized visual estimates, aligning camera frames and fusing observations into a JSON world state s = (L, Ω, C): a shared layout, per-view observations, and stated constraints. The Reasoner instantiates L in MuJoCo and issues Python tool calls for viewpoint control, measurement, and rendering. Computed measurements and rendered views update its context and guide subsequent operations and the final answer. The JSON and code are illustrative excerpts.

Notice what is new here: unlike video world models that hallucinate plausible-looking novel views, or pure 3D-reconstruction tools that ignore clues hidden in the prompt text, Spatial Harness fuses linguistic constraints with visual geometry into a persistent, inspectable simulation.

Datasets

Spatial Harness is evaluated zero-shot (no training) across four existing benchmarks:

  • MindCube-Tiny: 1,050 multi-view multiple-choice questions categorized by camera motion (Rotation, Among, Around), complete with annotated ground-truth (GT) bird's-eye-view maps.
  • SAT: 500 sampled synthetic spatial questions (mostly single-image).
  • MMSI-Bench: 1,000 multi-image real-scene questions.
  • SpatialRGPT-Bench: 749 quantitative questions requiring metric distance or size estimates.

Key Insights and Ideas

  • Knowing the map isn't enough; you have to execute it: When researchers gave VLMs the exact ground-truth scene layout as text, direct VLM reasoning sometimes actually dropped in accuracy (e.g., Qwen2.5-VL-7B fell from 35.59% to 30.35%). Yet when Spatial Harness executed that exact same ground-truth map in MuJoCo, accuracy skyrocketed across every tested model. Models struggle with mental coordinate math, not just visual perception.
Figure 3: Separating scene information from its use in reasoning. MindCube accuracy across seven VLMs. Gray and blue bars denote direct reasoning (Base) and Spatial Harness, respectively. Solid bars use images and questions without a ground-truth (GT) map, while hatched bars supply both methods with the same GT layout. With identical GT layouts, Spatial Harness outperforms Base on every backbone, demonstrating gains from executing the supplied layout.
  • Numbers and pictures are complementary: Ablations revealed that giving the Reasoner only numerical distance/angle readouts or only rendered proxy views pushed GT-map accuracy above 93%, while mere multi-turn self-reflection reached only 77.81%. Combining both numerical and visual feedback hit 98.25%.
  • Language constraints rescue pixel perception: Dropping camera constraints parsed from the prompt caused Rotation accuracy to plummet from 81.50% to 48.00%, proving that text and pixels must jointly define the world state.

Key Results

  • End-to-End MindCube: Spatial Harness outperformed direct VLM prompting (Base), video generation (MindJourney), and 3D programmatic reasoning (pySpatial) across all backbones. With Qwen3.5-27B, it boosted accuracy from 52.70% (Base) to 71.14%, beating pySpatial by 7.52 percentage points. With Kimi K2.5, it reached 72.67% (+22.00 points over Base).
  • Controlled GT-Map Setting: Given identical ground-truth object and camera poses on MindCube, Spatial Harness pushed Qwen3.5-27B from 71.81% (Base with map) to 98.25%, and GPT-5.4-mini from 44.79% to 82.86%.
  • Broader Benchmarks: Across SAT, MMSI-Bench, and SpatialRGPT-Bench, Spatial Harness improved average accuracy with Qwen3.5-27B to 68.67% (+14.20 points over the strongest baseline), shining brightest on SpatialRGPT-Bench (83.31% vs. 48.20% Base) thanks to metric depth and engine distance queries.

Limitations and Future Work

  • Static Worlds Only: The world state captures a frozen snapshot in time. It cannot currently represent dynamic scenes—like objects moving in a video or questions about the temporal order of events. Adding a time dimension to track per-frame poses is the authors' primary next step.
  • Garbage In, Consistent Garbage Out: While execution guarantees reasoning is faithful to the estimated world state, end-to-end accuracy is still bottlenecked by perception errors (e.g., recovering ~72% of annotated MindCube entities). Future versions could use the physics engine for self-verification—rendering views from estimated camera poses and comparing them against the original input photos to spot and fix perception mistakes automatically.

Summary updated

Abstract

Spatial reasoning requires understanding how objects and observers are arranged in a scene and how their relations change with viewpoint or movement. Vision-language models (VLMs) typically perform both steps through model-internal reasoning, forming an implicit scene interpretation from partial views and imagining the consequences of spatial transformations. A misread scene can lead to a wrong answer, while even a correct interpretation does not ensure that imagined transformations satisfy spatial constraints. We introduce Spatial Harness, which represents scenes as explicit and executable world states to ground spatial reasoning in physics-engine feedback. A Perceiver integrates scene constraints extracted from the question with specialized visual estimates to place objects and cameras in a shared coordinate frame. The resulting state is instantiated in a physics engine, where a Reasoner executes viewpoint changes and uses computed measurements and rendered views to guide reasoning. We evaluate on MindCube, SAT, MMSI-Bench, and SpatialRGPT-Bench with open- and closed-weight VLMs. On MindCube, Spatial Harness improves Qwen3.5-27B from 52.70\% to 71.14\%, surpassing pySpatial by 7.52 percentage points. Given identical annotated object and camera poses, it reaches 98.25\% versus 71.81\% for model-internal reasoning. Code is publicly available at: https://github.com/tmlr-group/Spatial-Harness.
BibTeX
@inproceedings{cao2026spatial,
  author = {Chentao Cao and Zhanke Zhou and Sangni Duan and Bo Han and Hang Li},
  title = {{Spatial Harness: Grounding Spatial Reasoning in Executable World States with Physics Engines}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=L6id31iRwA},
}
Figure