Skip to main content
QUICK REVIEW

[Paper Review] NeuralUQ: A comprehensive library for uncertainty quantification in neural differential equations and operators

Zongren Zou, Xuhui Meng|arXiv (Cornell University)|Aug 25, 2022
Model Reduction and Neural NetworksPhysics and Astronomy13 citations
TL;DR

NeuralUQ is an open-source Python library that provides a unified, extensible framework for uncertainty quantification (UQ) in scientific machine learning (SciML) models, including physics-informed neural networks (PINNs) and deep operator networks (DeepONets). It supports multiple modern UQ methods—such as Bayesian neural networks, Monte Carlo dropout, and Hamiltonian Monte Carlo—through a modular, user-friendly workflow, enabling reliable uncertainty estimation in dynamical systems and high-dimensional PDEs with minimal implementation overhead.

ABSTRACT

Uncertainty quantification (UQ) in machine learning is currently drawing increasing research interest, driven by the rapid deployment of deep neural networks across different fields, such as computer vision, natural language processing, and the need for reliable tools in risk-sensitive applications. Recently, various machine learning models have also been developed to tackle problems in the field of scientific computing with applications to computational science and engineering (CSE). Physics-informed neural networks and deep operator networks are two such models for solving partial differential equations and learning operator mappings, respectively. In this regard, a comprehensive study of UQ methods tailored specifically for scientific machine learning (SciML) models has been provided in [45]. Nevertheless, and despite their theoretical merit, implementations of these methods are not straightforward, especially in large-scale CSE applications, hindering their broad adoption in both research and industry settings. In this paper, we present an open-source Python library (https://github.com/Crunch-UQ4MI), termed NeuralUQ and accompanied by an educational tutorial, for employing UQ methods for SciML in a convenient and structured manner. The library, designed for both educational and research purposes, supports multiple modern UQ methods and SciML models. It is based on a succinct workflow and facilitates flexible employment and easy extensions by the users. We first present a tutorial of NeuralUQ and subsequently demonstrate its applicability and efficiency in four diverse examples, involving dynamical systems and high-dimensional parametric and time-dependent PDEs.

Motivation & Objective

  • Address the lack of accessible, well-maintained software for uncertainty quantification (UQ) in scientific machine learning (SciML) models, particularly for physics-informed neural networks (PINNs) and deep operator networks (DeepONets).
  • Provide a unified, extensible, and user-friendly software framework that simplifies the application of diverse UQ methods to SciML problems with minimal implementation complexity.
  • Enable both researchers and practitioners to efficiently apply, compare, and extend state-of-the-art UQ techniques—such as Bayesian inference, Monte Carlo dropout, and deep ensembles—within a consistent software environment.
  • Facilitate reproducible research and rapid prototyping by offering a comprehensive tutorial and modular design that supports custom surrogates, priors, and inference methods.
  • Support large-scale, real-world applications in computational science and engineering by offering efficient, scalable, and production-ready UQ implementations for both small and big data regimes.

Proposed method

  • Implement a modular software architecture that decouples surrogate models (e.g., PINNs, DeepONets), prior distributions, inference methods (e.g., HMC, MFVI, MCD), and posterior estimation components.
  • Integrate multiple uncertainty quantification techniques, including Bayesian neural networks (BNNs), Monte Carlo dropout (MCD), deep ensemble, and Hamiltonian Monte Carlo (HMC), into a single cohesive workflow.
  • Support mini-batch training for scalable UQ in large-data scenarios using stochastic optimization-compatible methods such as Langevin dynamics (LD), mean-field variational inference (MFVI), and MCD.
  • Provide a flexible interface for users to plug in custom surrogates (e.g., pre-trained generative models), prior distributions (e.g., physics-agnostic functional priors), and posterior inference strategies.
  • Design the library around a standardized, extensible API that enables easy extension and integration with existing SciML tools and frameworks.
  • Include a comprehensive educational tutorial that guides users through setting up and applying UQ methods to real-world problems, including ODEs, PDEs, and operator learning tasks.
Figure 1: Schematic overview of a SciML problem scenario. As shown in (a), SciML problems of interest include, but are not limited to, forward, inverse and mixed ODEs/PDEs, and operator learning problems. Next, in the pie chart of (b) a qualitative breakdown of total uncertainty is shown, describing
Figure 1: Schematic overview of a SciML problem scenario. As shown in (a), SciML problems of interest include, but are not limited to, forward, inverse and mixed ODEs/PDEs, and operator learning problems. Next, in the pie chart of (b) a qualitative breakdown of total uncertainty is shown, describing

Experimental results

Research questions

  • RQ1How can uncertainty quantification (UQ) be systematically and efficiently applied to neural differential equations and operator learning models in scientific machine learning?
  • RQ2What are the most effective UQ methods for different data regimes (small vs. large datasets) and problem types (forward/inverse ODEs/PDEs, parametric and time-dependent PDEs) in SciML?
  • RQ3How can a unified, modular, and extensible software library be designed to support diverse UQ techniques while maintaining usability and performance for both research and industrial applications?
  • RQ4What are the practical trade-offs between computational efficiency, accuracy, and robustness of different UQ methods—such as deep ensembles, Bayesian inference, and dropout-based methods—when applied to SciML models?
  • RQ5How can uncertainty-aware active learning be integrated into the SciML pipeline using UQ outputs for intelligent data acquisition and model refinement?

Key findings

  • NeuralUQ successfully enables the application of multiple UQ methods—including HMC, MFVI, MCD, and deep ensembles—to PINNs and DeepONets with minimal code complexity, demonstrating high usability and extensibility.
  • For small datasets (on the order of a few hundred measurements), Hamiltonian Monte Carlo (HMC) provides accurate posterior estimates with good computational efficiency, making it suitable for uncertainty-sensitive applications.
  • For large datasets, stochastic optimization-compatible methods such as Langevin dynamics (LD), mean-field variational inference (MFVI), and Monte Carlo dropout (MCD) offer scalable and efficient alternatives to HMC, supporting mini-batch training.
  • Deep ensemble methods provide computationally efficient and reliable model uncertainty estimates for both neural ODE/PDE and neural operator problems, especially when combined with data mini-batching.
  • The physics-agnostic functional prior (PA-FP) effectively quantifies uncertainties due to incomplete or missing data in neural operator learning, while deep ensembles are effective for capturing epistemic uncertainty.
  • The library enables flexible integration of custom surrogates (e.g., pre-trained physics-informed GANs) and inference methods, demonstrating its adaptability to novel and complex SciML workflows.
Figure 2: A unified view of the UQ models studied in Section 2.2 ; adopted from [ 45 ] . The model $\pazocal{M}_{1}$ can be a NN or a generator network, or nothing. The model $\pazocal{M}_{2}$ can be a PDE or an operator, such as a pre-trained DeepONet. The quantities $\phi$ , $\psi$ can be the solu
Figure 2: A unified view of the UQ models studied in Section 2.2 ; adopted from [ 45 ] . The model $\pazocal{M}_{1}$ can be a NN or a generator network, or nothing. The model $\pazocal{M}_{2}$ can be a PDE or an operator, such as a pre-trained DeepONet. The quantities $\phi$ , $\psi$ can be the solu

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.