Paper

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

Uses executable code as an explicit world model, then discovers it from text or video with a propose-execute-render-verify agent loop.

arXiv ↗Aug 27, 2026Code ↗

  • cv
  • physical reasoning
  • vision-language models
  • simulation
Pipeline diagram showing Code-as-World method with code representation and three applications
Pipeline diagram showing Code-as-World method with code representation and three applications

What it is

Represents physical scenes as executable code and discovers these world models from text or video via an agentic propose-execute-verify loop. Instead of pixels, 3D latents, or language alone, it uses executable code as the world model. An agent iteratively proposes, simulates, renders, and verifies code hypotheses, then uses verified worlds as scalable supervision for VLM physical reasoning.

Key results

  • SOTA on QuantiPhy with Code-as-World-VL
  • 9B model beats larger models, including Gemini-3.1-Flash, on QuantiPhy
  • 27B model outperforms the 9B variant and all evaluated baselines

Explicit executable world models can provide scalable physical supervision that improves quantitative reasoning beyond larger black-box VLMs.

One useful ML email a week.

Worth your time, not all of your time.

We track new ML work across papers, code, and data, then keep only the pieces worth a closer look. Selected, not collected.

Papers.Data.Code

The Weekly ML Signal

Selected, not collected.

One useful ML email a week: the papers, repos and datasets worth your attention.

Worth your time, not all of your time.