🤖 AI Hot

NVIDIA SpatialClaw Hits 59.9% on 20 Spatial Benchmarks

A
Alex Chen

Vision-language models have gotten remarkably good at describing what they see. Ask them to identify a dog in a photo and they nail it. Ask them “how far is the dog from the fence?” and things fall apart. Spatial reasoning — figuring out where objects actually are in 3D space, how they relate to each other, how they move — remains a genuine weak spot.

NVIDIA Research just dropped SpatialClaw, and it takes an approach I haven’t seen before. Instead of retraining models or adding more parameters, they changed the interface the agent uses to interact with perception tools. The result: 59.9% average accuracy across 20 spatial benchmarks, a clean 11.2 points ahead of the previous best spatial agent SpaceTools, and 6.5 points above a no-tool baseline. No fine-tuning, no benchmark-specific prompts, no category routing. One system prompt, one tool set, and it runs on everything from 26B Qwen models to 397B Gemma4 giants.

The Interface Is the Bottleneck

Here’s the core insight from the SpatialClaw paper. Most VLM agents use one of two interfaces: single-pass code generation (write a program, run it once, hope for the best) or structured tool calling (invoke named tools through a fixed JSON schema).

Both have problems. Single-pass code commits to a strategy before seeing any intermediate output — one wrong assumption and the whole answer is wrong. Structured tool calling is rigid. You can call depth_estimation() or segment_object(), but you can’t freely combine their outputs with NumPy or SciPy to compute something the schema didn’t anticipate. If you need to find the closest point between two segmented objects using a KD-tree, and no one registered a closest_point tool, you’re stuck.

The NVIDIA team demonstrated this precisely with a concrete example. The task: measure the closest distance between a heater and a door in a room. Single-pass code assumed centroids would work and got it wrong. Structured tool-call couldn’t express the KD-tree computation at all. SpatialClaw computed centroid distances, inspected the result, realized the centroid wasn’t the closest point, switched to scipy.spatial.KDTree, and submitted 0.9439 meters against a 0.9 meter ground truth.

What changed wasn’t the model. It was giving the model an actual Python kernel where it could compose, inspect, and revise.

Five Stages, One Python Kernel

SpatialClaw wraps a VLM inside a five-stage loop with a persistent Python kernel. The kernel comes pre-loaded with the input frames and six entry points: InputImages, Metadata, tools, show(), vlm, and ReturnAnswer().

Two perception tools do the heavy lifting. tools.Reconstruct wraps Depth Anything 3 and returns per-frame depth maps, camera intrinsics, extrinsics, and dense point clouds. tools.SAM3 wraps SAM 3 for image or video segmentation from text, point, or box prompts. The framework adds lightweight utilities on top — geometry primitives, mask operations, temporal alignment, graph structures, and drawing functions.

Each sample runs through five stages. First, a planner drafts a strategy without seeing the images. Then the main agent writes one Python cell at a time. A static AST checker rejects unsafe code before execution. After execution, feedback assembles the results (visualizations, variable states, error traces) and feeds them back to the agent. The loop repeats until ReturnAnswer() is called or 30 steps pass. If the agent hits a dead end, it can backtrack — the kernel preserves state from previous steps.

The production setup runs on a LangGraph workflow with a persistent Jupyter kernel. Backbones serve through vLLM, perception runs behind a FastAPI GPU service. A single quickstart runs one benchmark on one machine with a few commands and an API key.

Where the Gains Actually Come From

The controlled comparison tells the real story. All three interface variants shared the same tool set and the same prompt on the same Gemma4-31B backbone. Only the action interface changed.

The no-tool baseline scored 53.4%. Single-pass code added 1.8 points, reaching 55.2%. Structured tool-calling added 3.3 points, hitting 56.7%. SpatialClaw’s code-as-action interface added 6.5 points — nearly double the structured tool-call gain — reaching 59.9%.

Against prior spatial agents, the gap widens further. VADAR scored 40.5% (single-image only — it doesn’t support video or multi-view). pySpatial reached 47.8%. SpaceTools-Toolshed, the previous state of the art, managed 48.7%. SpatialClaw at 59.9% is 11.2 points clear of the field.

An LLM-as-judge attribution analysis breaks down why code-as-action beats structured tool-calling. Code composition — the ability to freely combine perception outputs with arbitrary Python libraries — accounts for 52.2% of the wins. Control flow — loops, conditionals, branching logic — contributes 19.5%. The remaining 28.3% comes from interface-neutral factors.

The biggest gains land on dynamic tasks. DSI-Bench rose 17.6 points with the Gemma4-31B backbone. MindCube rose 15.3. These categories require chained geometric computation across frames and viewpoints — exactly the kind of thing that benefits from iterative code rather than one-shot tool calls.

Why Training-Free Matters

I keep coming back to the “training-free” aspect because it changes the economics of deployment. Most spatial reasoning improvements require collecting new 3D-annotated data, fine-tuning models, and hoping the gains transfer to new environments. SpatialClaw skips all of that.

The same system prompt, tool set, and hyperparameters run across every benchmark and every backbone. Qwen3.5 models at 26B parameters, Gemma4 models at 397B — same interface, same tools, no per-model tuning. If you’re shipping a product that needs spatial understanding and you already have a VLM deployed, you can layer SpatialClaw on top without touching the model weights. That’s a practical advantage, not just a paper result.

The approach fits a set of concrete use cases. Robotics and embodied agents that need metric distances before acting — “how far is my gripper from the object?” Multi-view inspection where an object’s facing direction matters. Video and 4D analysis tracking object or camera motion across frames. Indoor scene QA along the lines of “where is the door relative to the sink?” Each of these involves step-by-step geometric reasoning that a single forward pass through a VLM gets wrong more often than right.

What 59.9% Actually Means

I want to be clear about the number. 59.9% average across 20 benchmarks isn’t “solved.” It’s not production-ready for safety-critical spatial tasks. But it represents a genuine jump — 11.2 points over the previous best — and the gains concentrate on the hardest categories where previous methods barely worked.

The 20 benchmarks span five categories: single-image, multi-view, general, video and 4D, and general video understanding. The framework improves over the no-tool baseline on all six backbones tested. That consistency across model sizes and benchmark types suggests the interface improvement is real, not a fluke of a particular model-benchmark pairing.

One detail worth noting: VADAR, the previous spatial agent at 40.5%, only works on single-image benchmarks. It flat-out doesn’t support video or multi-image inputs. SpatialClaw handles all five categories with the same code. That’s a capability unlock, not just a score improvement.

The Repo and What’s Next

The code is open source at github.com/NVlabs/SpatialClaw with a setup script, example configs, and a single-command quickstart. The paper is up at spatialclaw.github.io. Both went live June 19, 2026.

The design pattern — treat code as the action interface rather than a delivery mechanism — feels like it generalizes beyond spatial reasoning. Any domain where the right answer requires inspecting intermediate results, composing tools in unanticipated ways, and iterating might benefit from the same approach. The SpatialClaw paper focuses on spatial tasks, but the architecture isn’t spatial-specific.

The Toolset: Depth Anything 3 Meets SAM 3

The perception stack deserves a closer look because it’s doing a lot of the actual work. SpatialClaw leans on two foundation models that have quietly become state of the art in their respective domains.

Depth Anything 3 handles monocular depth estimation — taking a single RGB image and producing a per-pixel depth map plus camera intrinsics and extrinsics. What makes this particularly useful inside an agent loop is that the depth data comes back as ordinary Python variables (NumPy arrays and point clouds), not as some opaque model output the agent can’t inspect. The agent can slice, filter, and transform depth maps mid-reasoning, which is exactly what the KD-tree example demonstrates.

SAM 3 (Segment Anything Model 3) handles the segmentation side. It accepts text prompts, point clicks, or bounding boxes and returns masks — again, as plain Python data structures. The video segmentation mode is key for the multi-frame benchmarks where SpatialClaw shows its biggest gains. The agent can call segment_video_by_text(["radiator heater", "door"]) and get temporally consistent masks across every frame in one shot.

The lightweight utilities layer ties them together. tools.Geometry wraps common geometric operations. tools.Mask handles mask arithmetic and visualization. tools.Time aligns temporal data across frames. tools.Graph builds spatial relationship graphs between objects. tools.Draw overlays results onto input frames for the agent to inspect visually. None of these are novel algorithms — they’re just the scaffolding that makes composition possible without forcing the agent through a rigid tool schema.

Three Interfaces, One Clear Winner

I want to dwell on the interface comparison because it’s the paper’s core contribution and the part that generalizes. The team tested the exact same question — measuring the closest distance between a heater and a door — across all three interfaces on the same Gemma4-31B backbone.

The structured tool-call variant could invoke Reconstruct() and Segment(), but when it needed to compute the closest point between the resulting masks, it had no way to express that computation. No ClosestPoint tool existed in the registry. The agent produced a wrong answer because the interface couldn’t represent the solution.

SpatialClaw’s code-as-action variant had no such limitation. It imported scipy.spatial.KDTree — a standard library that exists independent of any tool registry — built the KD-tree from segmented points, queried for minimum distances, and returned the correct answer. The difference wasn’t intelligence. It was expressiveness.

This maps to a broader pattern in agent design. Structured tool calling works well when the space of useful actions is known in advance and can be enumerated. But spatial reasoning problems are open-ended. You don’t know ahead of time whether the answer requires a KD-tree query, a dot product, a convex hull, or a combination of all three. Code-as-action gives the agent the full expressiveness of Python, not just the subset someone pre-registered as tools.

The Backtracking Advantage

One architectural detail that’s easy to miss: the persistent kernel preserves state across steps, which means the agent can backtrack. If it writes code that produces nonsensical masks or misaligned depth maps, it can inspect the output, recognize the problem, and try a different approach — all without losing the input frames or previous computation results.

This matters more than it sounds. In the single-pass code interface, one bad assumption cascades into a wrong answer with no recovery path. In structured tool-calling, the agent can retry individual tool calls but can’t easily compose alternatives. SpatialClaw’s loop lets the agent say “that didn’t work, let me try segmenting by point instead of text” or “the centroid trick isn’t accurate enough, switch to KD-tree.” The loop continues until the agent is satisfied or hits the 30-step limit.

The paper doesn’t report backtracking frequency, but the architecture supports it, and the benchmark gains suggest it’s being used. On the hardest dynamic benchmarks (DSI-Bench +17.6, MindCube +15.3), the ability to iterate through geometric strategies is exactly what you’d expect to help.

The Open Question: Does This Generalize?

I’m bullish on the interface pattern but skeptical about how far it extends. Spatial tasks are a natural fit — the tools output structured geometric data (points, depths, masks) that Python libraries are already good at manipulating. The gap between what the tools output and what NumPy/SciPy can compute is small.

For other VLM weaknesses — temporal reasoning about event sequences, causal understanding of why things happen, multi-step procedural reasoning — the tools would need to output different kinds of structured data. The code-as-action pattern still applies in principle, but whether the gains transfer depends on whether there exist perception tools whose outputs lend themselves to computational manipulation in those domains.

The SpatialClaw team didn’t test this, and I’m not aware of anyone else who has. The paper’s contribution is establishing that the action interface matters more than people assumed, with clean ablation data to prove it. Where else the pattern works is an open research question worth pursuing.

I’m curious to see whether the same interface improves performance on other VLM weaknesses: temporal reasoning, causal understanding, multi-step procedure following. The code-is-action pattern is clean enough that someone will try it. Whether it works as well outside geometric domains is an open question — but for spatial reasoning, the numbers are unambiguous.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen