SOTAVerified

Nearest Neighbor Guidance for Out-of-Distribution Detection

2023-09-26Code Available1· sign in to hype

Jaewoo Park, Yoon Gyo Jung, Andrew Beng Jin Teoh

Code Available — Be the first to reproduce this paper.

Reproduce

Code

Abstract

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 https://github.com/roomo7time/nnguide.

Tasks

Benchmark Results

DatasetModelMetricClaimedVerifiedStatus
ImageNet-1k vs Curated OODs (avg.)NNGuide (ResNet50 w/ ReAct)FPR9519.72Unverified
ImageNet-1k vs Curated OODs (avg.)NNGuide (RegNet)FPR9517.97Unverified
ImageNet-1K vs ImageNet-ONNGuide-ViM (ViT-B/16)FPR9533.1Unverified
ImageNet-1k vs iNaturalistNNGuide (RegNet)AUROC99.57Unverified
ImageNet-1k vs iNaturalistNNGuide (ResNet50 w/ ReAct)AUROC97.7Unverified
ImageNet-1k vs OpenImage-ONNGuide (RegNet)AUROC97.73Unverified
ImageNet-1k vs OpenImage-ONNGuide (ResNet50 w/ ReAct)AUROC92.49Unverified
ImageNet-1k vs PlacesNNGuide (RegNet)FPR9531.47Unverified
ImageNet-1k vs SUNNNGuide (RegNet)FPR9521.58Unverified
ImageNet-1k vs TexturesNNGuide (RegNet)AUROC95.82Unverified
ImageNet-1k vs TexturesNNGuide (ResNet50 w/ ReAct)AUROC96.11Unverified

Reproductions