Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Nearest Neighbor Guidance for Out-of-Distribution Detection

About

Detecting out-of-distribution (OOD) samples are crucial for machine learning models deployed in open-world environments. Classifier-based scores are a standard approach for OOD detection due to their fine-grained detection capability. However, these scores often suffer from overconfidence issues, misclassifying OOD samples distant from the in-distribution region. To address this challenge, we propose a method called Nearest Neighbor Guidance (NNGuide) that guides the classifier-based score to respect the boundary geometry of the data manifold. NNGuide reduces the overconfidence of OOD samples while preserving the fine-grained capability of the classifier-based score. We conduct extensive experiments on ImageNet OOD detection benchmarks under diverse settings, including a scenario where the ID data undergoes natural distribution shift. Our results demonstrate that NNGuide provides a significant performance improvement on the base detection scores, achieving state-of-the-art results on both AUROC, FPR95, and AUPR metrics. The code is given at \url{https://github.com/roomo7time/nnguide}.

Jaewoo Park, Yoon Gyo Jung, Andrew Beng Jin Teoh• 2023

Related benchmarks

TaskDatasetResultRank
Out-of-Distribution DetectioniNaturalist
FPR@951.8
200
Out-of-Distribution DetectionImageNet OOD Average 1k (test)
FPR@9516.53
137
Out-of-Distribution DetectionPlaces
FPR9538.88
110
Out-of-Distribution DetectionTexture
AUROC91.52
109
Out-of-Distribution DetectionOpenImage-O
AUROC97.7
107
Out-of-Distribution DetectionAverage (iNaturalist, SUN, Places, Textures)
FPR@9526.86
74
Out-of-Distribution DetectionSUN
FPR@9531.62
71
Out-of-Distribution DetectionNINCO
AUROC0.937
59
Out-of-Distribution DetectionCIFAR100 (test)
AUROC86.39
57
Out-of-Distribution DetectionSSB hard
AUROC (%)84.7
51
Showing 10 of 39 rows

Other info

Code

Follow for update