Home

Awesome

Robust Out-of-distribution Detection in Neural Networks

This project is for the paper: Robust Out-of-distribution Detection in Neural Networks. Some codes are from ODIN, Outlier Exposure and deep Mahalanobis detector.

Preliminaries

It is tested under Ubuntu Linux 16.04.1 and Python 3.6 environment, and requires some packages to be installed:

Downloading in-distribution Dataset

Downloading out-of-distribution Datasets

Overview of the Code

Running Experiments

Example

For CIFAR-10 experiments, you can run the following commands on CIFAR directory to get results.

python robust_ood_train.py --name ALOE --adv --ood

python robust_ood_train.py --name AOE --adv --adv-only-in --ood

python robust_ood_train.py --name ADV --adv

python robust_ood_train.py --name OE --ood

python robust_ood_train.py --name Original

python eval.py --name ALOE --adv

python eval_ood_detection.py --name ALOE --method msp_and_odin

python eval_ood_detection.py --name ALOE --method msp_and_odin --adv

python eval_ood_detection.py --name Original --method mahalanobis

python eval_ood_detection.py --name Original --method mahalanobis --adv

Citation

Please cite our work if you use the codebase:

@article{chen2020robust,
  title={Robust Out-of-distribution Detection in Neural Networks},
  author={Chen, Jiefeng and Wu, Xi and Liang, Yingyu and Jha, Somesh and others},
  journal={arXiv preprint arXiv:2003.09711},
  year={2020}
}

License

Please refer to the LICENSE.