Physics informed neural networks work better with discretization for complex problems

A Systematic Analysis of Automatic Differentiation versus Discretization-based Constraints for Physics-Informed PDE Solvers

Machine Learning

Summary

Solving complicated physics problems using neural networks can be done in different ways. One way called automatic differentiation works well for simple cases but struggles with more complex ones that have sharp changes or complex shapes. The authors tested these methods on many problems and found that methods using discretization, which break problems into small pieces, perform better as the problems get harder. They also discovered that certain types of neural networks called graph neural networks are better suited to handle complex boundary conditions than simpler ones. This work helps guide how to build better neural network tools for tough engineering challenges.

physics-informed neural networkspartial differential equationsautomatic differentiationdiscretization-based constraintsmulti-layer perceptrongraph neural networknonlinearityoptimization errortruncation errorboundary conditions

Authors

Xing Guo, Hongwei Tang, Zewei Meng, Yidong Zhang, Shaoqiu Xiao, Feng Liu

Abstract

Physics-informed neural networks (PINNs) represent a growing frontier in using artificial intelligence to solve partial differential equations (PDEs). Automatic differentiation (AD) plays a central role in this paradigm, which is mesh-free and replaces traditional iterative solvers with gradient-based optimization in continuous space. However, the inherent limitations of AD, particularly in handling higher-order derivatives and discontinuous solutions, pose significant challenges for complex problems. This has motivated a growing number of researchers to explore discretization-based constraints as an alternative path. Yet, the respective applicability of these two paradigms remains largely unexplored. In this work, we conduct systematic experiments across a wide spectrum of problems, from simple linear Poisson to high-Mach hypersonic flows with strong discontinuities. Through a rigorous decomposition of approximation, optimization, and truncation errors, we systematically elucidate the fundamental trade-offs and error-governing mechanisms of both paradigms, as well as two representative network architectures: multi-layer perceptron (MLP) and graph neural network (GNN). Our results reveal a consistent trend: as nonlinearity strengthens, the accuracy advantage of discretization-based constraints becomes increasingly pronounced, with smaller optimization errors compensating for the truncation errors. Moreover, the more complex the nonlinearity and boundary conditions, the greater the advantage of GNN over MLP. These insights offer a robust practical guideline for configuring neural PDE solvers in demanding engineering applications. Our source data and code are available at https://github.com/guoxing0809/neuropde_analysis.