Skip to main content

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}
}

Metadata

Release files for maxwent 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maxwent 0.3.0
File Size Uploaded Provenance Actions
maxwent-0.3.0.tar.gz 18.0 kB Without provenance Details for maxwent-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maxwent 0.3.0
File Interpreter ABI Platform Actions
maxwent-0.3.0-py3-none-any.whl Python 3 none any Details for maxwent-0.3.0-py3-none-any.whl

Total release size: 37.1 kB

Release files / maxwent-0.3.0.tar.gz

Download URL maxwent-0.3.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
96ae0223c69cc661c2706ea105706437af3a4c6996094f2edeb6e17d9571a232
BLAKE2b-256 checksum
How to use checksums
2d438fb319f73ccfbf5bdd5e9d33b9f8b8162e528c8ca09c41df5702f2655918
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / maxwent-0.3.0-py3-none-any.whl

Download URL maxwent-0.3.0-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91988530d1ec0cef31a16ea721cdde20dc57b7f568f0265a5b3346da486b1165
BLAKE2b-256 checksum
How to use checksums
999072df1b653e2b63bae43ad0d9bae91d24dd704d17012d21aa22814c55aa41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Security for maxwent 0.3.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page