arXiv(opens in a new tab)cs.CVOct 2026Cited by 8 papers on PaperVantage

Manuscript Offprint

arXiv:2610.03715

4DCodeBench: Benchmarking Agents on Inverse Graphics of Dynamic Scenes

Ruihong Shen, Žiga Kovačič, Peter Kulits, Xingrui Wang, Zizhang Li, Joshua B. Tenenbaum, Alan Yuille, Jieneng Chen, Jiajun Wu

Ruihong Shen 1∗†^{1*†} Žiga Kovačić 2∗^{2*} Peter Kulits 2,3∗^{2,3*} Xingrui Wang 1^{1} Zizhang Li 2^{2}

Joshua B. Tenenbaum 4^{4} Alan Yuille 1^{1} Jieneng Chen 2‡^{2\ddagger} Jiajun Wu 2‡^{2\ddagger}

1^{1}Johns Hopkins University 2^{2}Stanford University

3^{3}Max Planck Institute for Intelligent Systems 4^{4}Massachusetts Institute of Technology

4DCodeBench.com

Task reconstruct a video as an explicit 4D scene, in code

Input video

Figure

AI

agent writes

graphics code

geometry dynamics render

def simulate():

lengths=INITIAL+fed(RELEA:

counts=np.ceil(lengths/DS

n=int(counts.max())

Reconstructed

video

Reconstructed

4D geometry

render

4D Scene

geometry

over time

Figure

Benchmark 18 models on 100 real (left) and 100 synthetic scenes (right)

Articulated

Input

Figure

Input

Figure

Rank 1

Rank 6

Astra (max)

Liquid

Rank 1

Rank 6

Astra (max)

A Opus 5

Rank 6

A Opus 5

Input

Input

Co-dimensional

Rank 1

Rank 6

Astra (max)

Fracture

Rank 1

Rank 6

Astra (max)

A Opus 5

Rank 6

A Opus 5

Figure 1: 4D CODEBENCH. Top: the task. Given an input video, an agent must reconstruct it as an explicit 4D scene by writing graphics code; the scene is rendered back to video and its geometry is inspected over time. Bottom: we benchmark 18 models on 100 real and 100 synthetic scenes. Each example shows the input and two model reconstructions, split into render (left) and geometry (right).

∗^{*}Equal contribution, listed in random order. †^{\dagger}Equal co-advising. ‡^{\ddagger}Work done during a summer internship.

ABSTRACT

We introduce 4DCODEBENCH, a benchmark for 4D inverse graphics through code generation, in which agents reconstruct dynamic scenes from video as executable graphics programs. To accomplish this, agents must translate visual observations into compact representations of scene structure and dynamics, by implementing abstractions such as physical simulations to reproduce complex behavior. To evaluate this capability, we curate a set of real-world videos and construct synthetic scenes spanning diverse physical phenomena, including deformation, fluid flow, and fracture. We perform extensive benchmarking of frontier models, finding that strong static reconstruction capabilities do not yet translate into reliable reconstruction of complex dynamics. 4DCODEBENCH provides a testbed for tracking progress toward agents that can interpret the dynamics of the world through code. Our benchmark is available at github.com/4DCodeBench/4DCodeBench.

1. Introduction

Inverse graphics is often approached by fitting a prescribed model to visual observations. Recovering an executable graphics program instead moves model specification into the inference problem. The program specifies what geometry to construct and how to represent it.

Dynamic scenes render these modeling choices more consequential. Flow, fracture, and deformation involve changes in shape and often topology, while material interactions affect each other's motion. Representing such phenomena extends beyond the placement of objects or recovery from a moving camera in a static scene. We ask how well multimodal coding agents can understand the dynamics of interacting objects and materials from video, choosing and implementing their own abstractions to reconstruct the scene.

We introduce 4DCODEBENCH to evaluate this capability through 4D inverse graphics. Agents are given a reference video and tasked with writing code that generates the 3D geometry of the scene over time, and renders the result. We leave implementation of these dynamics open rather than requiring the use of a particular approach. This freedom renders the agents' choices themselves part of the investigation.

Our benchmark includes 100 real-world videos and 100 synthetic scenes that span diverse materials and interactions. We separately evaluate appearance, geometry, and dynamics of the scene, comparing against reference videos and 3D ground truth on synthetic scenes.

Through evaluation of 18 frontier models, we observe that reconstruction of dynamics consistently lags behind that of appearance and static geometry. While analytic motion is the most-common strategy, we find that leading models differ substantially in their approaches.

In summary, we contribute the following:

  1. A benchmark and dataset for 4D inverse graphics through code generation. We introduce 4DCODEBENCH, comprising 200 dynamic scenes – 100 real videos and 100 synthetic scenes with 4D ground truth – spanning diverse materials, interactions, and physical phenomena. Agents must reconstruct each video as an executable graphics program that exposes explicit geometry and dynamics over time.

  2. A comprehensive evaluation of frontier and open-weight models. We benchmark 18 multimodal coding models under a common execution environment and evaluation

Figure

Average tokens per task (M, log scale)

Human Elo

Figure 2: Cost-quality trade-off and human-VLM agreement. The left panel plots each model's VLM Elo against its average token use per task, with the Pareto frontier; the right panel plots VLM Elo against human Elo for the 17 models in the human study. Error bars show 95% intervals.

protocol, measuring visual fidelity, 2.5D and 3D geometry, and dynamics. Our analysis identifies substantial differences across models and shows that reconstructing dynamics remains a consistent weakness even when appearance and static geometry are recovered well.

  1. Human-aligned evaluation and analysis of reconstruction failures. We conduct a large-scale human preference study and develop automated VLM- and reconstruction-based metrics that closely track human judgments. Using these measurements, we analyze which scene properties and physical regimes expose different reconstruction failures, providing a diagnostic view of current model capabilities.

References (71)