Lune

ICML2022Top-tier venue

Out-of-Distribution Detection with Deep Nearest Neighbors

Yiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan Li

Abstract

Out-of-distribution (OOD) detection is a critical task for deploying machine learning models in the open world. Distance-based methods have demonstrated promise, where testing samples are detected as OOD if they are relatively far away from in-distribution (ID) data. However, prior methods impose a strong distributional assumption of the underlying feature space, which may not always hold. In this paper, we explore the efficacy of non-parametric nearest-neighbor distance for OOD detection, which has been largely overlooked in the literature. Unlike prior works, our method does not impose any distributional assumption, hence providing stronger flexibility and generality. We demonstrate the effectiveness of nearest-neighbor-based OOD detection on several benchmarks and establish superior performance. Under the same model trained on ImageNet-1k, our method substantially reduces the false positive rate (FPR@TPR95) by 24.77% compared to a strong baseline SSD+, which uses a parametric approach Mahalanobis distance in detection. Code is available: https://github.com/ deeplearning-wisc/knn-ood .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

241 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation cites Delving into Out-of-Distribution Detection with Vision-Language Representations
  • In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation cites Energy-based Out-of-distribution Detection
  • In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation cites ReAct: Out-of-distribution Detection With Rectified Activations
  • LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning cites Delving into Out-of-Distribution Detection with Vision-Language Representations
  • LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning cites Energy-based Out-of-distribution Detection
  • LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Mitigating Neural Network Overconfidence with Logit Normalization cites Energy-based Out-of-distribution Detection
  • Mitigating Neural Network Overconfidence with Logit Normalization cites A Simple Framework for Contrastive Learning of Visual Representations
  • Mitigating Neural Network Overconfidence with Logit Normalization cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Energy-based Out-of-distribution Detection
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites ReAct: Out-of-distribution Detection With Rectified Activations
  • Delving into Out-of-Distribution Detection with Vision-Language Representations cites Is Out-of-Distribution Detection Learnable?
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
  • ReAct: Out-of-distribution Detection With Rectified Activations cites Energy-based Out-of-distribution Detection
  • Supervised Contrastive Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • Is Out-of-Distribution Detection Learnable? cites Energy-based Out-of-distribution Detection
  • Is Out-of-Distribution Detection Learnable? cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Is Out-of-Distribution Detection Learnable? cites ReAct: Out-of-distribution Detection With Rectified Activations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers241

  1. Mitigating Neural Network Overconfidence with Logit NormalizationHongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng et al.ICML 2022 · 386 citations
  2. Delving into Out-of-Distribution Detection with Vision-Language RepresentationsYifei Ming, Ziyang Cai, Jiuxiang Gu, Yiyou Sun et al.NeurIPS 2022 · 308 citations
  3. Is Out-of-Distribution Detection Learnable?Zhen Fang, Yixuan Li, Jie Lu, Jiahua Dong et al.NeurIPS 2022 · 188 citations
  4. LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt LearningAtsuyuki Miyai, Qing Yu, Go Irie, Kiyoharu AizawaNeurIPS 2023 · 174 citations
  5. In or Out? Fixing ImageNet Out-of-Distribution Detection EvaluationJulian Bitterwolf, Maximilian Müller, Matthias HeinICML 2023 · 154 citations

Builds on21

  1. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
  4. Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
  5. ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations

Related papers

  1. Non-parametric Outlier SynthesisLeitian Tao, Xuefeng Du, Jerry Zhu, Yixuan LiICLR 2023 · 6 citations
  2. Nearest Neighbor Guidance for Out-of-Distribution DetectionJaewoo Park, Yoon Gyo Jung, Andrew Beng Jin TeohICCV 2023 · 74 citations
  3. How to Overcome Curse-of-Dimensionality for Out-of-Distribution Detection?Soumya Suvra Ghosal, Yiyou Sun, Yixuan LiAAAI 2024 · 26 citations
  4. Simple and Effective Out-of-Distribution Detection via Cosine-based Softmax LossSoonCheol Noh, DongEon Jeong, Jee-Hyong LeeICCV 2023 · 6 citations
  5. SSD: A Unified Framework for Self-Supervised Outlier DetectionVikash Sehwag, Mung Chiang, Prateek MittalICLR 2021 · 410 citations
Dusk over the sea between two cliffs drawn in fine vertical lines