PhySimCode / README.md
SourajaKundu123's picture
Add arXiv paper link and BibTeX
1d03cd7 verified
|
Raw History Blame Contribute Delete
3.98 kB
metadata
license: mit
pretty_name: PhySimCode
language:
  - en
size_categories:
  - 1K<n<10K
task_categories:
  - video-text-to-text
tags:
  - physics
  - simulation
  - video
  - code-generation
  - multimodal
  - benchmark

PhySimCode: A Benchmark and Evaluation Method for Physics Video to Code Generation

Website · Paper · Code

Can a multimodal LLM watch a 2D or 3D physics simulation, work out the involved physics laws and parameter values, and write code from scratch that regenerates it?

This dataset is the PhySimCode evaluation set: 2,430 physics simulation videos, each paired with the Python code that rendered it, its true parameter values, and a step-by-step physics explanation (chain-of-thought). It is the set on which all models in the paper are evaluated.

Overview

  • 162 physics phenomena across 9 physical domains (rigid body, spring / wave, articulated, constrained, pendulum, real-life mixed, rolling, rope / granular, gravitation / fluid)
  • 15 samples per phenomenon, each with randomly sampled physical parameters
  • Two engines: analytic SciPy simulations (2D) and PyBullet rigid-body scenes (3D)
  • Drawn from the full PhySimCode corpus of 160,614 procedurally generated samples
Engine Folder Phenomena Samples Video
SciPy (2D) scipy/ 87 1,305 360×180, 10 FPS
PyBullet (3D) kubric/ 75 1,125 240×240, 10 FPS
Total 162 2,430

Structure

scipy/<experiment>/<sample_id>/
    video.mp4            # input to the model
    simulation_code.py   # ground-truth code that renders video.mp4
    cot.json             # ground-truth chain-of-thought
    params.json          # sampled parameter values
kubric/<experiment>/<sample_id>/
    ...                  # same four files

Every cot.json contains simulation, physical_observation, physical_law (name, statement, LaTeX formula), ode_system, derivation_steps, numerical_method, code_validation, expected_behavior and parameters (value, unit and description for every parameter).

  • SciPy samples also include physical_constants_derived (quantities computed from the parameters).
  • PyBullet samples also include category, seed, modeling_assumptions, impulse_model, pybullet_numerical_model and visual_scene.

Task

Given only video.mp4 and the engine name (scipy or kubric), a model must output:

  1. a chain-of-thought JSON with simulation, physical_observation, physical_law and parameters, and
  2. a self-contained Python script that regenerates the video.

Models are scored on physical-law correctness and equivalence (three LLM judges), parameter recovery within ±20%, code compilation / execution / video output, CodeBLEU, and DINOv2 / VideoCLIP similarity between the regenerated and input videos. The prompt is given in Appendix A.4 of the paper, and the evaluation code is on GitHub.

Download

pip install -U huggingface_hub
hf download SourajaKundu123/PhySimCode --repo-type dataset --local-dir benchmarking_data
from huggingface_hub import snapshot_download
snapshot_download("SourajaKundu123/PhySimCode", repo_type="dataset", local_dir="benchmarking_data")

Citation

@misc{kundu2026physimcode,
  title         = {PhySimCode: A Benchmark and Evaluation Method for
                   Physics Video to Code Generation},
  author        = {Kundu, Souraja and Gupta, Aditya and Julin, Joel and
                   Zhao, Yizhou and Xie, Liuyue and Jeni, Laszlo A.},
  year          = {2026},
  eprint        = {2610.15722},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2610.15722}
}

Contact

Souraja Kundu, sourajak@cs.cmu.edu