Physics-informed attention-based neural network for solving non-linear partial differential equations

Ruben Rodriguez Torrado, Pablo Ruiz, Luis Cueto-Felgueroso, Michael Cerny Green, Tyler Friesen, Sebastien Matringe, Julian TogeliusarXiv 2021

TL;DR

This paper introduces Physics-Informed Attention-based Neural Networks (PIANNs) to tackle a significant challenge in solving non-linear partial differential equations (PDEs) with shock waves. By integrating recurrent neural networks with attention mechanisms, PIANNs can effectively capture sharp discontinuities without relying on artificial dissipation, a common workaround in traditional methods.

What Problem Does This Paper Address?

Solving non-linear partial differential equations (PDEs), especially those with hyperbolic characteristics, is a long-standing challenge in computational science. These equations often describe phenomena like fluid dynamics, where solutions can develop sharp, localized features known as "shock waves." Traditional numerical methods struggle with these shocks, often requiring very fine grids or the introduction of artificial dissipation (a form of numerical smoothing) to maintain stability. Physics-Informed Neural Networks (PINNs) have emerged as a promising alternative, learning to solve PDEs by minimizing the PDE's residual. However, existing PINN architectures often inherit the limitations of classical methods when dealing with hyperbolic PDEs and their inherent discontinuities. This paper aims to address this gap by proposing a novel neural network architecture that can inherently handle these sharp features without resorting to artificial dissipation or requiring prior knowledge of shock locations.

Methods

The core innovation of this work is the Physics-Informed Attention-based Neural Network (PIANN) architecture. It combines two key deep learning components:

  • Recurrent Neural Networks (RNNs), specifically Gated Recurrent Units (GRUs): These are used to process the spatial and temporal information of the PDE solution. The encoder-decoder GRU structure allows the network to learn representations of the solution across the entire domain.
  • Attention Mechanisms: This is the crucial addition. Inspired by advancements in natural language processing, the attention mechanism allows the network to dynamically weigh the importance of different parts of the input (specifically, the encoded spatial information) when predicting the solution at a given point. This enables the network to focus on and adapt its behavior to non-linear features like shock fronts.

Unlike standard PINNs, PIANNs enforce initial and boundary conditions directly within the network's architecture, rather than including them in the loss function. This simplifies the training process by removing the need to tune hyperparameters for these conditions and allows the network to solely focus on minimizing the PDE residual.

Datasets

The paper uses a synthetic dataset generated from the Buckley-Leverett (BL) equation, a classical hyperbolic conservation law describing two-phase fluid flow in porous media. The problem is set up with a non-concave fractional flow function, which is known to produce challenging shock solutions.

The training set is defined on a grid of spatial and temporal points, along with a range of mobility ratios ($M$). Importantly, the authors emphasize that no examples of the actual solution are provided for training; the network learns solely from the PDE itself and the enforced boundary/initial conditions.

Key Insights and Ideas

  • Architecture over Regularization: The paper strongly advocates for designing specialized network architectures to handle specific PDE characteristics (like discontinuities) rather than relying solely on regularization techniques.
  • Attention for Discontinuities: The attention mechanism is shown to be highly effective in identifying and adapting to shock fronts. It allows the network to learn where discontinuities occur and adjust its prediction accordingly, mimicking how humans focus on critical information.
  • Implicit Shock Handling: PIANNs can capture shock waves without explicit knowledge of their location or the need for artificial dissipation, which is a significant advantage over traditional methods and some existing PINN approaches.
  • Direct Condition Enforcement: Enforcing initial and boundary conditions directly in the architecture simplifies training and ensures these conditions are met precisely.

Key Results

  • Accurate Shock Capturing: The PIANN successfully captures the shock front in the Buckley-Leverett equation, providing high-quality solutions that closely match the analytical solution.
  • Fast Convergence: The residual error decreases rapidly, reaching values below $10^{-4}$ within a few epochs, indicating that the network is effectively learning to satisfy the PDE.
  • Interpolation and Extrapolation: The PIANN demonstrates good performance in interpolating solutions for mobility ratios within the training range and shows reasonable extrapolation capabilities, though performance degrades for values far outside the training set.
  • Robustness to Resolution: The method shows less sensitivity to changes in spatial and temporal resolution compared to traditional numerical methods, offering better stability.
  • Comparison to Traditional Methods: The PIANN's solutions are comparable to those obtained using central and upwind finite difference schemes, but without the need for artificial dissipation.

Limitations and Future Work

  • Shock Smoothing: While the shock location is well-captured, the PIANN's representation of the shock front is slightly smoothed, exhibiting non-monotonic artifacts, similar to higher-order finite difference methods.
  • Extrapolation Degradation: Performance degrades significantly when extrapolating to mobility ratios ($M$) far beyond the training range, suggesting that retraining with a wider range of $M$ values might be necessary for such cases.
  • Future Work: The authors suggest that this methodology could be extended to other non-linear PDEs with shock waves, opening doors for applications in complex simulations like reservoir modeling and carbon sequestration. They also propose that the attention mechanism's ability to identify discontinuities could be applied to other domains beyond PDEs.

Summary updated

BibTeX
@misc{torrado2021physics,
  author = {Ruben Rodriguez Torrado and Pablo Ruiz and Luis Cueto-Felgueroso and Michael Cerny Green and Tyler Friesen and Sebastien Matringe and Julian Togelius},
  title = {{Physics-informed attention-based neural network for solving non-linear partial differential equations}},
  year = {2021},
  eprint = {2105.07898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.07898},
}
Figure