Improved physics-informed neural network in mitigating gradient-related failures

Pancheng Niu, Jun Guo, Yongming Chen, Yuqian Zhou, Minfu Feng, Yanchao ShiNeurocomputing 2024

Introduction

Physics-Informed Neural Networks (PINNs) have emerged as a transformative approach for solving partial differential equations (PDEs) by integrating physical laws directly into the deep learning framework. By incorporating the PDE residual into the loss function, PINNs can act as mesh-free solvers. However, a significant hurdle in their practical application is the "gradient flow stiffness" problem. This phenomenon occurs when the different components of the multi-objective loss function—initial conditions (IC), boundary conditions (BC), and the PDE residual—exhibit vastly different gradient magnitudes, leading to optimization failures or physically inconsistent solutions.

Addressing the "Stiffness" Problem

The training of a PINN is essentially a balancing act. If the optimizer prioritizes the supervised components (IC and BC) too heavily, it may fail to capture the underlying physics represented by the unsupervised residual term. Conversely, if the residual term dominates, the network might ignore the boundary constraints. This imbalance often results in gradient pathologies where the network converges to a local minimum that satisfies some constraints but fails the overall physical model.

The I-PINN Framework

To overcome these challenges, the I-PINN (Improved Physics-Informed Neural Network) framework introduces two synergistic enhancements: a transformer-inspired architecture and a novel adaptive weighting scheme.

1. Improved Architecture (IA-PINN)

The IA-PINN architecture departs from standard fully connected networks by incorporating two encoder branches, denoted as $U$ and $V$. These encoders embed the input variables into the hidden states of the network, a technique inspired by the attention mechanisms found in Transformers. This structural modification helps mitigate common deep learning issues like gradient vanishing and explosion, providing a more stable "highway" for gradient flow during backpropagation.

2. Improved Adaptive Weighting (IAW-PINN)

While standard adaptive weighting methods use homoskedastic uncertainty to balance loss terms, they often suffer from unbounded weight growth. In many cases, the weights for boundary terms can grow excessively, effectively suppressing the gradient signal from the physics residual. I-PINN introduces a weight upper bound ($\gamma$). By capping the influence of any single loss term, the framework ensures that the "unsupervised" physics residual always maintains sufficient gradient signal to guide the optimization process.

Schematic of the I-PINN architecture and performance comparison across various network structures.

Experimental Evaluation

The researchers validated the I-PINN framework against three rigorous benchmarks in scientific computing:

  • The Helmholtz Equation: A 2D wave equation critical for modeling electromagnetic radiation and seismology.
  • The Klein-Gordon Equation: A nonlinear equation fundamental to relativistic quantum mechanics.
  • Lid-Driven Cavity Flow: A standard benchmark for incompressible Navier-Stokes equations, simulating fluid motion at a Reynolds number of $Re=100$.

Key Results and Discussion

The experimental results demonstrate that the synergy between the improved architecture and the constrained adaptive weighting is crucial for performance.

  • Accuracy Gains: Across all benchmarks, I-PINN consistently reduced relative errors by at least one order of magnitude compared to vanilla PINNs. For instance, in the Helmholtz problem with a $7 \times 50$ network, I-PINN achieved a relative error of $5.26 \times 10^{-3}$, while the vanilla PINN remained at $2.68 \times 10^{-1}$.
  • Structural Robustness: As shown in the performance comparison graph in Figure 1, I-PINN maintains high accuracy and stability across various network depths and widths (from $3 \times 30$ to $7 \times 90$). In contrast, the performance of vanilla PINNs and intermediate models (IA-PINN, IAW-PINN) fluctuates significantly depending on the network structure.
  • Convergence Stability: The model exhibited faster and more stable convergence, avoiding the erratic solution quality often observed in other adaptive weighting schemes.

Conclusion

The I-PINN framework effectively mitigates the gradient flow stiffness problem by combining a robust, encoder-based architecture with a capped adaptive weighting scheme. This dual approach ensures that all physical constraints are balanced during training, leading to significantly more accurate and reliable PDE solutions. Future work will focus on automating the selection of the weight upper bound $\gamma$ and extending the framework to higher-dimensional multi-physics systems and inverse problems.

Summary updated

BibTeX
@inproceedings{niu2024improved,
  author = {Pancheng Niu and Jun Guo and Yongming Chen and Yuqian Zhou and Minfu Feng and Yanchao Shi},
  title = {{Improved physics-informed neural network in mitigating gradient-related failures}},
  booktitle = {Neurocomputing},
  year = {2024},
}
Figure