Gradient-enhanced physics-informed neural networks for forward and inverse PDE problems

Jeremy Yu, Lu Lu, Xuhui Meng, George Em KarniadakisarXiv 2021 · DOI

Abstract

Deep learning has been shown to be an effective tool in solving partial differential equations (PDEs) through physics-informed neural networks (PINNs). PINNs embed the PDE residual into the loss function of the neural network, and have been successfully employed to solve diverse forward and inverse PDE problems. However, one disadvantage of the first generation of PINNs is that they usually have limited accuracy even with many training points. Here, we propose a new method, gradient-enhanced physics-informed neural networks (gPINNs), for improving the accuracy and training efficiency of PINNs. gPINNs leverage gradient information of the PDE residual and embed the gradient into the loss function. We tested gPINNs extensively and demonstrated the effectiveness of gPINNs in both forward and inverse PDE problems. Our numerical results show that gPINN performs better than PINN with fewer training points. Furthermore, we combined gPINN with the method of residual-based adaptive refinement (RAR), a method for improving the distribution of training points adaptively during training, to further improve the performance of gPINN, especially in PDEs with solutions that have steep gradients.

Introduction

Physics-Informed Neural Networks (PINNs) have emerged as a powerful paradigm for solving partial differential equations (PDEs) by integrating physical laws directly into the deep learning training process. By treating the PDE residual as a component of the loss function, PINNs enable mesh-free solutions to complex forward and inverse problems. Despite their success, "first-generation" PINNs often suffer from limited accuracy and slow convergence, particularly when dealing with sharp transitions or high-precision requirements. Standard PINNs minimize the residual but overlook a fundamental mathematical property: if a residual is zero across a domain, its derivatives must also be zero. This paper introduces Gradient-enhanced Physics-Informed Neural Networks (gPINNs) to address these limitations by incorporating residual gradient information into the training objective.

Methodology: Gradient Enhancement

The core innovation of gPINN is the inclusion of the gradient of the PDE residual in the loss function. While a standard PINN minimizes the mean squared error (MSE) of the residual at collocation points, gPINN adds a term penalizing the MSE of the residual's gradient with respect to the input coordinates. This forces the network to satisfy the physics more rigorously, effectively acting as a powerful regularizer.

Figure 1: Comparison of standard NN and gradient-enhanced NN (gNN) for function approximation. Panels A and B show the reduction in relative error for both the function u and its derivative u' as training points increase. Panels C and D visualize the superior fit of gNN with limited training data.

To further enhance performance in "stiff" problems—those with steep gradients or shocks—the authors combine gPINN with Residual-based Adaptive Refinement (RAR). RAR adaptively adds training points in regions where the residual is highest, ensuring the network's capacity is focused on the most challenging features of the solution.

Experimental Setup

The effectiveness of gPINNs was evaluated across several benchmark problems:

  • Function Approximation: A high-frequency 1D function used to demonstrate the basic principle.
  • Poisson and Diffusion-Reaction Equations: Standard tests for convergence in forward problems.
  • Brinkman-Forchheimer Model: An inverse problem focused on inferring effective viscosity and permeability in porous media.
  • Burgers’ and Allen-Cahn Equations: Nonlinear PDEs characterized by steep gradients and complex dynamics.

Key Results and Insights

Numerical experiments demonstrate that gPINNs consistently outperform standard PINNs in both accuracy and efficiency.

Enhanced Accuracy and Efficiency

In Poisson and Diffusion-Reaction benchmarks, gPINNs achieved relative errors approximately one order of magnitude lower than standard PINNs for the same number of training points. For instance, in the Diffusion-Reaction case, gPINN reached a 1% relative error with only 40 points, whereas a standard PINN required over 100 points.

Figure 3: L2 relative error of u vs. number of training points for a 1D Poisson equation. gPINN with an optimized weight (w=0.01) significantly outperforms both the standard PINN and gPINN with w=1.

Superior Derivative Prediction

A significant advantage of gPINNs is the drastically improved accuracy of predicted derivatives (u'). In many engineering applications, quantities derived from the solution (e.g., stress, flux) are of primary interest. By constraining the residual gradient, gPINNs ensure these derivatives are captured with much higher fidelity.

Robustness in Inverse Problems

For the Brinkman-Forchheimer model, gPINN demonstrated superior robustness in parameter estimation, converging to true values even in the presence of noisy training data.

Synergy with Adaptive Refinement

For challenging nonlinear problems like the Burgers’ equation, the combination of gPINN and RAR proved exceptional. While standard PINNs often plateau at high error levels (e.g., ~10%), the integrated gPINN+RAR approach reduced errors to approximately 0.3%.

Conclusion and Future Work

gPINNs represent a significant step forward in physics-informed machine learning, offering higher precision and better data efficiency than standard PINNs. The primary trade-off is a 2-3x increase in computational cost per iteration due to higher-order derivative calculations. Future research will focus on optimizing these calculations—potentially using Taylor-mode automatic differentiation—and developing automated methods for tuning the gradient loss weight (wg).

Summary updated

BibTeX
@misc{yu2021gradient,
  author = {Jeremy Yu and Lu Lu and Xuhui Meng and George Em Karniadakis},
  title = {{Gradient-enhanced physics-informed neural networks for forward and inverse PDE problems}},
  year = {2021},
  eprint = {2111.02801},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.02801},
}
Figure