Home

Awesome

<h1 align="center">Out-of-distribution Detection Learning with Unreliable Out-of-distribution Sources</h1>

This repo contains the sample code of our proposed ATOL in our paper: Out-of-distribution Detection Learning with Unreliable Out-of-distribution Sources (NeurIPS 2023).

Required Packages

The following packages are required to be installed:

All of our experiments are conducted on NVIDIA Tesla A100 GPUs with Python 3.8, PyTorch 1.11, CUDA 12.0 and Torchvision 0.13.

Pretrained Models

For CIFAR-10/CIFAR-100, pretrained WRN models and data-generative models are provided in folder

./ckpt/

Datasets

Please download the datasets in folder

./../data/

CIFAR-10/100 as ID dataset

Test OOD Datasets

Fine-tuning and Testing

To train the ATOL model on CIFAR and ImageNet benckmarks, simply run:

python atol.py --dataset=cifar10 -b=256 -lr=0.005 --mean=5 --std=0.1 --ood_space_size=4 --trade_off=1
python atol.py --dataset=cifar100 -b=256 -lr=0.04 --mean=1.2 --std=0.5 --ood_space_size=4 --trade_off=5

Results

The key results on CIFAR benchmarks are listed in the following table.

MethodsCIFAR-10CIFAR-10CIFAR-100CIFAR-100
FPR95AUROCFRP95AUROC
BoundaryGAN55.6086.4676.7275.79
ConfGAN31.5793.0174.8677.67
ManifoldGAN26.6894.0973.5477.40
G2D31.8391.7470.7379.03
CMG39.8392.8379.6077.51
ATOL14.6697.0555.2287.24

Citation

If you find our work useful, please kindly cite our paper.

@inproceedings{
zheng2023atol,
title={Out-of-distribution Detection Learning with Unreliable Out-of-distribution Sources},
author={Haotian Zheng and Qizhou Wang and Zhen Fang and Xiaobo Xia and Feng Liu and Tongliang Liu and Bo Han},
booktitle={NeurIPS},
year={2023},
url={https://openreview.net/forum?id=87Qnneer8l}
}