Skip to main content

Quick access to uncertainty and confidence of Keras networks.

Project description

UNCERTAINTY WIZARD

Documentation Status PyPI

Best Paper Award at ICST 2021 - Testing Tool Track

Uncertainty wizard is a plugin on top of tensorflow.keras, allowing to easily and efficiently create uncertainty-aware deep neural networks:

  • Plain Keras Syntax: Use the layers and APIs you know and love.
  • Conversion from keras: Convert existing keras models into uncertainty aware models.
  • Smart Randomness: Use the same model for point predictions and sampling based inference.
  • Fast ensembles: Train and evaluate deep ensembles lazily loaded and using parallel processing.
  • Super easy setup: Pip installable. Only tensorflow as dependency.

Installation

It's as easy as pip install uncertainty-wizard

Requirements

uncertainty-wizard is tested on python 3.8 and a recent tensorflow versions. Earlier versions (python 3.6+ and tensorflow 2.3+) should mostly work as well, but may require some mild tweaks.

Note: There's currently a known issue regarding multi-gpu usage and tensorflow>=2.10. For using Multi-Device GPU config, please fall back to tensorflow==2.9.0 and stay tuned for changes in issue #75.

Documentation

Our documentation is deployed to uncertainty-wizard.readthedocs.io. In addition, as uncertainty wizard has a 100% docstring coverage on public method and classes, your IDE will be able to provide you with a good amount of docs out of the box.

You may also want to check out the technical tool paper (preprint), describing uncertainty wizard functionality and api as of version v0.1.0.

Examples

A set of small and easy examples, perfect to get started can be found in the models user guide and the quantifiers user guide. Larger and examples are also provided - and you can run them in colab right away. You can find them here: Jupyter examples.

Authors and Papers

Uncertainty wizard was developed by Michael Weiss and Paolo Tonella at USI (Lugano, Switzerland). If you use it for your research, please cite these papers:

@inproceedings{Weiss2021FailSafe,  
  title={Fail-safe execution of deep learning based systems through uncertainty monitoring},
  author={Weiss, Michael and Tonella, Paolo},
  booktitle={2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST)},
  pages={24--35},
  year={2021},
  organization={IEEE} 
}  

@inproceedings{Weiss2021UncertaintyWizard,  
  title={Uncertainty-wizard: Fast and user-friendly neural network uncertainty quantification},
  author={Weiss, Michael and Tonella, Paolo},
  booktitle={2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST)},
  pages={436--441},
  year={2021},
  organization={IEEE}
}  

The first paper (preprint) provides an empricial study comparing the approaches implemented in uncertainty wizard, and a list of lessons learned useful for reasearchers working with uncertainty wizard. The second paper (preprint) is a technical tool paper, providing a more detailed discussion of uncertainty wizards api and implementation.

References to the original work introducing the techniques implemented in uncertainty wizard are provided in the papers listed above.

Contributing

Issues and PRs are welcome! Before investing a lot of time for a PR, please open an issue first, describing your contribution. This way, we can make sure that the contribution fits well into this repository. We also mark issues which are great to start contributing as as good first issues. If you want to implement an existing issue, don't forget to comment on it s.t. everyone knows that you are working on it.

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

uncertainty-wizard-0.3.1.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

uncertainty_wizard-0.3.1-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

Details for the file uncertainty-wizard-0.3.1.tar.gz.

File metadata

  • Download URL: uncertainty-wizard-0.3.1.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for uncertainty-wizard-0.3.1.tar.gz
Algorithm Hash digest
SHA256 328f7e8bdaa5b3a3d58013a81381cce1a807a1b3b1fe8f85d8f08c69485b3806
MD5 61663abc4b7611d48f619432fa4038d1
BLAKE2b-256 fbea0a0cadc621c3730af7d6317b649d02552ab2cccf7263cac9ff652f08a93d

See more details on using hashes here.

File details

Details for the file uncertainty_wizard-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for uncertainty_wizard-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 346459241e6bfa6b66238d932bd7f0b1c1b927e96816d742bd09f9ec6c9d29a8
MD5 5a61258193f71856954255da73a3abf4
BLAKE2b-256 d8a6247366d9264715e6c8166046b17797957aa62bcf7e6c2ca9174fc5866549

See more details on using hashes here.

Supported by

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