Text2PDE: Latent Diffusion Models for Accessible Physics Simulation

Anthony Zhou, Zijie Li, Michael Schneier, John R Buchanan Jr, Amir Barati Farimani

The Challenge of Simulating Physics

Simulating physical systems—such as air flowing over a wing or smoke rising in a room—traditionally requires solving complex Partial Differential Equations (PDEs). While numerical solvers are highly accurate, they are computationally expensive and notoriously slow.

Recently, "neural PDE solvers" have emerged as a faster, data-driven alternative. However, these AI models face two major hurdles:

  1. Autoregressive Error Accumulation: Most models predict the next "frame" of a simulation based on the current one. Small errors in the first step snowball into massive inaccuracies by the fiftieth step.
  2. Inaccessibility: These models are highly specialized. Utilizing them requires deep expertise in meshing, discretization, and specific solver architectures.

To address these limitations, researchers introduce Text2PDE, asking a compelling question: Can we make physics simulation as intuitive as generating an image with a text prompt?

The Text2PDE Framework

Text2PDE leverages Latent Diffusion Models (LDMs) to generate entire spatio-temporal simulations from simple text prompts or initial conditions. The architecture is built on three main pillars:

  • The Mesh Autoencoder: Physics data often exists on "unstructured meshes" (irregular grids). To handle this, the authors created a kernel-based autoencoder that aggregates irregular physical data into a uniform "latent grid." This allows standard diffusion models to process the data and decode it back to any arbitrary geometry, making the model discretization-invariant.
  • Spatio-Temporal Diffusion: Instead of predicting the simulation step-by-step, the model treats the entire 4D volume (3D space + time) as a single "image" to be denoised. This approach maintains global consistency and entirely eliminates the autoregressive "snowballing error" problem.
  • Multi-Modal Conditioning: The model can be guided using two types of input:
  • Physics-based: Providing the first frame or initial state of the simulation.
  • Text-based: Using a language model (RoBERTa) to encode natural language prompts (e.g., "Fluid passes over a cylinder with a radius of 4.97... The Reynolds number is 190.").

Datasets and Capabilities

The authors evaluated Text2PDE on three increasingly complex benchmarks:

  1. 2D Cylinder Flow: Simulating water flowing around a cylinder on an unstructured mesh.
  2. 2D Buoyancy-Driven Smoke: A regular-grid benchmark of rising smoke plumes.
  3. 3D Turbulence: Airflow over various 3D geometric shapes, representing a high-dimensional challenge for any solver.
Text2PDE generating simulations from text prompts across 2D cylinder flow, 2D smoke plumes, and 3D turbulence.

Key Insights and Results

  • Language is a Compact Modality: One of the most striking findings is that text prompts—which are roughly 1,000x smaller in data size than a raw physics frame—can successfully guide a model to produce physically accurate simulations.
  • Scaling Laws Apply to Physics: Similar to Large Language Models, neural PDE solvers benefit significantly from scale. The authors scaled their model up to 3 billion parameters, demonstrating consistent improvements in accuracy as the model grew.
  • The "Single Mode" Advantage: In image generation, a prompt like "a cat" has infinite valid outputs. In physics, a prompt and an initial condition should have only one valid output. Because this target distribution is simpler (unimodal), the authors could use techniques like DDIM to generate results in far fewer steps than typical image generators.
  • Superior Accuracy and Stability: Text2PDE outperformed established baselines like GINO and MeshGraphNet (MGN) in terms of L2 error across all datasets. Because it generates the whole rollout at once, the error stays flat over time, whereas traditional autoregressive models see their error explode.
  • Zero-Shot Generalization: The text-conditioned model successfully generated physically consistent simulations for scenarios it hadn't seen exactly in the training set, proving it learned the underlying "rules" of the physics rather than just memorizing frames.

Limitations and Future Work

While Text2PDE represents a significant leap forward, it is not without limitations. Even with optimizations, diffusion requires multiple iterations, making inference slower than a single forward pass of a simple CNN. Furthermore, natural language can be ambiguous; a prompt might lack the detail needed to define a unique physical solution perfectly, leading to "plausible" rather than "exact" results.

Additionally, generating the whole trajectory at once fixes the simulation length. To simulate longer events, the authors suggest exploring an "autoregressive LDM" approach in future work. Finally, relying on LLMs to automatically caption training data can sometimes introduce hallucinations, where the language model misidentifies physical features and degrades training quality. Despite these challenges, Text2PDE paves the way for highly accessible, scalable, and accurate neural physics simulators.

Summary updated

BibTeX
@inproceedings{zhou2025text,
  author = {Anthony Zhou and Zijie Li and Michael Schneier and John R Buchanan Jr and Amir Barati Farimani},
  title = {{Text2PDE: Latent Diffusion Models for Accessible Physics Simulation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=Nb3a8aUGfj},
}
Figure