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 the most comprehensive uncertainty quantification toolkit for deep learning in PyTorch — 20+ UQ methods, scientific ML architectures, evaluation metrics, active learning, and physics constraints, all behind a unified predict_uq() API.
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
20+ UQ Methods
Bayesian & Ensemble: Deep Ensembles, Batch Ensemble, Packed Ensemble, SWAG, MultiSWAG, Variational Inference (BBB, Last-Layer), SVGD
Post-hoc & Single-pass: Laplace (6 Hessian structures + GLM predictive), SNGP, Evidential DL, MC Dropout, Test-Time Augmentation, Temperature/Isotonic Calibration
MCMC: SGLD, SGHMC, Cyclical SGMCMC
Gaussian Processes: Exact, Sparse, Multi-Fidelity, Deep Kernel, Multi-task, Heteroscedastic, Spectral Mixture, Classification
Distribution-free: Conformal (split, CQR, weighted, adaptive), Selective Prediction
Full Toolkit
deepuq.methods— All 20+ UQ method wrappersdeepuq.models— Neural architectures (MLP, FNO, DeepONet, GNO, PINN, CNN, UNet, GPs)deepuq.metrics— ECE, CRPS, AUROC, PICP, Brier, interval score, AURCdeepuq.active— Active learning (Uncertainty Sampling, BALD, loop orchestration)deepuq.constraints— Physics constraints (positivity, bounds, conservation, monotonicity)deepuq.propagation— Uncertainty propagation for autoregressive rollouts
Scientific ML Backbones
DeepONet (1D/2D), FNO (2D/3D), Graph Neural Operators, CNN/ResNet/U-Net surrogates, PINNs, Diffusion models — all with first-class UQ support.
50+ Tutorials
Every method has a self-contained executable notebook with mathematical explanations, training, prediction, and visualization.
Key Features
- Zero external UQ dependencies — everything in pure PyTorch
- Unified API — every method returns
UQResult(mean, epistemic_var, aleatoric_var, total_var) - Any architecture — works with any
nn.Module - Evaluation built-in — calibration, scoring rules, OOD detection metrics
- Production-ready — selective prediction, post-hoc calibration, single-pass methods
Documentation
- Docs: https://vispikarkaria.github.io/Deep-UQ/
- Tutorials: https://vispikarkaria.github.io/Deep-UQ/tutorials/
- API: https://vispikarkaria.github.io/Deep-UQ/api/
- GitHub: https://github.com/Vispikarkaria/Deep-UQ
Package Names
- PyPI:
uqdeepnn - Import:
deepuq
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uqdeepnn-0.2.1.tar.gz.
File metadata
- Download URL: uqdeepnn-0.2.1.tar.gz
- Upload date:
- Size: 119.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5275db1ed194b122b3e459fee674b602d03b6335358e55a6070240113825dd2d
|
|
| MD5 |
777a213d038a7651cccc42c6b9193ed2
|
|
| BLAKE2b-256 |
038fbfbba6b4051208e69f2561ff105de4f4544cc5782e52bf6d36c05415b043
|
File details
Details for the file uqdeepnn-0.2.1-py3-none-any.whl.
File metadata
- Download URL: uqdeepnn-0.2.1-py3-none-any.whl
- Upload date:
- Size: 120.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
989e7c8e60013ef4135a0ffb71932c046c20911a2b216c5ced09335dc8944fb1
|
|
| MD5 |
712e1dc9b3e3425fed0074ef1195bbb1
|
|
| BLAKE2b-256 |
90f2f5d423735f39c4361368b878996534237b5b14a46defa18bdddf808d4fda
|