Skip to main content

Maximum Weight Entropy

Project description

MaxWEnt

PyPI version Build Status Python Version

Maximum Weight Entropy

This repository offers a packaged implementation of MaxWEnt, based on the original method described in Deep Out-of-Distribution Uncertainty Quantification via Weight Entropy Maximization (JMLR)


MaxWEnt is a method designed for epistemic uncertainty quantification in deep learning. It applies the Maximum Entropy principle to stochastic neural networks. The goal of MaxWEnt is to determine the weight distribution with the highest entropy that remains consistent with the training observations. By doing so, the method enhances the epistemic uncertainty, which generally leads to improved detection of out-of-distribution samples.


Regression Example


Classification Example

Installation and Usage

This package is available on Pypi and can be installed with the following command line:

pip install maxwent

You will need either Tensorflow or Pytorch to be installed. If both packages are installed, the Tensorflow framework of maxwent will be used by default.

To change the framework, please use the set_framework function:

  • Pytorch framework
import maxwent
maxwent.set_framework("torch")
  • Tensorflow framework
import maxwent
maxwent.set_framework("tf")

Reference

If you use this repository in your research, please cite our work using the following reference:

@article{JMLR:v26:23-1359,
  author  = {Antoine de Mathelin and Fran{\c{c}}ois Deheeger and Mathilde Mougeot and Nicolas Vayatis},
  title   = {Deep Out-of-Distribution Uncertainty Quantification via Weight Entropy Maximization},
  journal = {Journal of Machine Learning Research},
  year    = {2025},
  volume  = {26},
  number  = {4},
  pages   = {1--68},
  url     = {http://jmlr.org/papers/v26/23-1359.html}
}

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

maxwent-0.3.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

maxwent-0.3.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file maxwent-0.3.0.tar.gz.

File metadata

  • Download URL: maxwent-0.3.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for maxwent-0.3.0.tar.gz
Algorithm Hash digest
SHA256 96ae0223c69cc661c2706ea105706437af3a4c6996094f2edeb6e17d9571a232
MD5 5f1d0532c193e2389eb6f71736694069
BLAKE2b-256 2d438fb319f73ccfbf5bdd5e9d33b9f8b8162e528c8ca09c41df5702f2655918

See more details on using hashes here.

File details

Details for the file maxwent-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: maxwent-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for maxwent-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91988530d1ec0cef31a16ea721cdde20dc57b7f568f0265a5b3346da486b1165
MD5 df037f30335380cef41d3cb8c7cc1a92
BLAKE2b-256 999072df1b653e2b63bae43ad0d9bae91d24dd704d17012d21aa22814c55aa41

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