LLMPhy: Complex Physical Reasoning Using Large Language Models and World Models

Anoop Cherian, Radu Corcodel, Siddarth Jain, Diego Romeres · DOI

Abstract

LLMPhy is a zero-shot framework that bridges the gap between the high-level reasoning of Large Language Models (LLMs) and the precise physical accuracy of world models (physics engines). By employing an "analysis-by-synthesis" loop, LLMPhy enables LLMs to iteratively refine hidden physical parameters and reconstruct complex scenes to solve multi-body dynamical reasoning tasks. Evaluated on the new TraySim benchmark, LLMPhy outperforms both pure LLMs and traditional black-box optimization methods, demonstrating the power of semantic-aware physical optimization.

Introduction

Modern Large Language Models (LLMs) possess a degree of "intuitive physics" derived from vast textual and visual training data. However, they struggle with complex, multi-body dynamical systems where outcomes depend on unobservable physical properties like friction, damping, or stiffness. For instance, predicting whether a specific bottle on a crowded tray will tip over when the tray is struck requires more than just a guess; it requires precise simulation.

LLMPhy addresses this by pairing LLMs with a non-differentiable physics engine (a "World Model"). Instead of end-to-end prediction, the LLM acts as a high-level controller that synthesizes simulation code, estimates parameters, and reasons about the results.

The LLMPhy Framework

LLMPhy operates through a two-phase zero-shot optimization process:

Phase 1: Parameter Estimation

To reason about a scene, the system must first understand the underlying physics. Given a video of a simple physical interaction, LLMPhy generates Python code to simulate the environment. It then iteratively adjusts physical hyperparameters (e.g., friction, armature, stiffness) by comparing simulated trajectories to observed ones.

A key innovation is the use of an optimization trace. By providing the LLM with a history of its previous guesses and the resulting errors, the model can "triangulate" the correct values more efficiently than traditional numerical optimizers. This "semantic optimization" leverages the LLM's understanding that, for example, an object sliding too far implies a need for higher friction.

Phase 2: Scene Reconstruction and Reasoning

Once physical parameters are established, a Vision-Language Model (VLM) reconstructs the target complex scene from multi-view images, identifying object types, positions, and colors. The system then runs the reconstructed scene through the MuJoCo physics engine using the inferred parameters. This allows the model to "imagine" the outcome of an external force and answer specific questions about object stability.

A sequence from the TraySim benchmark showing a pusher hitting a tray of objects.

Experimental Evaluation: The TraySim Benchmark

The authors introduced TraySim, a benchmark consisting of 100 simulated sequences. Each sequence features a variety of objects—bottles, martini glasses, and wine glasses—arranged on a tray. The task is to predict which objects will remain standing after the tray is hit by a pusher at a specific velocity.

The final state of a TraySim sequence, illustrating the complex multi-body dynamics involved.

Key Results

  • Superior Accuracy: LLMPhy achieved a mean Intersection over Union (mIoU) of 62.0%, significantly higher than pure GPT-4o (32.1%), which lacked the simulation loop.
  • Faster Convergence: LLMPhy outperformed traditional black-box optimizers like Bayesian Optimization (59.6% mIoU) and CMA-ES (59.7% mIoU), reaching high-quality estimates in fewer iterations due to its semantic understanding of physical variables.
  • Interpretability: Because the system generates executable code and uses a standard physics engine, its reasoning process is fully transparent and verifiable.

Discussion and Future Work

LLMPhy demonstrates that LLMs can serve as effective "programmers" for world models, turning them into powerful tools for physical reasoning. However, limitations remain. The current framework assumes known masses and focuses on a limited set of physical attributes. Future work will explore scaling to more complex real-world robotic data where sensor noise and a wider array of physical properties present greater challenges.

Summary updated

BibTeX
@inproceedings{cherian2026llmphy,
  author = {Anoop Cherian and Radu Corcodel and Siddarth Jain and Diego Romeres},
  title = {{LLMPhy: Complex Physical Reasoning Using Large Language Models and World Models}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=5aLtvjoQpn},
}
Figure