Spatial coding agents have been shown to strengthen spatial reasoning in Multimodal Large Language Models (MLLMs) by relying on external tools to produce verified execution traces. According to a new paper posted on Hugging Face, this approach carries a significant drawback: high inference-time overhead and a dependence on external components.
The paper, titled SpatialOPSD: Self-Distilling Spatial Intelligence from Verified Coding Agent Traces, investigates whether an MLLM can absorb this agentic capability and operate entirely without tools. The authors report a simple observation: prompting an MLLM with summarized execution traces from a spatial coding agent naturally activates the model's internal spatial Chain-of-Thought (CoT).
Building on this, the researchers introduce SpatialOPSD, an on-policy self-distillation framework that treats verified agent traces as privileged information to internalize spatial reasoning into a standalone MLLM. To address privileged-information leakage during distillation, the work proposes Repetition-Aware Distillation, which combines repetition masking with unlikelihood regularization.
The paper states that experiments across multiple benchmarks show self-distilling SpatialOPSD achieving higher average accuracy than SFT and GRPO on both spatial and out-of-distribution (OOD) datasets, indicating improved performance and generalization. The authors frame the work as an exploration of distilling coding agents' spatial reasoning into standalone MLLMs through on-policy self-distillation.