deepbayes
deepbayes is a package that aims to make training Bayesian neural networks (BNNs) simple.
Implemented on top of TensorFlow 2.0 and working with tf.keras as a primary interface, one can simply declare a keras (or TF) model and pass it to the desired deepbayes optimizer and it will compile the model into an object that is ready to perform approximate inference.
deepbayes is actively under development, and location and names of packages may change (such changes will be noted at the bottom of this repo). jax support coming soon :)
Install:
pip install deepbayes
Supported Optimizers
BayesByBackprop
Implemented based on description in https://arxiv.org/abs/1505.05424
Hamiltonian (Hybrid) Monte Carlo
Implemented based on description in https://arxiv.org/abs/1206.1901
NoisyAdam (aka Vadam)
Implemented based on description in https://arxiv.org/abs/1712.02390
Variational Online Gauss Newton (aka VOGN)
Implemented based on description in https://arxiv.org/abs/1806.04854 and https://arxiv.org/abs/2002.10060
Stochastic Weight Averaging - Gaussian (aka SWAG)
Implemented bsed on description in https://arxiv.org/pdf/1902.02476.pdf
Stochastic Gradient Descent
Not sure what to reference you to here... a google will suffice
Supported Analysis
In addition to producing posterior distributions for BNNs, deepbayes also supports some basic analysis including
- Adversarial attacks for BNNs (FGSM, PGD, CW)
- Uncertainty quantification
- Statistical guarentees of robustness - https://arxiv.org/pdf/1903.01980.pdf
- Probabalistic safety estimates - https://arxiv.org/pdf/2004.10281.pdf
Dependancies:
tensorflow, tensorflow-probability, numpy, tqdm, statsmodels,
Future Support
Below we have a tentative to-do list of inference methods to impliment (7 to be exact) and other properties we want to tool to have.
- HTML documentation
- Non-Gaussian Posterior (requires extension of posterior representation as well)
- Stochastic Variational Inference (SVI)
- Probabilistic Backprop (PBP)
- Sequential Monte Carlo optimizer (SMC)
- Monte Carlo Dropout optimizer (MCD)
- Stochastic Gradient Langevin Dynamics optimizer (SGLD)
- Stochastic Gradient Markov Chain Monte Carlo (SGMCMC)
- Riemann manifold HMC (RMHMC)
- JAX autodif library instead of TF (deepbayes.jax.optimizers)
- Binary Bayesian neural networks
Metadata
Release files for deepbayes 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| deepbayes-0.1.0.tar.gz | 36.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deepbayes-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 87.1 kB
Release files / deepbayes-0.1.0.tar.gz
| Download URL | deepbayes-0.1.0.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4de33aa41bad5420d86cb7f9aa0f584e443c0d97879657b6c29041f1731e91b
|
|
BLAKE2b-256 checksum How to use checksums |
f753c4104050aad970ba84412db722ea45e3ef5875c916b9b94698edce884201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.5
|
Release files / deepbayes-0.1.0-py3-none-any.whl
| Download URL | deepbayes-0.1.0-py3-none-any.whl |
|---|---|
| Size | 50.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c28f6efff9c8a65b3356225da4fa6a7674e61b24cc2eaa9781f7d73983a3865b
|
|
BLAKE2b-256 checksum How to use checksums |
98ecb665adb0c46218b4f31bdfe9cee515df656eff7ff04802638ddc32be5218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.5
|
Security for deepbayes 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.