B-PINNs: Bayesian physics-informed neural networks for forward and inverse PDE problems with noisy data

https://doi.org/10.1016/j.jcp.2020.109913Get rights and content

Abstract

We propose a Bayesian physics-informed neural network (B-PINN) to solve both forward and inverse nonlinear problems described by partial differential equations (PDEs) and noisy data. In this Bayesian framework, the Bayesian neural network (BNN) combined with a PINN for PDEs serves as the prior while the Hamiltonian Monte Carlo (HMC) or the variational inference (VI) could serve as an estimator of the posterior. B-PINNs make use of both physical laws and scattered noisy measurements to provide predictions and quantify the aleatoric uncertainty arising from the noisy data in the Bayesian framework. Compared with PINNs, in addition to uncertainty quantification, B-PINNs obtain more accurate predictions in scenarios with large noise due to their capability of avoiding overfitting. We conduct a systematic comparison between the two different approaches for the B-PINNs posterior estimation (i.e., HMC or VI), along with dropout used for quantifying uncertainty in deep neural networks. Our experiments show that HMC is more suitable than VI with mean field Gaussian approximation for the B-PINNs posterior estimation, while dropout employed in PINNs can hardly provide accurate predictions with reasonable uncertainty. Finally, we replace the BNN in the prior with a truncated Karhunen-Loève (KL) expansion combined with HMC or a deep normalizing flow (DNF) model as posterior estimators. The KL is as accurate as BNN and much faster but this framework cannot be easily extended to high-dimensional problems unlike the BNN based framework.

Introduction

The state-of-the-art in data-driven modeling has advanced significantly recently in applications across different fields [1], [2], [3], [4], [5], due to the rapid development of machine learning and the explosive growth of available data collected from different sensors (e.g., satellites, cameras, etc.). In general, purely data-driven methods require a large amount of data in order to get accurate results [6]. As a powerful alternative, recently the data-driven solvers for partial differential equations (PDEs) have drawn an increasing attention due to their capability to encode the underlying physical laws in the form of PDEs and give relatively accurate predictions for the unknown terms with limited data. In the first case we need “big data” while in the second case we can learn from “small data” as we explicitly utilize the physical laws or more broadly a parametrization of the physics.

Two typical approaches are the Gaussian processes regression (GPR) for PDEs [7], and the physics-informed neural networks (PINNs) [6], [8]. Built upon the Bayesian framework with built-in mechanism for uncertainty quantification, GPR is one of the most popular data-driven methods. However, vanilla GPR has difficulties in handling the nonlinearities when applied to solve PDEs, leading to restricted applications. On the other hand, PINNs have shown effectiveness in both forward and inverse problems for a wide range of PDEs [9], [10], [11], [12], [13]. However, PINNs are not equipped with built-in uncertainty quantification, which may restrict their applications, especially for scenarios where the data are noisy.

In previous work, the physics-informed generative adversarial networks were employed to quantify parametric uncertainty [10], and also polynomial chaos expansions in conjunction with dropout were utilized to quantify total uncertainty [9]. In addition, approaches using the Bayesian inference for quantifying uncertainties of PDE problems have also been developed recently [14], [15], [16]. Note that (1) the methods developed in [14], [15], [16] focus on solving inverse PDE problems, and (2) the boundary conditions as well as the source terms are assumed to be known in [14], [15], [16]. However, we may only have access to sparse and noisy measurements on the boundary conditions and the source terms in real-world applications. In the present work, we propose a Bayesian physics-informed neural networks (B-PINNs) to solve linear or nonlinear PDEs with noisy data for both forward and inverse problems, see Fig. 1. We note that all the information of boundary conditions/sources terms comes from noisy measurements in the present approach. The uncertainties arising from the scattered noisy data could be naturally quantified due to the Bayesian framework [17]. B-PINNs consist of two parts: a parameterized surrogate model, i.e., a Bayesian neural network (BNN) with prior for the unknown terms in a PDE, and an approach for estimating the posterior distributions of the parameters in the surrogate model. In particular, we employ the Hamiltonian Monte Carlo (HMC) [18], [19] or the variational inference (VI) [20], [21] for estimation of the posterior distributions. In addition, we note that a non-Bayesian framework model, i.e., the dropout, has been used to quantify the uncertainty in deep neural networks, including the PINNs for solving PDEs [9], [22]. We will validate the proposed B-PINNs method and conduct a systematic comparison with the dropout for both the forward and inverse PDE problems given noisy data.

In addition to BNNs, the Karhunen-Loève expansion is also a widely used representation of a stochastic process. As an illustration, we further test the case using the truncated Karhunen-Loève as the surrogate model while we use HMC or the deep normalizing flow (DNF) models [23] for estimating the posterior in the Bayesian framework.

The rest of the paper is organized as follows: In Sec. 2, we present the B-PINNs algorithm for solving forward/inverse PDE problems with noisy data, including the BNNs for PDEs and posterior estimation methods, i.e., the HMC and VI, used in this paper. In Sec. 3, we compare the performance of the B-PINNs and dropout on the tasks of function approximation, forward PDE problems, and inverse PDE problems. In addition, we present comparisons between B-PINNs and PINNs as well as the KL for nonlinear forward/inverse PDEs in Secs. 4-5. We present a summary in Sec. 6. Furthermore, in Appendix A we present a study on the priors of BNNs, in Appendix B we give more details on the DNF models, in Appendix C we present an example of inverse problem where the unknown term is a function, and in Appendix D we give another example showing the effectiveness of the present method for extrapolation with the help of PDE as constraint.

Section snippets

B-PINNs: Bayesian physics-informed neural networks

We consider a general partial differential equation (PDE) of the formNx(u;λ)=f,xD,Bx(u;λ)=b,xΓ, where Nx is a general differential operator, D is the d-dimensional physical domain, u=u(x) is the solution of the PDE, and λ is the vector of parameters in the PDE. Also, f=f(x) is the forcing term, and Bx is the boundary condition operator acting on the domain boundary Γ. In forward problems λ is prescribed, and hence our goal is to infer the distribution of u at any x. In inverse problems, λ is

Results and discussion

In this section we present a systematic comparison among the B-PINNs with different posterior sampling methods, i.e., HMC (B-PINN-HMC) and VI (B-PINN-VI), as well as the dropout [9], [22] for 1D function approximation, and 1D/2D forward/inverse PDE problems.

In all the cases, we employ a neural network with 2 hidden layers, each with width of 50, for B-PINNs. The prior for θ is set as independent standard Gaussian distribution for each component. Such size of the neural network and the prior

Comparison with PINNs

In this section, we will conduct a comparison between the B-PINN-HMC and PINNs for the 1D inverse problem in Sec. 3.3.1. We employ the Adam optimizer with l=103,β1=0.9,β2=0.999 to train the PINN, with the number of the training steps set as 200,000. The results of the PINNs are shown in Fig. 12. Note that the PINNs cannot quantify uncertainties of the predictive results.

As shown in Fig. 12, the predicted u and f could fit all the training points. In the cases where the noise scale is as small

Comparison with the truncated Karhunen-Loève expansion

So far we have shown the effectiveness of B-PINNs in solving PDE problems. As we know, a neural network is extremely overparametrized. Hence, we want to investigate if we can use other models with less parameters for our surrogate model in the Bayesian framework. For example, we consider the Karhunen-Loève expansion, a widely used representation for a stochastic process in the following study.

Summary

There are many sources of uncertainty in data-driven PDE solvers, including aleatoric uncertainty associated with noisy data, epistemic uncertainty associated with unknown parameters, and model uncertainty associated with the type of PDE that models the target phenomena. In this paper, we address aleatoric uncertainty for solving forward and inverse PDE problems, based on noisy data associated with the solution, source terms and boundary conditions. In particular, we employ physics-informed

CRediT authorship contribution statement

Liu Yang & Xuhui Meng: Conceptualization, Methodology, Investigation, Coding, Writing - original draft, Writing - review & editing, Visualization. George Em Karniadakis: Conceptualization, Methodology, Investigation, Writing - original draft, Writing - review & editing, Supervision, Project administration, Funding acquisition.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgement

This work was supported by the PhILMS grant DE-SC0019453, OSD/AFOSR MURI grant FA9550-20-1-0358, OSD/ARO MURI grant W911NF-15-1-0562, and the NIH grant U01 HL142518.

References (38)

  • Y. LeCun et al.

    Deep learning

    Nature

    (2015)
  • S.H. Rudy et al.

    Data-driven discovery of partial differential equations

    Sci. Adv.

    (2017)
  • N.M. Mangan et al.

    Model selection for dynamical systems via sparse regression and information criteria

    Proc. R. Soc. Lond. Ser. A, Math. Phys. Sci.

    (2017)
  • S.L. Brunton et al.

    Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control

    (2019)
  • L. Lu et al.

    DeepXDE: a deep learning library for solving differential equations

  • L. Yang et al.

    Physics-informed generative adversarial networks for stochastic differential equations

    SIAM J. Sci. Comput.

    (2020)
  • X. Meng et al.

    PPINN: parareal physics-informed neural network for time-dependent PDEs

  • J. Li et al.

    Adaptive construction of surrogates for the Bayesian solution of inverse problems

    SIAM J. Sci. Comput.

    (2014)
  • L. Yan et al.

    An adaptive surrogate modeling based on deep neural networks for large-scale Bayesian inverse problems

  • Cited by (580)

    • Inverse flow prediction using ensemble PINNs and uncertainty quantification

      2024, International Journal of Heat and Mass Transfer
    View all citing articles on Scopus
    1

    The first two authors contributed equally to this work.

    View full text