Home

Awesome

Exploring the Limits of Out-of-Distribution Detection

In this repository we're collecting replications for the key experiments in the Exploring the Limits of Out-of-Distribution Detection paper by Stanislav Fort, Jie Ren, Balaji Lakshminarayanan that was published at NeurIPS 2021, arXiv link.

The use of a large, pretrained and finetuned Vision Transformer for near-OOD detection on the CIFAR-100 vs CIFAR-10 task is demonstrated in this Colab. We showcase the use of the Standard Mahalanobis distance, the Relative Mahalanobis distance (presented in this paper), and the baseline Maximum of Softmax Probabilities. The results you should expect from running the Colab in full (in around 20 minutes on a free GPU instance) are shown in bellow. Prior to this paper, they would put you on top of the task leaderboard.

Colab: https://github.com/stanislavfort/exploring_the_limits_of_OOD_detection/blob/main/ViT_for_strong_near_OOD_detection.ipynb

Maximum over Softmax ProbsStandard Mahalanobis distanceRelative Mahalanobis distance
<img src="ViT_MSP.png" ALIGN="center" height="100%" width="100%"><img src="ViT_Maha.png" ALIGN="center" height="100%" width="100%"><img src="ViT_ratio.png" ALIGN="center" height="100%" width="100%">