Abstract
Enhancing neural networks with knowledge of physical equations has become an efficient way of solving various physics problems, from fluid flow to electromagnetism. Graph neural networks show promise in accurately representing irregularly meshed objects and learning their dynamics, but have so far required supervision through large datasets. In this work, we represent meshes naturally as graphs, process these using Graph Networks, and formulate our physics-based loss to provide an unsupervised learning framework for partial differential equations (PDE). We quantitatively compare our results to a classical numerical PDE solver, and show that our computationally efficient approach can be used as an interactive PDE solver that is adjusting boundary conditions in real-time and remains sufficiently close to the baseline solution. Our inherently differentiable framework will enable the application of PDE solvers in interactive settings, such as model-based control of soft-body deformations, or in gradient-based optimization methods that require a fully differentiable pipeline.
Introduction
Partial Differential Equations (PDEs) are fundamental to describing physical phenomena, ranging from fluid dynamics to heat transfer. While traditional numerical methods like Finite Element Analysis (FEM) provide high accuracy, they are often computationally intensive and slow, limiting their utility in real-time or interactive applications.
Recent advances in deep learning have sought to accelerate PDE solving. However, many existing approaches, such as those based on Convolutional Neural Networks (CNNs), are restricted to regular pixel-like grids. This is a significant limitation for real-world engineering problems where objects possess complex, irregular geometries. While Physics-Informed Neural Networks (PINNs) can handle arbitrary coordinates, they often struggle to generalize to unseen geometries or boundary conditions without retraining. This work addresses the need for a solver that is fast, handles irregular meshes, and learns physics without requiring expensive pre-computed supervised datasets.
Methodology
The proposed framework combines the structural flexibility of Graph Neural Networks (GNNs) with an unsupervised, physics-constrained loss function.
Graph Representation and Processing
Physical meshes are naturally represented as graphs, where nodes store physical state variables (e.g., temperature) and edges capture spatial connectivity. The GNN processes these graphs to predict the evolution of the system. To ensure stability on irregular meshes, the authors found that replacing standard summation-based aggregation with averaging prevents numerical "spikes" caused by varying node degrees.
Physics-Constrained Loss
The core of the unsupervised approach is a loss function derived directly from the PDE and its boundary conditions. The total loss $\mathcal{L}$ is defined as the sum of residuals from the physical equations and boundary constraints: $$\mathcal{L} = \alpha \| \hat{f}_{\text{PDE}}(\vec{u}_t, \vec{u}_{t+1}) \|^2 + \beta \| \hat{f}_{\text{BC}}(\vec{u}_t, \vec{u}_{t+1}) \|^2$$
Stable Gradient Computation
Calculating spatial derivatives on irregular meshes is challenging. A naive finite difference approach can lead to instabilities. To overcome this, the authors utilize a technique from finite element theory: transforming triangular mesh elements into a local "natural" coordinate system. This transformation ensures that derivatives remain stable and well-defined regardless of mesh irregularity.
Training in Randomized Environments
To promote generalization, the model is trained across "randomized environments." During training, the GNN is exposed to diverse initial conditions, varying source terms, and randomly placed obstacles. This prevents the network from simply memorizing specific scenarios and instead forces it to learn the underlying physical principles.
Experiments and Results
The framework was evaluated on several synthetic benchmarks, including the 1D Heat, Eikonal, and Burger’s equations, as well as a complex 2D Heat equation setup with random obstacles and heat sources.
Accuracy and Generalization
The GNN-based solver demonstrated high fidelity compared to the gold-standard classical solver, FEniCS. For the 2D Heat equation, the model achieved a Mean Squared Error (MSE) of $6.94 \times 10^{-4}$. Crucially, the model generalized well to new geometries and obstacle configurations not seen during training, a significant advantage over traditional PINNs.
Computational Efficiency
The GNN approach offers substantial speedups during inference. In a 2D mesh benchmark with 160,000 nodes, the GNN completed the simulation in 531ms, compared to 3.06s for FEniCS—a 5.7x speedup. This performance gap is expected to increase for more complex, non-linear equations.
Conclusion and Future Work
This work presents a fully differentiable, unsupervised framework for solving PDEs on irregular meshes. By leveraging GNNs and physics-based losses, the approach enables real-time physical simulations that can be integrated into larger optimization or control loops.
Future research will address current limitations, such as the high approximation error near "shocks" or sharp discontinuities (e.g., in Burger's equation). Extending the framework to higher-order elements and massive 3D Lagrangian meshes will further expand its applicability to complex engineering and soft-robotics problems.
Summary updated