← Back to Paper Radar

Code as Worlds: Agentic Discovery of Executable World Representations for Physical Reasoning

Hanyang Wang, Yimo Cai, Weiliang Chen, Jiawei Chi, Haowen Sun, Qiyu Dai, Yi-Hsin Hung, Xingzhuo Guo, Jinshan Ren, Runmao Yao, Ziwei Liu, Mingsheng Long, Yueqi Duan, Jun Gao, Jiangran Lyu, Fangfu Liu, Jialong Wu
arXiv.org | 2026

Reading guide · Based on sections of the original paper

The authors propose representing physical scenes as executable simulator code covering composition, dynamics and appearance. An agent recovers that code from text or real video through a propose–execute–render–verify loop, and the verified worlds then supply labels for training VLMs on quantitative physical reasoning.

Why read this

Practitioners building physical-reasoning VLMs or simulator-derived synthetic data can use this to judge whether verified code worlds are a worthwhile source of metric supervision.

What the authors found

  • On the QuantiPhy validation set (159 QA pairs, scored as macro-averaged MRA), the authors report 55.4 for Code-as-World-VL-9B, above Gemini-3.1 Flash at 54.8, and 50.6 for the 4B model. The 9B model trails Gemini on the 3S and 3D subsets. A 27B reasoning variant scores 58.6, but the authors note that scale and response protocol change together, so this is not a controlled comparison. 5.3 World-Space Physical Calibration from Verified Executable Worlds
  • In the data-source ablation, adding executable-world GRPO data lifts the 9B model from 50.9 (image-space SFT only) to 55.4. Much of the model's advantage over baselines therefore comes from the pixel-measurement stage. At 9B, the full model also scores below image-space-only on the 3D subset (58.1 vs 60.0). C.4 Ablation of Data Sources
  • For video-driven reconstruction with the animation engine, iterative refinement beats Best-of-5 sampling at a matched five-evaluation budget on four of five independent metrics, but not on Velocity-ADE. Results are shown in a figure, without numbers in the text. 4.3.3 Agentic Discovery Loop

Main limitation

The authors acknowledge that QuantiPhy tests only monocular scale calibration under constrained, mostly rigid-body motion. It omits deformation, fluids, occlusion and long-horizon dynamics, and the VLM does not learn the discovery loop itself. 5.5 Limitations

Where to start

C.4 Ablation of Data Sources · Check the per-subset contributions of the text-world and video-world data, and how much gain remains beyond image-space SFT.

Abstract

Physical understanding and reasoning depend on forming compact and generalizable representations of the world. While modern vision-language models can recognize and explain diverse physical events, they often lack explicit representations of the underlying mechanisms-such as object states, physical parameters, and governing dynamics-needed for reliably reasoning how the world evolves and responds to interventions. In this work, we introduce Code-as-World, a paradigm that represents physical worlds through executable world representations. By expressing physical composition, dynamic evolution, and visual appearance as executable code, Code-as-World provides a compact, quantitatively grounded, and controllable abstraction of the physical world. To construct such representations from multimodal observations, such as natural-language descriptions or real-world videos, we develop an agentic discovery loop inspired by abductive reasoning, where an agent proposes, executes, renders, verifies, and iteratively refines executable world hypotheses. As a concrete application, we use verified executable worlds to provide scalable physical supervision for training vision-language models on quantitative physical reasoning. Experiments show that Code-as-World-VL achieves state-of-the-art performance on QuantiPhy and surpasses leading proprietary models, highlighting the potential of executable world representations as a scalable foundation for physical intelligence.

Generated automatically from paper sections on 2026-11-28.