AI News AI资讯 1h ago Updated 1h ago 更新于 1小时前 48

Meet 'Code-as-World': An Agentic Loop That Rewrites Real Videos Into Executable MuJoCo Physics Programs 认识「Code-as-World」:一种将真实视频重写为可执行MuJoCo物理程序的智能体循环

Code-as-World introduces an Executable World Representation (EWR) paradigm that converts real videos into editable `scene.json` files executable by MuJoCo, treating pixels as evidence rather than ontology An agentic abductive search loop (propose → instantiate → execute → render → verify) recovers physical world programs from video in up to five rounds, outperforming Best-of-5 independent sampling across Visual Alignment, Object IoU, Traj-ADE, and Accuracy@2%D Verified executable worlds provide Code-as-World将视频场景表示为可执行代码(scene.json),由MuJoCo物理引擎执行,使模型能理解物理机制而非仅像素。 通过五轮代理循环(提议→实例化→执行→渲染→验证)从真实视频中恢复物理世界表示,验证后的世界提供精确物理标签作为训练数据。 Code-as-World-VL-9B在QuantiPhy-validation基准上达到55.4 MRA,超越Gemini-3.1 Flash(54.8)和最强开源基线约15分。 模型以Apache 2.0许可证开源,提供4B和9B两个检查点,基于Qwen3.5微调,支持vLLM部署。 技术局限在于仅支持刚体物理,且模型未学习发现循

68
Hot 热度
72
Quality 质量
65
Impact 影响力

Analysis 深度分析

TL;DR

  • Code-as-World introduces an Executable World Representation (EWR) paradigm that converts real videos into editable scene.json files executable by MuJoCo, treating pixels as evidence rather than ontology
  • An agentic abductive search loop (propose → instantiate → execute → render → verify) recovers physical world programs from video in up to five rounds, outperforming Best-of-5 independent sampling across Visual Alignment, Object IoU, Traj-ADE, and Accuracy@2%D
  • Verified executable worlds provide exact physical labels (mass, friction, gravity, contacts) that raw video lacks, enabling a two-phase training pipeline: SFT on 73,335 image-space QA pairs followed by GRPO reinforcement learning on ~2,573 world-space VQA samples
  • Code-as-World-VL-9B achieves 55.4 MRA on QuantiPhy-validation, surpassing Gemini-3.1 Flash (54.8) and leading open-weight baselines by ~15 points; the 4B and 9B checkpoints are released under Apache 2.0
  • Limitations include rigid-body-only physics and the model not learning the discovery loop itself — the agentic verification pipeline remains external to the model

Why It Matters

This work addresses a fundamental gap in vision-language models: video models can predict plausible frames but lack grounded physical understanding of mass, contact, and gravity. By converting videos into executable simulations, Code-as-World creates a new class of training data with exact physical labels, pushing VLMs toward genuine physical reasoning rather than statistical pattern matching. For practitioners, it demonstrates a practical path to improving physical-world VQA performance without requiring massive proprietary datasets.

Technical Details

  • Executable World Representation (EWR): A triple p = (C, E, A) — Composition (objects, geometry, mass, friction, gravity), Evolution (initial states, forces, contacts, collisions, duration), and Appearance (camera, lighting, materials, frame rate). Compiles to scene.json executed in MuJoCo with two interchangeable engines: kinematic animation and physics simulation.
  • Agentic Inverse-Solving Loop: Uses SAM 3 for instance masks and tracks, VGGT-Omega for depth/camera geometry, and SAM 3D for per-object meshes. Candidate rollouts are projected back into input views and verified across RGB, depth, masks, and trajectories. Structured feedback Δ guides iterative revision over up to K=5 rounds.
  • Two-Phase Training: Phase 1 — SFT on 73,335 image-space QA pairs from RefCOCO/+/g, RefCLEF, and GOT-10K covering spatial and kinematic properties. Phase 2 — GRPO on world-space VQA from 1,585 text-driven and 988 video-driven executable worlds, rewarded on scale-normalized numerical accuracy with unit/format penalties. Trained on 8× NVIDIA H100 GPUs.
  • Benchmark Results: On QuantiPhy-validation (159 items, MRA over 2S/2D/3S/3D): 4B = 50.6, 9B = 55.4, 27B reasoning = 58.6 vs. Gemini-3.1 Flash 54.8, ChatGPT-5.1 48.4, Qwen3-VL-32B-Instruct 40.2. World-space RL improves pixel-level grounding (9B: RefCOCO 63.7→68.3, GOT-10K 20.1→26.6).
  • Deployment: Apache 2.0 checkpoints (VL-4B, VL-9B) fine-tuned from Qwen3.5-4B/9B, BF16 safetensors served via vLLM with OpenAI-compatible /v1 endpoint, 16 sampled frames per video, --max-model-len 4608.

Industry Insight

  • The EWR paradigm establishes a blueprint for generating physically grounded training data at scale — any organization with video content can potentially build executable world datasets, reducing reliance on synthetic or manually annotated physical reasoning benchmarks.
  • The agentic propose-verify loop demonstrates that iterative refinement with simulation feedback significantly outperforms naive sampling, suggesting broader applicability to other inverse problems in robotics, autonomous systems, and simulation-based AI training.
  • The rigid-body limitation and separation of discovery from model learning highlight that current approaches remain narrow; next-generation systems will need to internalize the verification loop and extend to deformable bodies, fluids, and contact-rich manipulation for true general-purpose physical AI.

TL;DR

  • Code-as-World将视频场景表示为可执行代码(scene.json),由MuJoCo物理引擎执行,使模型能理解物理机制而非仅像素。
  • 通过五轮代理循环(提议→实例化→执行→渲染→验证)从真实视频中恢复物理世界表示,验证后的世界提供精确物理标签作为训练数据。
  • Code-as-World-VL-9B在QuantiPhy-validation基准上达到55.4 MRA,超越Gemini-3.1 Flash(54.8)和最强开源基线约15分。
  • 模型以Apache 2.0许可证开源,提供4B和9B两个检查点,基于Qwen3.5微调,支持vLLM部署。
  • 技术局限在于仅支持刚体物理,且模型未学习发现循环本身,需外部代理迭代。

为什么值得看

这篇文章提出了一种将视频转化为可执行物理世界表示的新范式,解决了视频模型缺乏物理理解的根本问题。它为AI从业者提供了从真实视频中提取精确物理标签的方法,可用于训练更可靠的物理AI模型,并开源了完整实现和模型,便于研究和应用。

技术解析

  • 可执行世界表示(EWR):将场景分解为三元组(C, E, A),包括组成(对象、几何、质量、摩擦等)、演化(初始状态、力、接触、碰撞等)和外观(相机、光照、材质等),编译为scene.json由MuJoCo执行。
  • 代理搜索循环:采用提议→实例化→执行→渲染→验证的五轮循环,使用SAM 3提供实例掩码和轨迹、VGGT-Omega估计深度和相机几何、SAM 3D生成每对象网格,通过关键帧比较RGB、深度、掩码和轨迹,聚合差异反馈指导修订。
  • 训练数据与流程:第一阶段在73,335个图像空间问答对上监督微调,第二阶段对1,585个文本驱动和988个视频驱动的可执行世界应用GRPO,奖励基于尺度归一化的数值准确性、单位和格式。
  • 模型规格与部署:Code-as-World-VL-4B和9B基于Qwen3.5-4B和9B微调,以BF16 safetensors格式提供,通过vLLM在OpenAI兼容端点服务,每视频采样16帧,最大模型长度4608。
  • 基准测试:在QuantiPhy-validation(159项,MRA宏平均)上,9B模型得分55.4,4B得50.6,27B推理模型得58.6;对比Gemini-3.1 Flash(54.8)、ChatGPT-5.1(48.4)和Qwen3-VL-32B-Instruct(40.2)。

行业启示

  • 物理AI的新路径:Code-as-World证明了将视频转化为可执行物理表示的可行性,为机器人、自动驾驶等领域提供了更可靠的物理理解训练数据,可能推动物理AI模型的发展。
  • 开源生态的加速:以Apache 2.0许可证开源模型和代码,降低了研究门槛,鼓励社区基于此进行扩展,如集成更多物理引擎或探索非刚体场景。
  • 局限与未来方向:当前技术仅支持刚体物理,且发现循环由外部代理完成,未来需探索模型内化循环、处理软体物理和复杂交互,以扩大应用范围。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent Multimodal 多模态 Code Generation 代码生成 Dataset 数据集 Benchmark 基准测试