Saandeep Aathreya,
Shaun Canavan
University of South Florida, USA.
-
A new density-based OOD detection technique called FlowCon is proposed. We introduce a new loss function
$L_{con}$ which contrastively learns class separability in the probability distribution space. This learning occurs without any external OOD dataset and it operates on fixed classifiers. -
The proposed method is evaluated on various metrics - FPR95, AUROC, AUPR-Success, and AUPR-Error and compared against state of the art. We observe that FlowCon is competitive or outperforms most methods under different OOD conditions. Additionally, FlowCon is stable even for a large number of classes and shows improvement for high-dimensional features
-
Histogram plots are detailed along with unified manifold approximations (UMAP) embeddings of the trained FlowCon model to respectively showcase it’s OOD detection and class-preserving capabilities. We also show FlowCon’s discriminative capabilities.
- All config files are present under path
./configs/experiments
- We have 4 config files
cifar10_3.yaml -> CIFAR10 with ResNet18
cifar10_5.yaml -> CIFAR10 with WideResNet
cifar100_6.yaml -> CIFAR100 with ResNet18
cifar100_4.yaml -> CIFAR100 with WideResNet
- The original ResNet18 and WideResNet classifiers are taken from Heatmap paper
Training Resnet
and WideResNet
FlowCon model for CIFAR10. Follow similar commands for other configs
CUDA_VISIBLE_DEVICES=0 python ./trainer/train_flow.py --config cifar10_3 #Resnet
CUDA_VISIBLE_DEVICES=0 python ./trainer/train_flow.py --config cifar10_5 #WRN
CUDA_VISIBLE_DEVICES=0 python ./trainer/train_flow.py --config cifar100_6
CUDA_VISIBLE_DEVICES=0 python ./trainer/train_flow.py --config cifar100_4
- Inference follows similar arguments
CUDA_VISIBLE_DEVICES=0 python ./tester/emperical_params.py --config cifar10_5
CUDA_VISIBLE_DEVICES=0 python ./tester/emperical_params.py --config cifar100_4
-
The
$k$ distributions will be saved under./data/distributions
directory -
The results will be saved under
./data/results
directory
All the pretrained classifiers, and pretrained FlowCon models can be found in link