Uncertainty Quantification in Scientific Machine Learning: Methods, Metrics, and Comparisons

Apostolos F. Psaros, Xuhui Meng, Zongren Zou, Ling Guo, George Em Karniadakis · DOI

Abstract: Neural networks (NNs) are currently changing the computational paradigm on how to combine data with mathematical laws in physics and engineering in a profound way, tackling challenging inverse and ill-posed problems not solvable with traditional methods. However, quantifying errors and uncertainties in NN-based inference is more complicated than in traditional methods. This is because in addition to aleatoric uncertainty associated with noisy data, there is also uncertainty due to limited data, but also due to NN hyperparameters, overparametrization, optimization and sampling errors as well as model misspecification. Although there are some recent works on uncertainty quantification (UQ) in NNs, there is no systematic investigation of suitable methods towards quantifying the total uncertainty effectively and efficiently even for function approximation, and there is even less work on solving partial differential equations and learning operator mappings between infinite-dimensional function spaces using NNs. In this work, we present a comprehensive framework that includes uncertainty modeling, new and existing solution methods, as well as evaluation metrics and post-hoc improvement approaches. To demonstrate the applicability and reliability of our framework, we present an extensive comparative study in which various methods are tested on prototype problems, including problems with mixed input-output data, and stochastic problems in high dimensions.

Introduction: The Challenge of UQ in SciML

In the fields of engineering and physics, neural networks (NNs) are increasingly utilized to solve complex differential equations. While these models are powerful, they often operate as "black boxes," providing predictions without inherent measures of reliability. For critical applications, such as predicting structural loads or fluid dynamics, understanding the margin of error is as important as the prediction itself. This research provides a comprehensive roadmap for Uncertainty Quantification (UQ) in Scientific Machine Learning (SciML), moving beyond simple point estimates to provide a rigorous framework for assessing model confidence.

Sources of Uncertainty

In SciML, uncertainty is generally categorized into two main types: aleatoric and epistemic. Aleatoric uncertainty stems from inherent randomness in the data, such as sensor noise. Epistemic uncertainty arises from a lack of knowledge about the "true" underlying model, often due to limited training data or suboptimal network architectures.

A qualitative breakdown of the various sources contributing to total uncertainty in SciML models, including data noise, model mis-specification, and optimization errors.

As illustrated above, total uncertainty is a composite of several factors, including physical model mis-specification, stochasticity in the physical model, and neural network over-parametrization. Addressing these requires a multifaceted methodological approach.

Methodological Framework

The study categorizes and evaluates several families of UQ methods applied to Physics-Informed Neural Networks (PINNs) and neural operators (DeepONets):

  • Bayesian Neural Networks (BNNs): These models treat network weights as probability distributions. The study employs Hamiltonian Monte Carlo (HMC) as the "gold standard" for accuracy, alongside more computationally efficient approximations like Variational Inference (VI) and Monte Carlo Dropout.
  • Ensemble Methods: These involve training multiple models independently (Deep Ensembles) or capturing model variations during training (Snapshot Ensembles, SWAG) to estimate predictive variance.
  • Generative and Functional Priors: A significant contribution of this work is the use of Generative Adversarial Networks (GANs) to establish functional priors. By pre-training a GAN on historical data, the model gains a "smart" prior that significantly improves accuracy when new data is scarce.

Problem Scenarios and Evaluation

The framework is rigorously tested across four primary problem scenarios that represent the spectrum of challenges in SciML:

The four problem scenarios addressed in the framework, ranging from deterministic forward problems to complex stochastic operator learning.
  1. Forward Deterministic PDEs: Solving known equations with noisy boundary data.
  2. Mixed Deterministic PDEs: Simultaneously identifying solutions and unknown physical parameters (e.g., reaction rates).
  3. Mixed Stochastic PDEs: Addressing equations where inputs are random processes.
  4. Operator Learning: Learning general mappings between infinite-dimensional function spaces.

Key Findings and Results

The comparative study revealed several critical insights into the performance and trade-offs of UQ methods:

  • Accuracy vs. Computational Cost: While HMC and Deep Ensembles provided the most precise uncertainty estimates, they required the highest computational resources. Methods like Variational Inference (MFVI) and Laplace Approximation offered a favorable balance of efficiency and reliability.
  • The Efficacy of Functional Priors: In mixed PDE tests, the HMC method combined with GAN-based functional priors (HMC+FP) achieved a calibration error (RMSCE) at least six times smaller than standard Bayesian approaches.
  • Calibration and Out-of-Distribution (OOD) Detection: The authors demonstrate that even sophisticated UQ methods require post-hoc calibration to ensure that confidence intervals accurately reflect true error rates. Furthermore, epistemic uncertainty was found to spike significantly when models encountered OOD data, providing a vital safety mechanism for real-world deployment.

Conclusion

This work establishes a systematic foundation for UQ in SciML, providing both the theoretical framework and an open-source library of methods. While challenges remain regarding scalability for high-dimensional datasets and structural model misspecification, this research enables the development of scientific AI models that are not only fast and flexible but also demonstrably reliable.

Summary updated

BibTeX
@article{psaros2022uncertainty,
  author = {Apostolos F. Psaros and Xuhui Meng and Zongren Zou and Ling Guo and George Em Karniadakis},
  title = {{Uncertainty Quantification in Scientific Machine Learning: Methods, Metrics, and Comparisons}},
  journal = {Journal of Computational Physics},
  year = {2022},
  doi = {10.1016/j.jcp.2022.111902},
}
Figure