---
title: Bayesian Physics-Informed Neural Networks
url: https://www.emergentmind.com/topics/bayesian-physics-informed-neural-network-b-pinn
type: topic
---

# Bayesian Physics-Informed Neural Networks

Bayesian Physics-Informed Neural Networks (B-PINNs) are probabilistic extensions of Physics-Informed Neural Networks in which neural-network parameters, and in many inverse formulations physical parameters as well, are treated as random variables inferred from observational data together with PDE residuals, boundary conditions, and initial conditions. Rather than returning a single deterministic surrogate, a B-PINN defines a posterior over admissible solution functions and thereby supports uncertainty quantification in forward simulation, inverse identification, and data assimilation for systems governed by differential equations or related forward operators [2308.07352][2212.11911].

## 1. Definition, scope, and relation to deterministic PINNs

A standard PINN approximates an unknown field with a neural network and embeds governing equations in the training objective as soft constraints. A B-PINN retains that structure but replaces point estimation of the network parameters by Bayesian inference. In the most common formulation, priors are assigned to the weights and biases, the likelihood contains both observational misfit and physics residual terms, and the output is a posterior distribution over functions rather than a single best-fit solution [2308.07352].

Several works make explicit that deterministic PINN training can be interpreted as a Maximum A Posteriori estimate inside a broader Bayesian model. In this view, the familiar weighted sum of data misfit, PDE residual, and regularization terms is the negative log-posterior under chosen priors and likelihoods; the B-PINN keeps the full posterior instead of collapsing it to a single optimizer [2502.13827][2512.02495].

The Bayesian formulation has also been used to infer hyperparameters that control relative weighting between equation and boundary contributions, and to rank architectures by evidence under a Laplace approximation. This suggests that B-PINNs are not only uncertainty-aware surrogates but also a framework for model comparison and loss balancing [2308.13222].

## 2. Probabilistic and physics-informed formulation

The generic B-PINN construction combines a neural surrogate with a probabilistic model of data and physics. A representative posterior has the form
$$
p(\theta,\lambda \mid \mathcal{D}) \propto p(\mathcal{D}_u \mid \theta,\lambda)\, p(\mathcal{D}_f \mid \theta,\lambda)\, p(\mathcal{D}_b \mid \theta,\lambda)\, p(\theta)\, p(\lambda),
$$
where $\theta$ denotes network parameters, $\lambda$ denotes physical parameters when they are unknown, $\mathcal{D}_u$ denotes observational data, $\mathcal{D}_f$ physics residual data, and $\mathcal{D}_b$ boundary or initial-condition data [2212.11911][2303.07392].

A concrete example is the B-PINN for engineered nanoparticle mobility in a contaminated aquifer. There, the aqueous concentration $c(x,t)$ and retained concentration $s(x,t)$ are approximated by two fully connected feed-forward neural networks, and the governing physics is a coupled advection-dispersion-retention system [2308.07352]:
$$
\theta \frac{\partial c}{\partial t} + \frac{\partial s}{\partial t}
=
- \frac{\partial}{\partial x}(v c)
+ \frac{\partial}{\partial x}
\left(
\left(D_e + \alpha_L v \right)\frac{\partial c}{\partial x}
\right),
$$
$$
\frac{\partial s}{\partial t} = k_a c - k_d s.
$$
The same study imposes a Dirichlet inlet condition, a Neumann outlet condition, and zero initial concentrations. Physics enters the objective through residuals of both the mass-balance equation and the attachment-detachment kinetics, while data terms can be added for breakthrough curves and retention profiles [2308.07352].

In that representative implementation, the two networks each use 6 hidden layers, 50 neurons per hidden layer, and sigmoid activation. Physics is enforced at 15,000 interior collocation points generated by Latin Hypercube Sampling, with 3,000 additional collocation points on boundaries and the initial line. This is not a universal architecture for B-PINNs, but it illustrates the standard design pattern: continuous neural surrogates, automatic differentiation for residual evaluation, and probabilistic coupling of data and governing equations [2308.07352].

## 3. Inference mechanisms and uncertainty quantification

Exact posterior inference is generally intractable because B-PINNs are high-dimensional nonlinear latent-variable models. As a result, the literature uses several approximate or sampling-based schemes.

| Inference strategy | Representative paper | Characteristic use |
|---|---|---|
| Variational inference | [2308.07352] | Diagonal Gaussian posterior over network weights and, in inverse mode, physical parameters |
| SVGD | [2212.11911] | Particle-based posterior approximation for inertia and damping identification |
| HMC | [2602.01176] | Gradient-based posterior sampling in multi-fidelity Bayesian PINNs |
| EKI | [2303.07392] | Ensemble Kalman inversion for efficient high-dimensional inverse inference |
| Laplace approximation | [2308.13222] | Gaussian posterior around MAP and evidence-based model selection |

The uncertainty most commonly reported by B-PINNs is predictive uncertainty induced by posterior variation in the network parameters. A standard decomposition writes the predictive variance as
$$
\mathrm{Var}[u]
=
\underbrace{\mathbb{E}_{\Theta}[\sigma_d^2]}_{\text{Aleatoric}}
+
\underbrace{\mathrm{Var}_{\Theta}[\mathbb{E}[u \mid \Theta]]}_{\text{Epistemic}},
$$
where $\sigma_d^2$ encodes observation noise and $\Theta$ denotes the random network parameters [2602.01176].

Later work makes that decomposition explicit at the architectural level. A heteroscedastic B-PINN for insulation ageing outputs both a predictive mean and an input-dependent variance, so epistemic uncertainty is estimated from Monte Carlo variation over posterior weight samples while aleatoric uncertainty is estimated by averaging predicted variances across those samples [2601.03673]. A different line of work augments B-PINNs with residual-based error bounds, producing an error-aware uncertainty term that inflates predictive variance when the residual implies poor compliance with the differential equation, especially outside the trained region or under undertraining [2212.06965].

## 4. Forward simulation and inverse identification

One of the defining features of B-PINNs is that the same formalism supports both forward and inverse problems. In forward mode, physical parameters are fixed and the posterior is sought over network parameters. In inverse mode, unknown coefficients are appended to the random parameter vector and inferred jointly with the network [2308.07352].

The groundwater nanoparticle study provides a clear example. In the forward problem, the B-PINN predicts breakthrough curves and retention profiles while quantifying uncertainty, and the forward model is validated against COMSOL Multiphysics with a minimal RMSE of \(1.6 \times 10^{-5}\) [2308.07352]. In the inverse problem, synthetic data generated with
$$
k_a^{\text{true}} = 0.0008\ \text{s}^{-1}, \qquad
k_d^{\text{true}} = 0.0001\ \text{s}^{-1}
$$
and additive Gaussian noise are used to infer the attachment and detachment coefficients. The reported approximate posteriors are
$$
k_a \sim \mathcal{N}\big(0.00076,\ 6.142 \times 10^{-6}\big), \qquad
k_d \sim \mathcal{N}\big(0.00012,\ 6.122 \times 10^{-6}\big),
$$
showing recovery close to the synthetic ground truth with nonzero posterior uncertainty [2308.07352].

A structurally similar use appears in power-system identification, where a B-PINN estimates inertia \(m\) and damping \(d\) in the swing equation of a single-machine infinite-bus system. There the physical parameters are explicit Bayesian variables in the physics residual rather than ordinary network weights, and the resulting posterior standard deviations provide a confidence measure that correlates with estimation error [2212.11911].

The inverse-problem literature also formalizes supervised and unsupervised B-PINN training when the forward model is a linear operator \(H\). In that setting, the deterministic PINN objective is derived as MAP estimation from a Bayesian model with data likelihood, physics likelihood, and priors on both the unknown field and the network parameters. This connects B-PINNs directly to classical regularization and Bayesian inverse theory [2502.13827].

## 5. Representative application domains

B-PINNs have been deployed across a wide range of physical systems. In subsurface transport, they have been used to model the mobility of engineered nanoparticles in a contaminated aquifer, coupling advection-dispersion-retention physics with uncertainty-aware parameter inference for groundwater remediation scenarios [2308.07352].

In fire-front modeling, a Bayesian PINN has been applied to the level-set equation for wildfires. That work combines PDE residuals, a forecast likelihood that improves temporal continuity under abrupt changes in wind direction, and an observation likelihood that assimilates fire-front measurements, yielding uncertainty-aware predictions on real-world wildfire data [2212.00970].

In prognostics, a B-PINN based on a heat diffusion PDE has been used to estimate transformer oil temperature and propagate that estimate to insulation ageing and loss-of-life. A later heteroscedastic extension jointly models epistemic and aleatoric uncertainty and reports improved predictive accuracy and calibration relative to deterministic PINNs and dropout-based baselines [2509.15933][2601.03673].

In noisy MIMO vehicle systems, the Damper-B-PINN introduces a neuron forward process inspired by mechanical dampers, combines it with Bayesian dropout, and embeds wheel-load physics in the loss to estimate dynamic wheel load across ten datasets and fourteen vehicle types [2502.20772]. In large or multi-scale PDEs, domain decomposition has been combined with local B-PINNs to form \$PINN, where global uncertainty is assembled from local Bayesian solutions coupled through flux continuity across subdomain interfaces [2504.19013]. The framework has also been adapted to multivariate time series with unknown governing equations by first extracting PDEs from historical data and then enforcing the learned relations in PINNs, B-PINNs, and Bayesian linear regression [2503.20144].

## 6. Limitations, misconceptions, and current directions

A common misconception is that “Bayesian” automatically implies calibrated uncertainty. Multiple studies explicitly caution against that interpretation. Simple Gaussian variational approximations may under-represent complex posterior structure [2308.07352]. Posterior variance can be deceptively small in regions with large error, especially far from labeled points, so variance alone is not always a sufficient criterion for trust or pseudo-labeling [2507.01714]. In error-aware formulations, posterior variance from the B-PINN alone can fail to cover the discrepancy between the surrogate and the true solution, motivating residual-based correction terms [2212.06965].

A second misconception is that B-PINN refers to a single inference algorithm. In practice, the literature spans variational inference, SVGD, HMC, Laplace approximation, dropout-based approximations, and ensemble Kalman inversion. These methods do not produce identical posteriors, and some are only approximate Bayesian procedures. EKI-based B-PINNs, for example, are explicitly presented as efficient approximate Bayesian inference tools rather than exact posterior samplers [2303.07392].

Computational cost remains a persistent issue. HMC-based B-PINNs can be accurate but are expensive for large neural parameter spaces, which is one reason alternative schemes such as EKI, Laplace methods, dropout variants, and epinet-based uncertainty surrogates have been proposed [2503.19333]. Current scaling directions therefore include multi-fidelity architectures that combine sparse high-fidelity data with abundant low-fidelity simulations, domain decomposition strategies that compute local uncertainty concurrently, and heteroscedastic formulations that separate epistemic and aleatoric effects rather than conflating them in a single predictive band [2602.01176][2504.19013][2601.03673].

In that sense, B-PINNs are best understood not as a fixed model class but as a research program in probabilistic scientific machine learning: encode governing equations in the learning objective, endow the surrogate with a posterior rather than a point estimate, and use that posterior for prediction, inversion, model comparison, and decision support under sparse or noisy data.

Source: https://www.emergentmind.com/topics/bayesian-physics-informed-neural-network-b-pinn