Source-linked AI summary
Can Physics-Informed Neural Networks beat the Finite Element Method?
Tamara G. Grossmann, Urszula Julia Komorowska, Jonas Latz, Carola-Bibiane Schönlieb
TL;DR
The paper asks whether PINNs can outperform FEM for numerical PDE solution. It systematically compares both methods across several linear and nonlinear PDEs, finding that PINNs did not beat FEM in solution time or accuracy, although they were sometimes faster to evaluate.
Problem
PINNs and FEM had mainly been studied in isolation, leaving their computational costs and approximation accuracies insufficiently compared.
Method
The study compares vanilla PINNs and FEM on Poisson, Allen–Cahn, and semilinear Schrödinger equations across one, two, and three dimensions.
Results
PINNs did not outperform FEM in solution time or accuracy across the study, while some experiments showed faster PINN evaluation.
Takeaways & Limitations
For PDE classes where classical methods are applicable, FEM remained superior overall, while PINNs may be useful for pointwise evaluation or high-dimensional settings.
Takeaways & Limitations
PINNs could not approximate the Allen–Cahn solution close to ground truth when ε = 0.001 in the reported experiments.
Abstract
from arXiv · showhide
Partial differential equations play a fundamental role in the mathematical modelling of many processes and systems in physical, biological and other sciences. To simulate such processes and systems, the solutions of PDEs often need to be approximated numerically. The finite element method, for instance, is a usual standard methodology to do so. The recent success of deep neural networks at various approximation tasks has motivated their use in the numerical solution of PDEs. These so-called physics-informed neural networks and their variants have shown to be able to successfully approximate a large range of partial differential equations. So far, physics-informed neural networks and the finite element method have mainly been studied in isolation of each other. In this work, we compare the methodologies in a systematic computational study. Indeed, we employ both methods to numerically solve various linear and nonlinear partial differential equations: Poisson in 1D, 2D, and 3D, Allen-Cahn in 1D, semilinear Schrödinger in 1D and 2D. We then compare computational costs and approximation accuracies. In terms of solution time and accuracy, physics-informed neural networks have not been able to outperform the finite element method in our study. In some experiments, they were faster at evaluating the solved PDE.
1 Introduction
PDEs model diverse physical, biological, socioeconomic, and financial processes, but many require numerical solution. This study systematically compares FEM and PINNs across several PDE classes.
- PDEs describe processes and systems across physical, biological, socioeconomic, and financial domains.
- Many PDEs lack closed-form solutions, making numerical approximation necessary.
- FEM is a standard methodology with established error estimators, convergence results, and stability guarantees.
- FEM faces dimensionality, fine-discretisation, nonsmoothness, singularity, and irregular-domain challenges.
- Neural-network PDE solvers avoid grid-based discretisation and can evaluate new points efficiently after training.
- The study compares FEM and PINNs on Poisson, Allen–Cahn, and semilinear Schrödinger equations across multiple dimensions.
2 Mathematical Background
The paper formulates general and representative PDEs, then explains FEM's weak-form discretisation and PINNs' neural approximation using automatic differentiation and sampled points.
- A general PDE maps an unknown solution u over a spatial domain and time interval through a differential operator A to a source term f.
- The study covers linear Poisson, nonlinear Allen–Cahn, and complex-valued semilinear Schrödinger equations.
- Finite element method: FEM seeks a weak solution in function spaces and replaces the infinite-dimensional space with a finite-dimensional basis.
- Finite element method: Locally supported piecewise-polynomial finite elements typically produce sparse linear systems.
- Finite element method: For time-dependent equations, FEM commonly discretises space while using time-stepping schemes, including implicit or semi-implicit updates.
- Physics-informed neural networks: PINNs represent the PDE solution with a neural network trained on randomly sampled domain, boundary, and initial-condition points.
- Physics-informed neural networks: Automatic differentiation evaluates differential operators without a mesh, while making sampling choices important.
3 Method of comparison
The computational study compares FEM and PINNs across PDEs of varying complexity and dimensionality using solution time, evaluation time, and accuracy.
- The comparison asks which methodology is faster, more accurate, and more efficient across PDE types and dimensions.
- The experiments use ground-truth solutions to evaluate approximation accuracy.
- FEM is tested with different mesh sizes to examine the computation-time and accuracy trade-off.
- The study compares solution time, evaluation time, and accuracy for FEM and PINNs.
- PINN solution time is neural-network training on a GPU, whereas FEM solution time is solving the weak form on a fixed CPU mesh.
4 Approximating the Poisson equation
The study compares FEM and vanilla PINNs for Poisson equations in one, two, and three dimensions using solution time, evaluation time, and approximation accuracy. FEM generally provides faster and more accurate solutions, while trained PINNs can be faster to evaluate on new points in higher-dimensional cases.
- Experimental scope: The experiments cover Poisson equations in 1D, 2D, and 3D, enabling comparisons of computational cost and accuracy across dimensions.Each equation has an analytical solution used to evaluate FEM and PINN approximations.
- 1D Poisson: In 1D, nearly all FEM and PINN approximations match the ground truth marginally, except the smallest PINN, which fails to satisfy the boundary conditions.The exceptional network has one hidden layer and one node.
- 1D Poisson: 2–3 orders of magnitude higher training time accompanies PINN architectures that achieve errors similar to or lower than some FEM approximations in 1D.Overall, FEM is faster and more accurate for both solving and evaluating the approximation in the 1D experiment.
- Methods: FEM uses progressively finer meshes and piecewise linear finite elements, whereas PINNs use neural networks trained to minimize PDE and boundary-condition residuals.The study varies FEM mesh sizes and PINN architectures to examine time–accuracy trade-offs.
- 2D Poisson: 1–3 orders of magnitude faster solution time gives FEM an advantage over all PINN approximations for 2D Poisson in both accuracy and computation time.PINN evaluation on a new mesh is 2–3 orders of magnitude faster than FEM interpolation, but PINN approximations remain less accurate.
- 3D Poisson: 1–3 orders of magnitude slower PINN training in 3D is offset during evaluation, where PINNs are faster than FEM and achieve equal or higher accuracy in most comparisons.PINN evaluation is 2–3 orders of magnitude faster than FEM interpolation on a new mesh.
5 Approximating the Allen-Cahn equation
The Allen-Cahn experiments compare FEM and PINNs across discretisations, network architectures, approximation accuracy, and computational cost. PINNs can approximate the solution with sufficiently large networks, but FEM remains substantially faster and handles smaller ϵ more reliably.
- Problem setup: The study uses the 1D Allen-Cahn equation on [0, 1] with T = 0.05 and ϵ = 0.01 for its main results.A smaller ϵ produces nearly piecewise-constant solutions, while larger ϵ values yield smoother solutions.
- Methods: PINNs are trained using weighted PDE, boundary, and initial-condition residuals with sampled collocation, boundary, and initial-condition points.The networks use feed-forward dense architectures with tanh activation and multiple widths and depths.
- Approximation accuracy: FEM recovers the solution across all tested mesh sizes, whereas PINN accuracy depends strongly on network architecture and parameter count.Twenty-node architectures fail to recover the solution, 100-node networks can be trained successfully, and 500-node networks approximate it well.
- Computational comparison: FEM is 5-6 orders of magnitude faster than PINNs for solving the Allen-Cahn equation, although some sufficiently large PINNs achieve similar relative errors.The large training-time gap is attributed mainly to the size of the neural networks; FEM also remains faster during evaluation, by about one order of magnitude relative to FEM solution time.
- Limitations: For ϵ = 0.001, PINNs with several activation functions fail to produce a satisfactory approximation, while FEM can approximate the solution using a finer mesh.The smaller parameter creates binary-like behavior with very large gradients or discontinuities, challenging vanilla PINNs.
6 Approximating the Semilinear Schrödinger equation
The study solves one- and two-dimensional complex-valued semilinear Schrödinger equations with FEM and vanilla PINNs, comparing their computational cost and accuracy. FEM generally achieves more accurate solutions faster, although PINNs can sometimes evaluate already-solved solutions more quickly.
- 6.1 One-dimensional Schrödinger equation: The one-dimensional problem is complex-valued, so the solution is represented through separate real and imaginary components, uR and uI.The modulus |h| is also used for visualisation and comparison.
- 6.1 One-dimensional Schrödinger equation: The FEM approximation uses semi-implicit Euler time stepping, piecewise-linear basis functions on interval meshes, and GMRES for the resulting systems.Meshes contain 32, 128, 512, or 2048 cells, with dt = 1e-3.
- 6.1 One-dimensional Schrödinger equation: The PINN uses 20,000 domain collocation points, 50 boundary points, 50 initial-condition points, tanh activations, and multiple dense architectures.Training uses Adam for 50,000 epochs followed by L-BFGS refinement.
- 6.1 One-dimensional Schrödinger equation: For the one-dimensional modulus |h|, FEM has a lower solution time by 2 orders of magnitude and lower relative error than every neural-network approximation.FEM also remains faster and more accurate when comparing evaluation times alone; PINNs are faster only when FEM solving time is compared with PINN evaluation time.
- 6.2 Two-dimensional Schrödinger equation: In two dimensions, FEM outperforms PINNs by 2–3 orders of magnitude in solving time and 1 order of magnitude in evaluation time, while PINNs are significantly less accurate for the imaginary part.PINNs struggle with fine wave-like boundary features; finer FEM meshes recover details that coarse meshes miss.
7 Discussion and Conclusions
The discussion finds that PINNs do not beat FEM on solution time and accuracy across the study, despite occasional advantages in pointwise evaluation or higher-dimensional scaling. It also identifies settings and model variants that remain outside or beyond the strongest conclusions.
- Overall comparison: Across the experiments, PINNs do not beat FEM when solution time and accuracy are considered together.Except for inconclusive real and imaginary components in the one-dimensional Schrödinger test, FEM is generally faster at equal or higher accuracy.
- Evaluation time: PINNs are sometimes faster for pointwise evaluation, but this advantage was demonstrated only in the three-dimensional Poisson test.Because FEM solving was much faster in the examples, repeatedly solving FEM on adapted grids would likely still be faster overall.
- Observed limitations and future directions: PINNs unexpectedly struggle with Allen–Cahn at small ε and with finely structured two-dimensional Schrödinger solutions.The authors suggest adaptive or variational PINNs as possible approaches for these cases.
- Observed limitations and future directions: The study does not evaluate neural operator approximators for parameterised PDEs, whose offline training cost would need comparison with repeated classical solves.Examples include Fourier Neural Operators and DeepONets; relevant classical alternatives include reduced bases and low-rank tensor methods.
- High-dimensional settings: PINNs show no increment in computational cost between the two- and three-dimensional Poisson tests, suggesting potential value in high-dimensional settings.The paper nevertheless concludes that PINNs do not outperform classical methods for certain PDE classes where classical techniques remain applicable.