Manuscript Offprint

arXiv:2610.11366

SpatialOPSD: Self-Distilling Spatial Intelligence from Verified Coding Agent Traces

Rongxue Li, Meng Yang, Yiru Mao, Yongliang Tao, Lulu Hu, Bin Yang, Zhao Xu, Weihua Luo, Bowen Xu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Rongxue Li ∗^{*}

Alibaba Group

Meng Yang ∗^{*}

Alibaba Group

Yiru Mao

Alibaba Group

Yongliang Tao

Alibaba Group

Lulu Hu

Alibaba Group

Bin Yang

Alibaba Group

Zhao Xu

Alibaba Group

Weihua Luo

Alibaba Group

Bowen Xu †^{\dagger}

Alibaba Group

Abstract

Spatial coding agents significantly improve spatial reasoning in Multimodal Large Language Models (MLLMs) by using external tools to generate verified execution traces. However, this paradigm inherently suffers from prohibitive inference-time overhead and external dependencies. In this paper, we explore whether an MLLM can internalize this agentic capability to operate entirely tool-free. We begin with a simple observation: prompting an MLLM with summarized execution traces of a spatial coding agent naturally unlocks the model's internal spatial Chain-of-Thought (CoT). Motivated by this, we introduce SpatialOPSD, an on-policy self-distillation framework that internalizes spatial reasoning into a standalone MLLM by formulating verified agent traces as privileged information. To mitigate privileged-information leakage during distillation, we introduce Repetition-Aware Distillation, which combines repetition masking with unlikelihood regularization. Experiments across multiple benchmarks demonstrate that self-distilling SpatialOPSD achieves higher average accuracy than SFT and GRPO on both spatial and OOD datasets, exhibiting superior performance and generalization.

1 Introduction

Spatial reasoning requires inferring latent 3D properties from 2D observations [Yang et al., 2025], posing a fundamental challenge for multimodal large language models (MLLMs) [Singh et al., 2025, Qwen Team, 2026a]. While final answers may be verifiable, the intermediate geometric inferences are difficult to annotate or validate automatically. This unverifiability bottlenecks standard training paradigms. Answer-level supervised fine-tuning (SFT) forces spatial understanding to remain implicit and brittle [Daxberger et al., 2025, Cai et al., 2026b, Gao et al., 2026, Liu et al., 2026, Wu et al., 2026a], while explicit Chain-of-Thought (CoT) supervision is prohibitively expensive to scale [Wei et al., 2022, Cai et al., 2026b]. Although Reinforcement Learning (e.g., GRPO) [Shao et al., 2024] could bypass this annotation bottleneck via exploration, its application to spatial reasoning remains inefficient. Lacking verifiable intermediate steps, current RL pipelines are forced to rely on costly cold-start data and sparse outcome rewards [Sarch et al., 2026, Sun et al., 2025, Li et al., 2026b].

Motivated by the widespread success of coding agents, recent methods cast spatial reasoning as an agentic task [Luo et al., 2026, Cho et al., 2026]. By equipping MLLMs with a code-execution interface and external geometry tools [Lin et al., 2025, Carion et al., 2026], this paradigm elegantly resolves the aforementioned verifiability bottleneck. Yet, this solution merely shifts the burden to inference time. The iterative loop of decoding and tool execution introduces high latency and infrastructure

∗^{*}This work was done during the author’s internship.

†^{\dagger}Corresponding author. Email: bowen.xbw@alibaba-inc.com

Preprint.

overhead. This motivates a simple question: Can an MLLM internalize spatial reasoning from these verified agent traces, operating entirely tool-free at inference time?

To this end, we introduce SpatialOPSD, a framework that transfers tool-based spatial reasoning to MLLMs through on-policy self-distillation (OPSD) [Zhao et al., 2026a], without requiring tools at inference time (Figure 1). Our starting observation is that conditioning an MLLM on spatial coding agent traces elicits higher-quality CoT reasoning on spatial tasks. SpatialOPSD converts this inference-time benefit into training supervision by summarizing verified agent traces into privileged information for OPSD. To isolate spatial reasoning from tool-specific artifacts inherently coupled in execution traces, we pair this trace-privileged setup with Repetition-Aware Distillation, which

Figure

Figure 1: MindCube-Tiny test accuracy. OPSD from spatial agents effectively boosts spatial reasoning.

penalizes verbatim copying of privileged content and self-repetition. Empirical results on MindCube [Yin et al., 2025] and ViewSpatial [Li et al., 2026a] demonstrate that SpatialOPSD substantially surpasses standard SFT and RL baselines. It approaches the performance of tool-using spatial agents while operating entirely tool-free. It largely preserves performance on out-of-distribution (OOD) benchmarks and yields gains across the evaluated model sizes, demonstrating its broad applicability. Finally, relying on self-generated traces, this paradigm establishes a self-distillation loop for geometric reasoning.

Our contributions are threefold:

• We show that spatial coding-agent traces effectively elicit multimodal spatial reasoning.

• We propose SpatialOPSD, which distills tool-augmented spatial reasoning into multimodal models.

• We introduce Repetition-Aware Distillation to reduce privileged-information leakage during OPSD.

References (42)