Efficient Message Passing for Partial Differential Equation Priors

Anna Kazachkova, Leonhard Hennicke, Rainer Schlosser, Ralf HerbricharXiv 2026

TL;DR

This paper introduces a novel framework for solving Partial Differential Equations (PDEs) by treating them as probabilistic priors within a factor graph. By using a gradient-free message-passing algorithm based on moment matching, the authors achieve predictive accuracy comparable to standard Physics-Informed Neural Networks (PINNs) while providing high-quality uncertainty estimates up to 10x faster than variational inference.

What Problem Does This Paper Address?

Physics-Informed Neural Networks (PINNs) have become a staple for solving PDEs by embedding physical laws directly into the loss function of a neural network. However, standard PINNs typically provide only "point estimates"—a single best-fit solution without any sense of how certain that solution is.

To quantify uncertainty, researchers often turn to Bayesian PINNs (B-PINNs). The current gold standards for B-PINNs are Hamiltonian Monte Carlo (HMC), which is accurate but computationally grueling, and Variational Inference (VI), which is faster but often produces poor uncertainty estimates that fail to capture the true structure of the problem. This paper tackles the efficiency-accuracy trade-off, seeking a method that provides HMC-like uncertainty at a fraction of the cost.

Methods

The authors propose a probabilistic factor-graph formulation for PDEs. Instead of global gradient-descent optimization, they use message passing.

  1. Factor Graph Representation: The problem is split into two subgraphs: a data subgraph (matching observed initial conditions) and a PDE subgraph (enforcing the governing physical equations).
  2. Direct Message Approximation (DMA): Because physical constraints are often deterministic (modeled as Dirac-delta distributions), standard message passing fails. The authors use the DMA framework to propagate information by matching the moments (mean and variance) of Gaussian distributions.
  3. Custom Activation Function: To ensure the network is differentiable and compatible with Gaussian moment matching, they introduce a smooth, piecewise exponential activation function—a "smooth exponential analog of the leaky ReLU."
  4. Interleaved Schedule: The algorithm alternates between updating the weights based on data and updating them based on the PDE constraints, ensuring the posterior belief reflects both sources of information.
Figure 1: A generic factor graph for PDEs. White circle nodes refer to the hidden variables, the gray node to the observed data x, and black squares to the functions (factors). Left subgraph (blue rectangle): data subgraph, where fU(x, W ) models a neural network that is trained to match the label data - only initial condition in our case. Right subgraph (red rectangle): PDE subgraph, that enforces a PDE on a subset of collocation points C with fR.

Datasets

The approach was evaluated using the PDEBench benchmark suite, focusing on two classic spatiotemporal problems:

  • 1D Advection Equation: Tested across five different wave speeds.
  • 1D Fisher-KPP Equation: A semi-linear second-order PDE representing reaction-diffusion, tested across a 16-setting parameter grid.

Key Insights and Ideas

  • PDEs as Priors: Rather than just a penalty term in a loss function, the PDE acts as a structural prior that narrows the space of possible solutions.
  • Gradient-Free Inference: By propagating distributions directly through the graph, the model avoids the instabilities sometimes associated with global gradient-based optimization in PINNs.
  • Structured Uncertainty: The model doesn't just give a "fuzziness" value; the uncertainty grows logically. As shown in Figure 2, the variance is lowest near the known initial conditions and increases as the solution propagates further into the future.
  • HMC Fidelity at VI Speed: The most striking insight is that message passing recovers posterior marginals that are much closer to the "ground truth" HMC samples than mean-field VI, despite being significantly faster to train.
Figure 2: Comparison of the message passing approach (ours) and the baseline solution from PDEBench for the advection equation across different wave speeds, b ∈{0.1, 0.4, 1, 2, 7}. All heatmaps are plotted in the coordinates of x = (s, t), where s denotes space and t denotes time. (a) the exact solution; (b) predicted mean values of our message passing solution, which preserve the propagation pattern across the evaluated wave speeds; (c) predicted variance values of our message passing solution, showing increasing uncertainty further in time from the observed initial condition.

Key Results

  • Accuracy: The message-passing approach (Ours) achieved an RMSE of $4.89 \times 10^{-2}$ on Advection, nearly identical to the HMC reference ($4.85 \times 10^{-2}$) and far superior to the VI baseline ($19.5 \times 10^{-2}$).
  • Speed: Training was up to 10x faster than the VI baseline and significantly faster than HMC. For inference, the closed-form Gaussian solution was up to 150x faster than HMC sampling.
  • Uncertainty Quality: The Continuous Ranked Probability Score (CRPS), which measures the quality of probabilistic forecasts, was consistently close to HMC, whereas VI degraded significantly as the complexity of the PDE (e.g., wave speed) increased.
Quantitative comparison of RMSE, Coverage, and CRPS across different methods.

Limitations and Future Work

While promising, the authors acknowledge several areas for growth:

  • Model Depth: The current study uses shallow Bayesian neural networks (single hidden layer). Scaling message passing to deep architectures remains a challenge due to the complexity of propagating moments through many non-linear layers.
  • Dimensionality: The experiments were limited to 1D spatiotemporal problems. Future work is needed to test the framework on higher-dimensional PDEs.
  • Gaussian Assumption: The framework relies on Gaussian approximations for all messages. While effective here, highly non-linear or multi-modal posteriors might require more complex distributional assumptions.

Summary updated

BibTeX
@misc{kazachkova2026efficient,
  author = {Anna Kazachkova and Leonhard Hennicke and Rainer Schlosser and Ralf Herbrich},
  title = {{Efficient Message Passing for Partial Differential Equation Priors}},
  year = {2026},
  eprint = {2609.32956},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.32956},
}
Figure