Source-linked AI summary
Learning Mesh-Based Simulation with Graph Networks
Tobias Pfaff, Meire Fortunato, Alvaro Sanchez-Gonzalez, Peter W. Battaglia
TL;DR
High-dimensional scientific simulations are expensive, motivating learned models that retain the flexibility of mesh representations. MeshGraphNets uses graph message passing and learned remeshing to predict diverse physical dynamics, outperform baselines, and run much faster than ground-truth solvers. Its resolution- and scale-independent behavior supports larger and more complex test-time settings, although some mesh types may require different remeshing methods.
Problem
High-dimensional scientific simulations are expensive, while mesh representations offer adaptive resolution and powerful numerical integration for complex physical systems.
Method
MeshGraphNets encodes meshes as graphs, passes messages over mesh and world edges, predicts dynamics, and learns sizing fields for adaptive remeshing.
Results
MeshGraphNets produces high-quality rollouts across four physical domains, outperforms particle- and grid-based baselines, and generalizes to larger, more complex test settings.
Takeaways & Limitations
The method supports resolution- and scale-independent behavior, including a windsock averaging 20k nodes—an order of magnitude more than seen during training.
Takeaways & Limitations
World edges and world coordinates apply only to Lagrangian systems, while other mesh types may require different local remeshers.
Abstract
from arXiv · showhide
Mesh-based simulations are central to modeling complex physical systems in many disciplines across science and engineering. Mesh representations support powerful numerical integration methods and their resolution can be adapted to strike favorable trade-offs between accuracy and efficiency. However, high-dimensional scientific simulations are very expensive to run, and solvers and parameters must often be tuned individually to each system studied. Here we introduce MeshGraphNets, a framework for learning mesh-based simulations using graph neural networks. Our model can be trained to pass messages on a mesh graph and to adapt the mesh discretization during forward simulation. Our results show it can accurately predict the dynamics of a wide range of physical systems, including aerodynamics, structural mechanics, and cloth. The model's adaptivity supports learning resolution-independent dynamics and can scale to more complex state spaces at test time. Our method is also highly efficient, running 1-2 orders of magnitude faster than the simulation on which it is trained. Our approach broadens the range of problems on which neural network simulators can operate and promises to improve the efficiency of complex, scientific modeling tasks.
1 INTRODUCTION
MeshGraphNets applies graph neural networks to adaptive mesh-based simulation, combining mesh-space and world-space computation. The method learns diverse physical dynamics from data and can adapt discretization during rollouts.
- Motivation: Adaptive meshes allocate greater resolution where strong gradients or higher accuracy are required, improving resource use over regular discretization.Examples include airfoil tips, cloth regions with high curvature, and fluid wall boundaries.
- Approach: MeshGraphNets encodes simulation states as graphs and passes messages separately in mesh-space and Euclidean world-space.Mesh-space approximates internal differential dynamics, while world-space captures external effects such as contact and collision.
- Rollout: The Encode-Process-Decode model is trained with one-step supervision and iteratively generates long trajectories at inference time.The decoder predicts node accelerations used to update the mesh from M_t to M_t+1.
- Scope: The model learns dynamics across cloth, structural mechanics, and fluid systems using only general biases such as spatial equivariance.The framework is intended to operate across substantially different physical systems directly from data.
- Results: MeshGraphNets outperform particle- and grid-based baselines and generalize to more complex dynamics than those used for training.The introduction presents these as central findings of the method.
2 RELATED WORK
Prior learned physical simulators primarily use regular-grid convolutional architectures or particle representations. MeshGraphNets instead targets adaptive mesh-based simulation without requiring a solver in the prediction loop.
- Motivation: Learned simulators are motivated partly by the high cost of high-resolution simulations and the need to reduce engineering and scientific turnaround time.Fast learned predictions are also useful for fluid simulation in visualization and graphics.
- Existing representations: Most learned high-dimensional physical-system models use regular grids because convolutional neural networks are widespread and hardware-supported.Particle-based representations have also gained attention for free-surface liquids and granular materials.
- Existing representations: Particle-based methods have been applied to liquids, granular materials, fluids, and glassy dynamics, while meshes have been less common for physics prediction.Mesh methods remain comparatively underused despite their engineering importance.
- Mesh-based learning: Mesh-based simulation methods in machine learning have mainly addressed geometry and shape processing rather than broad physical-dynamics prediction.Adaptive mesh representations have seen relatively little use in machine learning for physics.
- Closest prior work: Belbute-Peres et al. embed a differentiable aerodynamics solver in a graph-convolutional super-resolution pipeline, whereas MeshGraphNets operates without a solver in the loop.The comparison identifies a distinction in how the learned prediction pipeline incorporates simulation machinery.
3 MODEL
MeshGraphNets predicts mesh dynamics with an Encode-Process-Decode graph network, using mesh and world edges to model internal and external interactions. It can also learn a sizing field that drives domain-independent adaptive remeshing during rollout.
- Forward dynamics: The forward model predicts the next dynamical state from the current mesh, optionally using a history of previous meshes, then integrates the prediction.The architecture consists of an Encode-Process-Decode graph network followed by an integrator.
- Encoding: The encoder forms a multigraph whose mesh edges model internal dynamics and whose world edges model external effects such as contact and collision.World edges connect spatially close nodes that are distant in mesh space, excluding pairs already connected by mesh edges.
- Processing: The processor performs sequential message passing over mesh edges, world edges, and nodes, updating their latent embeddings.Each of L blocks has separate parameters and generalizes Graph-Net blocks to multiple edge sets.
- Decoding and integration: The decoder transforms latent node features into output features interpreted as derivatives, which a forward-Euler integrator uses to compute the next state.The updated node values produce M_t+1; some systems also predict auxiliary quantities such as pressure or stress.
- Adaptive remeshing: Adaptive remeshing uses a sizing field to identify desired local resolution, splitting invalid edges and collapsing valid edges when possible.An edge is valid when u_ij^T S_i u_ij ≤ 1, and the generic remesher is denoted M′ = R(M,S).
- Adaptive remeshing: The model learns the sizing field alongside dynamics and applies a generic remesher at test time to adapt the next-step mesh.This avoids calling the domain-specific remesher used to generate training data during rollout, though other mesh types may require different local remeshers.
4 EXPERIMENTAL DOMAINS
The experiments cover structural mechanics, adaptive cloth, and incompressible and compressible fluids across varied mesh types and dynamics. Each domain uses domain-specific node quantities and predicts physical updates that are integrated to advance the simulation.
- Experimental domains: The evaluation spans cloth, structural mechanics, incompressible fluids, and compressible fluids on regular, irregular, and dynamically changing meshes.AIRFOIL edge lengths range from 2·10^-4m to 3.5m.
- Structural mechanics: DEFORMINGPLATE models a hyper-elastic plate and actuator on a Lagrangian tetrahedral mesh, predicting velocity and von-Mises stress.Node types distinguish actuator and plate nodes; predicted velocity is integrated once to obtain the next position.
- Cloth: FLAGDYNAMIC and SPHEREDYNAMIC use adaptive triangular cloth meshes that change resolution at each time step.The model includes one history step of velocity for the fully dynamic second-order cloth system and integrates predicted acceleration twice.
- Incompressible fluids: CYLINDERFLOW predicts momentum change and pressure for water flowing around a cylinder on a fixed 2D Eulerian mesh.Node types distinguish fluid, wall, and inflow/outflow boundary nodes.
- Compressible fluids: AIRFOIL predicts momentum and density changes, plus pressure, for compressible flow around an airfoil on a 2D Eulerian mesh.The encoded node quantities include mesh coordinates, node types, momentum, and density.
5 RESULTS
MESHGRAPHNETS produces accurate, stable, and efficient rollouts across diverse physical domains, outperforming particle-, grid-, and graph-based baselines while generalizing beyond training conditions. Learned remeshing, mesh- and world-space message passing, and short histories support performance on irregular and dynamic meshes.
- Overall performance: MESHGRAPHNETS produces high-quality rollouts across four experimental domains, outperforming particle- and grid-based baselines and generalizing to larger, more complex settings.The model remains stable for thousands of rollout steps, including 40,000-step evaluation from trajectories of 400 steps.
- Baseline comparisons: MESHGRAPHNETS outperforms GCN and CNN baselines, whereas GNS becomes unstable on cloth and GCN fails to obtain stable rollouts on the richer AIRFOIL task.CNNs also undersample important wake or obstacle regions and develop fluctuations during rollout.
- Adaptive remeshing: Learned remeshing shifts resolution toward newly forming cloth folds and produces dynamics comparable to variants using labeled or estimated sizing targets.The comparison with ground-truth meshes incurs a small interpolation penalty for learned-remeshing models.
- Generalization: The model generalizes to steeper angles, higher inflow speeds, unseen mesh shapes, and meshes averaging 20k nodes, an order of magnitude larger than training meshes.In AIRFOIL, RMSE rises from 11.5 during training to 12.4 for steeper angles and 13.1 for higher inflow speeds.
- Graph representation: Both mesh-space positions and mesh-edge message passing are crucial on irregular meshes, while omitting world-space edges increases rollout RMSE by 51% on FLAGDYNAMIC and 92% on SPHEREDYNAMIC.World-space edges allow interactions between spatially close but mesh-distant nodes, including collisions.
- Hyperparameters: Fifteen message-passing blocks provide a good efficiency/accuracy trade-off, while the shortest possible history performs best because additional history causes overfitting.The preferred history is h=1 for estimating cloth velocity and h=0 otherwise; GNS instead used h ∈ 2...5.
6 CONCLUSION
MESHGRAPHNETS is a general-purpose mesh-based method for accurately and efficiently modeling diverse physical systems. Its generalization and inference-time scaling may support more efficient simulation, design optimization, and optimal control.
- Conclusion: MESHGRAPHNETS accurately and efficiently models a wide range of physical systems, generalizes well, and scales up at inference time.The method is differentiable and may therefore be useful for design optimization or optimal control tasks.
A APPENDIX
AIRFOIL uses an irregular mesh that combines broad domain coverage with fine resolution near the wing, enabling multiscale prediction with 5k nodes.
- 5k nodes span the entire AIRFOIL simulation domain while retaining high resolution around the airfoil and sub-millimeter detail near the wing tip.The middle panel marks the region used for visual comparison and RMSE computation.
A.1 DATASET DETAILS
The datasets cover multiple physical systems and include both integrated dynamical outputs and auxiliary predictions. Dynamically meshed datasets use interpolation to align information across changing meshes.
- Dataset coverage: The datasets model cloth, hyper-elasticity, and compressible or incompressible Navier–Stokes flow using ArcSim, SU2, and COMSOL.Each dataset contains 1000 training, 100 validation, and 100 test trajectories, with 250–600 time steps per trajectory.
- Outputs: Position and momentum outputs are integrated and fed back during rollout, while pressure and stress can be predicted as auxiliary quantities for dynamics analysis.The pressure field is illustrated for CYLINDERFLOW.
- Node encoding: One-hot node types distinguish simulated normal nodes from fixed or scripted-motion kinematic nodes.The encoding allows the model to account for constraints such as cloth supports and actuators.
- Dynamic meshes: In dynamically meshed datasets, barycentric interpolation transfers dynamical quantities from neighboring-time meshes into the current mesh for history and targets.These datasets lack a one-to-one correspondence between nodes across steps.
A.2.1 ARCHITECTURE AND TRAINING
The appendix specifies a two-hidden-layer MLP implementation and a long-horizon training setup designed to improve rollout robustness.
- Architecture: The encoder, processor, and decoder use ReLU-activated two-hidden-layer MLPs with layer and output size 128, except the decoder output matches the prediction dimension.All MLP outputs except the decoder are normalized with LayerNorm, and features use dataset-statistic normalization.
- Training: 10M training steps on one V100 GPU use Adam with exponential learning-rate decay from 10^-4 to 10^-6 over 5M steps.Training supervises only the next sequence step, while training noise targets robustness over rollouts of hundreds of steps.
A.2.2 TRAINING NOISE
Training noise is added to improve long-rollout robustness, with target adjustments designed to compensate for its effects after integration. Cloth uses a tunable blend because position and velocity corrections cannot be satisfied simultaneously.
- Noise injection: Random zero-mean noise is added to the most recent dynamical variable, with magnitude scanned around the one-step model error on a logarithmic scale.The strategy is intended to make rollouts of hundreds of steps more robust.
- First-order systems: For first-order systems, targets are adjusted so decoder outputs correct the noisy inputs after integration.In DEFORMINGPLATE, a noisy current position leads to an adjusted velocity target that recovers the next position.
- Second-order systems: Cloth is modeled as a second-order system in which the decoder predicts acceleration from position, with noise added to the position input.The approach follows the stated second-order treatment for cloth systems.
- Correction trade-off: Position and velocity noise cannot both be corrected simultaneously because of their strong dependency.The appendix illustrates competing acceleration targets that correct either the next-step position or velocity.
- Correction trade-off: γ ∈ [0, 1] controls a weighted average between the two cloth target-correction options.For histories longer than one step, noise is added as a random walk whose final variance matches the target variance.
A.2.3 HYPERPARAMETERS
The appendix describes learned remeshing, baseline setup, evaluation metrics, and experiments testing efficiency, rollout quality, and generalization across mesh sizes and shapes.
- Performance: Hardware-agnostic performance comparisons are difficult because the neural-network components support GPU acceleration while the ground-truth solvers do not.The authors note that solver hardware optimization varies and cite limited 2x-4x GPU speedups for ANSYS under optimal conditions.
- Performance: 11x-290x speedups were observed on a single GPU compared with ArcSim, COMSOL, and SU2.The comparison is against the cited ground-truth simulators in the studied simulation regime.
- Generalization: 50-step rollout RMSE shows no systematic dependence on FLAGDYNAMIC simulation size, while WINDSOCK and FISHFLAG errors are slightly higher but comparable.The model was evaluated on scaled FLAGDYNAMIC variants and new shapes using the respective ground-truth simulations.
- Error metrics: Full-trajectory RMSE correlates more strongly with system size because decoherence produces larger positional errors on larger flags after the first 50 steps.The reported trends also hold when measured over the whole trajectory, although the bar-plot comparison uses the first 50 steps.