GithubHelp home page GithubHelp logo

density_uncertainty_layers's Introduction

Density Uncertainty Layers

This repository contains the PyTorch implementation for the paper "Density Uncertainty Layers for Reliable Uncertainty Estimation" published in AISTATS 2024.

Requirements

The code is implemented using PyTorch 1.12.1.

To install the required packages (other than PyTorch)

pip install -r requirements.txt

Running Experiments

To train Rank1 Density Uncertainty Layers WRN28 on CIFAR-10/100,

python run_cifar.py --dataset={cifar10/cifar100} --model=rank1_density_wrn28

To train other models, simply replace the model argument with one of

density_wrn28, bayesian_wrn28, mcdropout_wrn28, vdropout_wrn28, rank1_wrn28

For UCI benchmarks,

python run_uci.py --model={density_mlp/bayesian_mlp/mcdropout_mlp/vdropout_mlp/rank1_mlp}

Citation

@inproceedings{park2024,
  title={Density Uncertainty Layers for Reliable Uncertainty Estimation},
  author={Park, Yookoon and Blei, David},
  booktitle={AISTATS},
  year={2024}
}

density_uncertainty_layers's People

Contributors

yookoon avatar

Stargazers

Xinzhe Luo avatar  avatar

Watchers

 avatar

density_uncertainty_layers's Issues

Computation of Predictive Uncertainty in Regression Setting

@yookoon Thank you for the interesting work and the code repository. We are trying to support your proposed method in our UQ-Library for Deep Learning called Lightning-UQ-Box and have a couple of questions regarding the regression framework.

To take the Regression case based on the UCI datasets for example, the MLP module has a logvar parameter that is a single value for the entire model. During the training and test phase the loss is computed with this homoscedastic logvar parameter here. Additionally, for sampling methods like BNNs or your proposed Density framework, N samples are taken in this loop, however, you only compute the average over the model mean predictions, and the sampling of the weights has no effect on the predictive uncertainty you are computing, since it is just a single learned parameter for the entire model. This seems counterintuitive as the point of BNNs is to model epistemic uncertainty which should influence the overall predictive uncertainty that I get from the model.

In Figure 1 of your paper, you show results on a Toy Regression dataset with input dependent uncertainty, however, the repository does not contain the code to generate this figure as far as I can tell. In your paper you state that based on equations 7-9 "Consequently, predictive uncertainty will be high for test inputs that are improbable in the training density and low for those that are more probable, providing intuitive and reliable predictive uncertainty." However, I fail to see how that can be the case, when you are using a single logvar parameter as your predictive uncertainty. I was therefore wondering whether you could help me out in understanding the utilized notion of predictive uncertainty in the regression case. Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.