How Useful are Gradients for OOD Detection Really?
About
One critical challenge in deploying highly performant machine learning models in real-life applications is out of distribution (OOD) detection. Given a predictive model which is accurate on in distribution (ID) data, an OOD detection system will further equip the model with the option to defer prediction when the input is novel and the model has little confidence in prediction. There has been some recent interest in utilizing the gradient information in pre-trained models for OOD detection. While these methods have shown competitive performance, there are misconceptions about the true mechanism underlying them, which conflate their performance with the necessity of gradients. In this work, we provide an in-depth analysis and comparison of gradient based methods and elucidate the key components that warrant their OOD detection performance. We further propose a general, non-gradient based method of OOD detection which improves over previous baselines in both performance and computational efficiency.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Out-of-Distribution Detection | SUN OOD with ImageNet-1k In-distribution (test) | FPR@9546.73 | 159 | |
| Out-of-Distribution Detection | ImageNet OOD Average 1k (test) | FPR@9547.4 | 137 | |
| Out-of-Distribution Detection | CIFAR-10 vs SVHN (test) | AUROC0.9241 | 101 | |
| Out-of-Distribution Detection | Places with ImageNet-1k OOD In-distribution (test) | FPR9550.62 | 99 | |
| Out-of-Distribution Detection | CIFAR-100 SVHN in-distribution out-of-distribution (test) | AUROC85.47 | 90 | |
| Out-of-Distribution Detection | ImageNet-1k ID iNaturalist OOD | FPR9554.11 | 87 | |
| Out-of-Distribution Detection | CIFAR-10 in-distribution LSUN out-of-distribution (test) | AUROC89.84 | 73 | |
| Out-of-Distribution Detection | CIFAR-100 (in-distribution) / LSUN (out-of-distribution) (test) | AUROC85.55 | 67 | |
| Out-of-Distribution Detection | ImageNet-1k vs Textures (test) | FPR9538.12 | 65 | |
| Out-of-Distribution Detection | SVHN CIFAR-10 in-distribution out-of-distribution (test) | AUROC89.64 | 56 |