This repository presents the experiments of the paper:
Evaluating Robustness of Predictive Uncertainty Estimation: Are Dirichlet-based Models Reliable ?
Anna-Kathrin Kopetzki*, Bertrand Charpentier*, Daniel Zügner, Sandhya Giri, Stephan Günnemann
International Conference on Machine Learning (ICML), 2021.
[Paper]
To install requirements:
conda env create -f environment.yaml
conda activate dbu-robustness
conda env list
python src/setup.py develop
python setup.py develop
Not that our code is based on the following papers and repositories:
- Foolbox: Foolbox Native: Fast adversarial attacks to benchmark the robustness of machine learning models in PyTorch, TensorFlow, and JAX
- Median Smoothing: Detection as Regression: Certified Object Detection by Median Smoothing
- PostNet: Posterior Network: Uncertainty Estimation without OOD Samples via Density-Based Pseudo-Counts
MNIST and CIFAR10 are handled with torchvision. You can download preprocessed segment and sensorless-drive datasets at the follwing links:
- Segment (No sky, no window), Segment (Sky only), Segment (Window only)
- SensorlessDrive (No 9, 10, 11), SensorlessDrive (9 only), SensorlessDrive (10, 11 only)
Note that our code implements the following Dirichlet-based Uncertainty (DBU) models:
- PostNet: Posterior Network: Uncertainty Estimation without OOD Samples via Density-Based Pseudo-Counts
- PriorNet: Predictive Uncertainty Estimation via Prior Networks and Reverse KL-Divergence Training of Prior Networks: Improved Uncertainty and Adversarial Robustness
- EvNet: Evidential Deep Learning to Quantify Classification Uncertainty
- DDnet: Ensemble Distribution Distillation
To train the models in the paper, run one jupyter notebook in the folder notebooks/models-training
. Further, you can find pre-trained models with standard training at this link which could be placed in the folder notebooks/saved_models
. This include segment, sensorless-drive, MNIST and CIFAR10 datasets.
To evaluate the model(s) in the paper, run one jupyter notebook in the folder notebooks/models-robustness-evaluation
. In particular you can find notebooks to run label attacks and uncertainty attacks. All parameter are described.
Please cite our paper if you use the models or this code in your own work:
@incollection{dbu-robustness,
title = {Evaluating Robustness of Predictive Uncertainty Estimation: Are Dirichlet-based Models Reliable ?},
author = {Anna-Kathrin Kopetzki and Bertrand Charpentier and Daniel Zügner and Sandhya Giri and Stephan Günnemann},
booktitle = {International Conference on Machine Learning},
year = {2021}
}