NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Galerkin meets Laplace: Fast uncertainty estimation in neural PDEs

Christian Jimenez Beltran, Antonio Vergari, Aretha L Teckentrup, Konstantinos C. ZygalakisAI4DiffEqtnsInSci @ ICLR 2024

TL;DR

This paper introduces DEEPGALA, a novel Bayesian approach to Deep Galerkin Methods (DGMs) for solving partial differential equations (PDEs) with neural networks. By reinterpreting DGMs through a Bayesian lens and employing Laplace approximation, DEEPGALA provides fast and meaningful uncertainty estimates, crucial for reliable predictions, especially in out-of-domain or low-data scenarios.

What Problem Does This Paper Address?

Solving Partial Differential Equations (PDEs) is fundamental across many scientific and engineering disciplines. While deep neural networks have emerged as powerful tools for approximating PDE solutions, particularly in high-dimensional or parametric settings (like Deep Galerkin Methods - DGMs), they often suffer from a critical flaw: overconfidence. These neural network models can produce highly accurate predictions but fail to quantify their own uncertainty. This lack of uncertainty estimation is problematic when these models are used for critical tasks like forecasting, risk assessment, or in situations where data is scarce or the model is applied outside its training distribution (out-of-domain). This paper aims to bridge this gap by providing a method to imbue DGMs with reliable uncertainty quantification.

Methods

The core contribution of this paper is the development of DEEPGALA, which extends the Deep Galerkin Method (DGM) with Bayesian uncertainty quantification.

  1. Bayesian Re-interpretation of DGM: The authors first reframe the DGM's loss function as a negative log-likelihood term, assuming Gaussian noise around the "fictitious data" generated by the PDE's residual and boundary conditions. This allows them to define a posterior distribution over the neural network's weights.
  2. Laplace Approximation (LA): To make this Bayesian approach computationally tractable, they employ the Laplace approximation. This method approximates the intractable posterior distribution with a Gaussian distribution centered at the Maximum A Posteriori (MAP) estimate of the weights. The MAP estimate is found by training the neural network using a standard DGM loss with an added L2 regularizer (weight decay).
  3. Efficient Hessian Computation: A key challenge in LA is computing the Hessian of the negative log-posterior. The paper proposes an efficient approximation strategy by:
  4. Focusing uncertainty quantification on the weights of the last layer of the neural network.
  5. Subsampling the training data.
  6. Using either the full Hessian or, more efficiently, its diagonal approximation.

Datasets

The paper does not introduce new datasets. Instead, it uses two standard PDEs for evaluation:

  • PDE1: A heat equation with an external heat source, which has an analytic solution, allowing for direct comparison of accuracy and uncertainty.
  • PDE2: Burgers' equation, for which the authors use results from prior work (Raissi et al., 2019) as a baseline.

The "datasets" for training are generated by sampling collocation points from specific distributions related to the PDEs' domains, initial conditions, and boundary conditions, as is standard practice for DGMs.

Key Insights and Ideas

  • Bridging the Gap: The paper successfully connects the deterministic DGM framework with Bayesian uncertainty quantification, a significant step for neural PDE solvers.
  • Meaningful Uncertainty: DEEPGALA demonstrates the ability to provide meaningful uncertainty estimates, particularly in out-of-domain scenarios, where traditional DGMs fail. The uncertainty bands widen appropriately when the model is likely to be incorrect.
  • Efficiency is Key: The Laplace approximation, especially with the proposed diagonal Hessian approximation, offers a computationally efficient way to achieve uncertainty quantification, making it practical for real-world applications.
  • Out-of-Domain Detection: The method shows promise in identifying when the model is "aware" of its own limitations by increasing uncertainty in regions where it's extrapolating or encountering unseen data patterns.

Key Results

  • Qualitative Improvement: Figures 1-4 visually demonstrate that DEEPGALA provides well-calibrated uncertainty estimates (represented by shaded regions) that capture the true solution, especially for out-of-sample points. In contrast, baselines like Monte Carlo Dropout (MCD) and Deep Ensembles struggle to provide accurate approximations or meaningful uncertainty.
  • Out-of-Sample Performance: DEEPGALA shows a marked improvement in uncertainty estimation for out-of-sample inputs compared to MCD and Deep Ensembles, which often fail to capture the correct solution or provide reliable uncertainty.
  • Training Size Effect: Increasing the training data size generally leads to reduced uncertainty and improved accuracy, as expected, and DEEPGALA effectively reflects this.
  • Computational Efficiency: The paper highlights the speed of the Laplace approximation, with fitting and calling the Hessian taking mere fractions of a second for the tested PDEs.

Limitations and Future Work

  • Assumptions: The Laplace approximation relies on the assumption of a unimodal posterior distribution, which may not always hold for complex neural networks.
  • Last Layer Focus: While focusing on the last layer's weights for uncertainty is efficient, it might not capture all sources of epistemic uncertainty.
  • Complex PDEs: The current evaluation is on relatively simple PDEs. Future work should explore DEEPGALA's performance on more complex, high-dimensional, or non-linear PDEs.
  • Comparison to Other Bayesian Methods: The authors plan to compare DEEPGALA with other Bayesian PDE solvers, particularly those for non-parametric PDEs.
  • Active Learning: The authors suggest using DEEPGALA's uncertainty estimates in an active learning loop to intelligently select the most informative collocation points for future training, thereby improving accuracy more efficiently.
  • Full vs. Diagonal Hessian: Further understanding is needed on how using a full Hessian versus a diagonal approximation impacts the uncertainty estimates.

Summary updated

BibTeX
@inproceedings{beltran2024galerkin,
  author = {Christian Jimenez Beltran and Antonio Vergari and Aretha L Teckentrup and Konstantinos C. Zygalakis},
  title = {{Galerkin meets Laplace: Fast uncertainty estimation in neural PDEs}},
  booktitle = {AI4DiffEqtnsInSci @ ICLR},
  year = {2024},
  url = {https://openreview.net/forum?id=HdzFecgdzB},
}
Figure