Paper: 2606.13673 Authors: Seokju Cho, Ryo Hachiuma, Abhishek Badki, Hang Su, Byung-Kwan Lee, Chan Hee Song, Sifei Liu, Subhashree Radhakrishnan, Seungryong Kim, Yu-Chiang Frank Wang Categories: cs.CV, cs.AI
The Gap
Existing agents for spatial reasoning either use single-pass code execution (commit to a full plan before seeing any intermediate result) or structured tool-call APIs (limited in composing operations freely).
Both designs lack the flexibility to adapt analysis based on partial results, especially for open-ended 3D/4D tasks where the next step depends on what was just observed.
[Problem] --> [Assumption] --> [Method] --> [Evidence] --> [Conclusion]
| | | |
+ Rigid + Stepwise + SpatialClaw + +11.2 avg
interfaces code-as- across 20
action benchmarks
The Increment
One sentence: Before – spatial agents were locked into one-shot or rigid tool calls; after – agents can iteratively inspect, compose, and refine perception results via a stateful code kernel, enabling adaptive spatial reasoning.
Core Mechanism
SpatialClaw maintains a persistent Python kernel that holds the input frames + a library of perception and geometry primitives (e.g., depth estimation, segmentation, ray casting).
A VLM-based agent writes one executable cell per step, and the kernel executes it, producing text/visual output that gets fed back into the agent’s context.
On the next step, the agent sees its own previous output and can decide to extract sub-regions, compute distances, overlay heatmaps, or call any primitive.
This loop continues until the answer is ready.
[VLM] --> writes code --> [Stateful Kernel] --> executes --> [Output + Context]
^ |
+-----------------------------------------------------------------+
(previous output becomes new input)
Structural metaphor: Imagine a chef cooking a complex multi-dish meal.
The VLM is the chef, the Python kernel is the kitchen, and the primitives are appliances (blender, oven, knife).
Old approach: write the entire recipe before entering the kitchen (single-pass code).
SpatialClaw: chef enters the kitchen, tastes midway, then adjusts seasoning or decides to roast instead of boil.
Each step writes one command on the kitchen whiteboard (code cell), the appliances execute, and the chef sees the result and decides next.
The stateful kernel is the kitchen that keeps all half-prepared ingredients and tools ready.
Key Concepts
- Stateful execution: Instead of clearing memory after each call, the kernel keeps all variables, images, and intermediate tensors. This allows the agent to build on previous work: compute a depth map in step 1, then crop a region and check if it’s a chair in step 2.
- Code-as-action: The agent writes executable Python, not API calls. This lets it compose arbitrary operations: loop, condition, linear algebra, even inline visualization. It’s far more expressive than predefined tool slots.
- Visual feedback loop: The agent can generate images (e.g., cross-section, heatmap) and treat them as inputs for later steps. This closes the loop between reasoning and observation, crucial for tasks like “how many objects are behind the box?”
Framework Shift
Before (single-pass code): After (SpatialClaw):
[Agent writes full script] [Agent writes cell_1]
| |
[Executes all at once] [Kernel executes cell_1]
| |
[Final answer] [Agent sees output]
|
[Writes cell_2 based on output]
|
[Loop until answer]
One sentence: From static-batch reasoning to interactive stepping, the core shift is making perception actions reactive to intermediate results.
Expert Assessment
Problem choice: Real gap – spatial reasoning benchmarks demand adaptive multi-step analysis, which rigid interfaces cannot support.
The paper identifies the right bottleneck (action interface design) and tackles it head-on.
Method maturity: Clever but not brute force – the stateful kernel is a simple architectural change, but the real insight is treating code generation as an interactive process rather than a one-shot program.
One could argue that existing agents could be adapted with a similar loop, but nobody did it cleanly.
Experimental integrity: Solid – uses 20 diverse benchmarks, 6 VLMs from 2 families, no cherry-picking.
The +11.2 point gain is consistent across backbones, which rules out VLM-specific artifacts.
One red flag: the paper doesn’t report inference cost (loops may be slower), but for a training-free method this is acceptable.
Writing quality: Clear, though the method section could benefit from a worked example walking through a full reasoning trace.
The appendix contains more details, but the main body feels slightly dense.
Verdict: strong accept – clean problem definition, simple yet effective solution, convincing evidence.
Takeaways
- Practitioners can steal the stateful code kernel pattern: plug it into any agent that needs multi-step tool use, not just spatial reasoning.
- They can also adopt the visual feedback loop idea: let the agent inspect its own output images to make informed decisions.
- The idea of code-as-action rather than tool-call-API is broadly applicable to robotics, navigation, and scientific analysis.
- The 20-benchmark evaluation suite is a gift: anyone building a spatial agent can test against the same leaderboard.
论文: 2606.13673 作者: Seokju Cho, Ryo Hachiuma, Abhishek Badki, Hang Su, Byung-Kwan Lee, Chan Hee Song, Sifei Liu, Subhashree Radhakrishnan, Seungryong Kim, Yu-Chiang Frank Wang 分类: cs.CV, cs.AI
缺口
现有空间推理代理要么使用单次代码执行(在见到任何中间结果前就定下完整分析策略),要么依赖结构化工具调用接口(难以自由组合操作)。 这两种设计都缺乏根据部分结果调整分析的灵活性,尤其在开放式3D/4D任务中,下一步行动往往取决于刚刚观察到的内容。
[问题] --> [假设] --> [方法] --> [证据] --> [结论]
| | | |
+ 接口僵化 + 分步代码 + Spatial + 20个基准
+ 作为动作 + Claw + 平均+11.2
增量
一句话: 此前的空间代理被困在一次性或僵化的工具调用中;之后——代理可以通过状态化代码内核迭代地检查、组合和精炼感知结果,实现自适应空间推理。
核心机制
SpatialClaw维护一个持久化的Python内核,其中持有输入帧以及一个感知和几何原语库(例如深度估计、分割、光线投射)。 基于VLM的代理每步写一个可执行单元格,内核执行后产生文本/视觉输出,并反馈回代理的上下文。 下一步,代理看到自己的前序输出后,可以决定提取子区域、计算距离、叠加热力图或调用任何原语。 如此循环直到得出答案。
[VLM] --> 写代码 --> [状态化内核] --> 执行 --> [输出 + 上下文]
^ |
+--------------------------------------------+
(前一步输出成为新输入)
结构性比喻: 想象一位厨师在烹饪一桌复杂的宴席。 VLM是厨师,Python内核是厨房,原语是各种电器(搅拌机、烤箱、刀具)。 旧方法:进厨房之前就把整份菜谱写好(单次代码)。 SpatialClaw:厨师进入厨房,中途尝味,然后调整调料,或决定改用烤制而非煮。 每一步在厨房白板上写一个命令(代码单元格),电器执行,厨师看到结果再决定下一步。 状态化内核就是那个保留所有半成品和工具的厨房。
关键概念
- 状态化执行: 不是每次调用后清空内存,而是内核保留所有变量、图像和中间张量。这让代理可以基于前序工作继续构建:第一步计算深度图,第二步裁剪某个区域并检查它是不是椅子。
- 代码即动作: 代理写可执行的Python代码,而非API调用。这使得它可以任意组合操作:循环、条件、线性代数、甚至内联可视化。表达能力远超预定义工具槽。
- 视觉反馈循环: 代理可以生成图像(例如剖面图、热力图),并在后续步骤中将其作为输入。这一闭环将推理与观察联系起来,对“盒子后面有多少个物体?”这类任务至关重要。
框架转变
之前(单次代码): 之后(SpatialClaw):
[代理写完整脚本] [代理写第一个单元格]
| |
[一次性执行全部] [内核执行第一个单元格]
| |
[最终答案] [代理看到输出]
|
[基于输出写第二个单元格]
|
[循环直到得到答案]
一句话:从静态批量推理到交互式分步推理,核心转变是让感知动作对中间结果做出反应。
专家评审
选题眼光: 真缺口——空间推理基准需要自适应的多步分析,而僵化的接口无法支持。
论文找准了瓶颈(动作接口的设计)并正面解决。
方法成熟度: 巧思而非蛮力——状态化内核是简单的架构变化,但真正的洞察在于将代码生成视为交互过程而非一次性程序。
有人可能会说现有代理也能用类似循环改造,但没人做得这么干净。
实验诚意: 扎实——用了20个不同基准、6个VLM、两个模型家族,没有挑数据。
+11.2点的提升在所有骨干模型上一致,排除了VLM特定的假象。
一个注意点:论文没有报告推理成本(循环可能更慢),但对无需训练的方法来说可以接受。
写作功力: 清晰,但方法部分如果有一个完整的推理追踪示例会更好。
附录有更多细节,但主体部分略显密集。
判决: 强接收 —— 问题定义干净,方案简单有效,证据有说服力。
要点总结
- 实践者可以“偷”走状态化代码内核模式:把它插入任何需要多步工具使用的代理中,不限于空间推理。
- 也可以采用视觉反馈循环的思路:让代理检查自己的输出图像来做出知情决策。
- 代码即动作而非工具调用API的想法广泛适用于机器人、导航和科学分析。
- 那20个基准的评估套件是一个礼物:任何构建空间代理的人都可以用同一排行榜测试。