Skip to main content

PyTorch uncertainty quantification toolkit with deep ensembles, Bayes-by-Backprop VI, Laplace, SGLD, MC Dropout, Gaussian Processes, and scientific ML backbones.

Project description

Deep-UQ is a PyTorch toolkit for uncertainty-aware machine learning.

It provides 20+ uncertainty quantification methods, Gaussian-process models, scientific machine learning backbones, and evaluation metrics — all behind a unified predict_uq() API returning calibrated uncertainty estimates.

Install

pip install uqdeepnn

Quick Example

from deepuq.models import MLP
from deepuq.methods import LaplaceWrapper

model = MLP(input_dim=1, hidden_dims=[64, 64], output_dim=1)
# ... train as usual ...

la = LaplaceWrapper(model, likelihood="regression", hessian_structure="kron")
la.fit(train_loader)
result = la.predict_uq(x_test)
# result.mean, result.epistemic_var, result.total_var

UQ Methods

  • Post-hoc (no retraining): MC Dropout, Laplace, SWAG, Temperature Scaling, Test-Time Augmentation
  • Single forward pass: SNGP, Evidential Deep Learning
  • Ensembles: Deep Ensembles, Batch Ensemble, Packed Ensemble
  • Bayesian: Variational Inference (BBB, Flipout, Last-Layer), SVGD
  • MCMC: SGLD, SGHMC, Cyclical SGMCMC
  • Gaussian Processes: Exact, Sparse, Multi-task, Deep Kernel, Multi-Fidelity
  • Conformal: Split, CQR, Weighted, Adaptive
  • Calibration: Temperature Scaling, Vector Scaling, Isotonic Regression
  • Decision: Selective Prediction with AURC evaluation

Modules

  • deepuq.methods — All UQ method wrappers
  • deepuq.models — Neural architectures (MLP, FNO, DeepONet, GNO, PINN, CNN, UNet, GPs)
  • deepuq.metrics — ECE, CRPS, AUROC, PICP, Brier score, interval score, AURC
  • deepuq.active — Active learning (Uncertainty Sampling, BALD)
  • deepuq.constraints — Physics constraints (positivity, bounds, conservation, monotonicity)
  • deepuq.propagation — Uncertainty propagation for autoregressive rollouts

Scientific ML Backbones

DeepONet, FNO (2D/3D), Graph Neural Operators, CNN/ResNet/U-Net surrogates, PINNs, Diffusion models — all with first-class UQ support.

Documentation

Package names

  • PyPI package: uqdeepnn
  • Python import: deepuq

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uqdeepnn-0.2.0.tar.gz (118.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uqdeepnn-0.2.0-py3-none-any.whl (120.3 kB view details)

Uploaded Python 3

File details

Details for the file uqdeepnn-0.2.0.tar.gz.

File metadata

  • Download URL: uqdeepnn-0.2.0.tar.gz
  • Upload date:
  • Size: 118.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for uqdeepnn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 94e352189b812141073d6fd8955fb58921563b10caf7c7d599173a6ea3b5a37a
MD5 20c728a97445757618f6ac237805a31a
BLAKE2b-256 bad2b67084154d9913556a298728be373989282da10576b85b0c36b3d9be83c1

See more details on using hashes here.

File details

Details for the file uqdeepnn-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: uqdeepnn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 120.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for uqdeepnn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 974dd9e86fa63c5ddca4dac8ffc8f621ba04211ca74990aad53dea1fc276a42d
MD5 2838a7c19235facb12a51a8d545803f1
BLAKE2b-256 25989d299053df2272f9f75532cdd0544f915e7b0a03fdbb3ad7cab31865ad57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page