scieee AI-readable full text Open interactive document viewer

A new approach to uncertainty quantification of PINNs

Robbie Slos; Tom Lefebvre; Jolan Wauters; Guillaume Crevecoeur

Abstract

Physics-Informed Neural Networks (PINNs) refer to a deep learning approach to represent the spatial and temporal characteristics of a distributed physical phenomenon, such as thermal fields, using Neural Networks (NNs). The loss function used to train PINNs relies on a term that penalises any violation of the Partial Differential Equation (PDE) that governs the distributed phenomena, in addition to a least-squares-error penalisation of any available observations in the relevant domain. PINNs have been shown to be successful in approximating the solutions to PDEs and have proven effective even in the low data regime. A critical shortcoming is the lack of a systematic treatment of the uncertainty of the approximation. State-of-the-art approaches rely on Bayesian NNs, though these are computationally heavy, both during training and at inference, nor does the associated training procedure derive from first principles. To remedy these limitations, we propose Variational Inference PINNs (VI-PINNs). Our approach derives from first principles: the uncertainty intrinsic to the distributed phenomena is explained by adopting Stochastic PDEs, while relying on standard measurement uncertainty to explain the observational uncertainty. This leads to the formulation of a posterior probability for the distributed phenomenon. Drawing parallels with Bayesian inference in finite spaces and relying on VI techniques to circumvent the otherwise intractable posterior. We derive a training objective that allows us to train two NNs, representing the mean and covariance of the approximation, respectively. The solution may be interpreted as a Bayesian belief about the true distributed phenomenon. Importantly, in the limit, the original PINN framework is recovered. We compare our approach with Bayesian PINNs (B-PINNs). Our results suggest that VI-PINNs are easier to implement, have a lower training time, and yields results that better align with reality, especially when extrapolating outside the measurement range.

Full text

Contact [email protected] www.ugent.be/ea Universiteit Gent @ugent Ghent University VALIDATION –TOY EXAMPLE For the toy example, a 1D steady state Disturbed Thermal Field (DTF) in a 1 m long, homogeneous beam is chosen, described by the SPDE and Boundary Condition (BC): π‘˜π‘‘2𝒖 𝒙 𝑑𝒙2=πœ” 𝒙 𝐡𝐢:𝒖 0 =𝒖 1 =1 With π’™βˆˆ[0.,1.], the spatial coordinates, k>0, conductivity constant, πœ” βˆΌπ’’π’«(πœ‡πœ”,πœŽπœ” 2), stochastic heat flux and π’–βˆΌπ’’π’«(πœ‡π‘’,πœŽπ‘’ 2), the stochastic DTF. Over the length of the beam are some torches placed, as seen above. Such that after normalizing k = 1 and the heat flux is described by πœ‡πœ”=6πœ‹ 2sin 6πœ‹β‹…π‘₯ and πœŽπœ” 2=4⋅𝛿(π’™βˆ’π’™β€²). Implementation VFE-PINN The mean, πœ‡π‘žβ‰ˆπœ‡π’–, is estimated with an NN an use the firs two parts of 𝐽𝑉𝐼 as governing equation. For the variance, πœŽπ‘ž 2β‰ˆπœŽπ’– 2, the following kernel is proposed, with πœŽπ‘–β€¦a NN and 𝛼 <0a trainable parameter: πœŽπ‘ž 2𝒙,𝒙′= πœŽπ‘–π’™ β‹…πœŽπ‘–π’™β€²exp 𝛼⋅ π’™βˆ’π’™β€² 2 The last tree part of 𝐽𝑉𝐼 are used as governing equation for the training of πœŽπ‘ž 2. The general structures of B-PINN using HMC (left) and VFE-PINN (right) are show below: Results Conclusion β€’VFE-PINN uses an algebraic expression for quantifying the uncertainty, and therefore faster than sample-based prediction. β€’πœŽπ‘ž 2is included into the governing equation, therefore don’t explode outside the training range. β€’Training of πœ‡π‘žand πœŽπ‘ž 2could be done in parallel. B-PINN (a) B-PINN (b) VFE-PINN Solving technique Training time * Mean Square Error Acceptance Rate (2β‹…πœŽπ‘ž) B -PINN (a) 23 min 10,93 s 7,93 e-2 100,00 % B -PINN (b) 8 min 49,34 s 1,76 e-1 100,00 % VFE -PINN 4 min 39,57 s 6,97 e-6 100,00 % *All calculations are performed on 32 CPUs (Intel(R) Core(TM) i9 -14900K) BACKGROUND Physics Informed Neural Network Partial Differential Equations (PDEs) are deterministic representations of the dynamics of a system. A PDE has the general form: π’œπ’™,𝑑 𝑒 𝒙,𝑑 =πœ•π‘‘π‘’ 𝒙,𝑑 +π’œπ’™π‘’ 𝒙,𝑑 π’™βˆˆβ„π‘›is a spatial vector, 𝑑 ∈ ℝthe time, πœ•π‘‘π‘’ π‘₯,𝑑 the time derivative of 𝑒 𝒙,𝑑 and π’œπ’™π‘’ some spatial linear operator on 𝒖. The objective is to find the function 𝑒that satisfies the PDE. In a Physics Informed Neural Network (PINN), the unknown function 𝑒is approximated by a Neural Network (NN), with the output π’–πœ½, with the parameters 𝜽. The cost function is of the form: π½π‘π‘œπ‘ π‘‘ πœƒ = 1βˆ’πœ† 1 2π’šβˆ’π’–πœ½π’™,𝑑 2+πœ† 1 2π’œπ’™,𝑑 π’–πœ½π’™,𝑑 2 π’šare measurements at π‘₯π‘š,π‘‘π‘š, πœ†is a tuning factor that determines the relative importance of each cost function. π’Ÿπ·π‘Žπ‘‘π‘Ž is the data set, and π’Ÿπ‘ƒπ»π‘Œπ‘† represent arbitrary set of space-time coordinates where the PDE is enforce to the NN. Bayesian Physics-Informed Neural Network The PINN-framework can be extended to a Bayesian–PINN (B-PINN) as a way for quantify the uncertainty of the prediction. All parameters ΞΈ (inc. NN and PDE parameters), are token stochastic, with the posterior : 𝑝 πœƒ π’Ÿπ·π‘Žπ‘‘π‘Ž,π’Ÿπ‘ƒπ»π‘Œπ‘†) βˆπ‘ π’Ÿπ·π‘Žπ‘‘π‘Ž πœƒ 𝑝 π’Ÿπ‘ƒπ»π‘Œπ‘† πœƒ Instead of minimising a cost function, the objective is now to maximise the likelihood. Since the posterior is intractable, the literature proposes to approximate it using Monte Carlo samples. Possible strategies to establish these samples are HMC, or NUTS. VARIATIONAL FREE ENERGY PHYSICS INFORMED NEURAL NETWORK A B-PINN can find a good approximation, but it does so inefficiently due to the sampling. We desire to derive a more efficient approach. Our idea is to approximate 𝑝(𝒖)using a Variational density and learn the density using Variation Inference (VI). Problem sketch Applying Bayesian inference in a finite-dimensional context is a well-understood problem. The posterior for the quantity, u, given the measurements, y, is given by Bayes’ rule: 𝑝 𝒖 π’š =𝑝 π’š,𝒖 𝑝(π’š) =𝑝 π’š 𝒖 ⋅𝑝 𝒖 𝑝 π’š We assume to have access to the measurement model 𝑝(π’š,𝒖)and prior 𝑝(𝒖). Bayes’ rule is elegant, but quite often not applicable in practice due to the unknown data distribution 𝑝(π’š). VI is a popular technique that is used to approximate the posterior. The idea is to fit a variational density π‘žthat is a member of some density family 𝒬by solving an optimisation problem. Using Kullback–Leibler (KL) divergence to determine the statistical distance between two distributions. To find q, the KL-divergence must be minimised. Assume 𝒖is a function and the solution of a Stochastic Partial Differential Equations (SPDE): π’œπ’™,𝑑 𝒖 𝒙,𝑑 =πœ•π‘‘π’– 𝒙,𝑑 +π’œπ’™π’– 𝒙,𝑑 =πœ” 𝒙,𝑑 πœ” βˆΌπ’’π’« πœ‡πœ”,πœŽπœ” 2 In the case that π’œπ’™π’–is a linear operator, it is know that π’–βˆΌπ’’π’« πœ‡π’–,πœŽπ’– 2. Once we have access to πœ‡π’–and πœŽπ’– 2, the problem is solved. The existing techniques depend on linear function decompositions of the function and shift all uncertainty to the coefficients. Rather, we would want to draw a connection with the PINN paradigm and approximating πœ‡π’–and πœŽπ’– 2. So, we approach an SPDE similar to how a PINN approaches a PDE. Variational Inference for Stochastic Partial Differential Equations Consider the static SPDE, with some linear operator π’œπ’™and the stochastic force term πœ”: π’œπ’™π’– 𝒙 =πœ” 𝒙 After derivations, the approximated VFE is described by: 𝐽𝑉𝐼 πœ‡π‘ž,πœŽπ‘ž 2β‰ˆ1 2Δ𝒙2෍ π’Ÿπ‘ƒπ»π‘Œπ‘† 2π’œπ’™πœ‡π‘žπ‘‡πœŽπœ” βˆ’2 𝒙,π’™β€²π’œπ’™β€²πœ‡π‘ž+1 2෍ π’Ÿπ·π΄π‘‡π΄ πœŽπ’š βˆ’2 π’šβˆ’β„¬π’™πœ‡π‘ž2 +1 2Ξ”π‘₯2෍ π’Ÿπ‘ƒπ»π‘Œπ‘† 2πœŽπœ” βˆ’2 𝒙,π’™β€²π’œπ’™πœŽπ‘ž 2𝒙,π’™β€²π’œπ’™β€²π‘‡+1 2෍ π’Ÿπ·π΄π‘‡π΄ πœŽπ’š βˆ’2β„¬π’™πœŽπ‘ž 2π’™π’Ž,π’™π’Žβ„¬π’™π‘‡+1 2log det Ξ£π‘žπ‘ž π‘†π‘Žπ‘šπ‘π‘™π‘’ 683 woorden A new approach to uncertainty quantification of PINNs DEPARTMENT OF ELECTROMECHANICAL, SYSTEMS AND METAL ENGINEERING Ir. Robbie Slos –Prof. Dr. Ir. Tom Lefebvre –Prof. Dr. Ir. Jolan Wauters –Prof. Dr. Ir. Guillaume Crevecoeur ෍ 𝒙,𝑑 βˆˆπ’Ÿπ‘ƒπ»π‘Œπ‘† ෍ π’™π‘š,π‘‘π‘š,π’š βˆˆπ’Ÿπ·π‘Žπ‘‘π‘Ž π‘žβˆ—π’– =argmin π‘žβˆˆπ’¬ 𝐾𝐿[π‘ž(𝒖)| 𝑝 𝒖 =argmin π‘žβˆˆπ’¬ π”Όπ‘ž 𝒖 log π‘ž 𝒖 𝑝 π’š 𝒖 𝐽𝑉𝐼