mlsanityData to 7 Oct 2026

Out-of-Distribution Detection with Deep Nearest Neighbors

arXiv 2204.06507 ↗First posted 13 Apr 2022cs.LG cs.CVcited by 596

Not on the map. Why?

Cited by 36 in Multimodal LLMs / vision-language models, but placed by its own abstract, which didn’t fit.

Abstract (arXiv)

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.

Key facts. Cited by 596 papers in the map (data through 7 Oct 2026). Builds on 45 of its 79 references that are in the map. First posted on arXiv 13 Apr 2022.

Builds on

45 of 79 references.

References · 45

  1. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  3. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  4. 2016Densely Connected Convolutional Networkscited by 6,691
  5. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
  6. 2016Simple and Scalable Predictive Uncertainty Estimation using Deep Ensemblescited by 3,888
  7. 2020Supervised Contrastive Learningcited by 2,803
  8. 2017Billion-scale similarity search with GPUscited by 2,477
  9. 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
  10. 2013Describing Textures in the Wildcited by 2,110
  11. 2016Identity Mappings in Deep Residual Networkscited by 1,960
  12. 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
33 more
  1. 2015LSUN: Construction of a Large-scale Image Dataset using Deep Learning with Humans in the Loopcited by 1,350
  2. 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
  3. 2020Energy-based Out-of-distribution Detectioncited by 1,296
  4. 2018Deep Anomaly Detection with Outlier Exposurecited by 939
  5. 2021Generalized Out-of-Distribution Detection: A Surveycited by 796
  6. 2014Deep Neural Networks are Easily Fooled: High Confidence Predictions for Unrecognizable Imagescited by 774
  7. 2018Predictive Uncertainty Estimation via Prior Networkscited by 555
  8. 2019Using Self-Supervised Learning Can Improve Model Robustness and Uncertaintycited by 511
  9. 2021ReAct: Out-of-distribution Detection With Rectified Activationscited by 486
  10. 2020CSI: Novelty Detection via Contrastive Learning on Distributionally Shifted Instancescited by 441
  11. 2020Generalized ODIN: Detecting Out-of-distribution Image without Learning from Out-of-distribution Datacited by 408
  12. 2022ViM: Out-Of-Distribution with Virtual-logit Matchingcited by 404
  13. 2017Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samplescited by 389
  14. 2021On the Importance of Gradients for Detecting Distributional Shifts in the Wildcited by 338
  15. 2019SelectiveNet: A Deep Neural Network with an Integrated Reject Optioncited by 333
  16. 2018Why ReLU networks yield high-confidence predictions far away from the training data and how to mitigate the problemcited by 323
  17. 2021SSD: A Unified Framework for Self-Supervised Outlier Detectioncited by 264
  18. 2021MOS: Towards Scaling Out-of-distribution Detection for Large Semantic Spacecited by 233
  19. 2014Towards Open World Recognitioncited by 226
  20. 2020Contrastive Training for Improved Out-of-Distribution Detectioncited by 186
  21. 2015TurkerGaze: Crowdsourcing Saliency with Webcam based Eye Trackingcited by 165
  22. 2020ATOM: Robustifying Out-of-distribution Detection Using Outlier Miningcited by 116
  23. 2021Semantically Coherent Out-of-Distribution Detectioncited by 107
  24. 2020Deep Nearest Neighbor Anomaly Detectioncited by 103
  25. 2021Can multi-label classification networks know what they don't know?cited by 100
  26. 2021MOOD: Multi-level Out-of-distribution Detectioncited by 94
  27. 2022Training OOD Detectors in their Natural Habitatscited by 86
  28. 2021Provable Guarantees for Understanding Out-of-distribution Detectioncited by 78
  29. 2022Unknown-Aware Object Detection: Learning What You Don't Know from Videos in the Wildcited by 70
  30. 2019Towards neural networks that provably know when they don't knowcited by 69
  31. 2018Discriminative out-of-distribution detection for semantic segmentationcited by 47
  32. 2019Statistical Analysis of Nearest Neighbor Methods for Anomaly Detectioncited by 29
  33. 2020Analysis of KNN Density Estimationcited by 28

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 21; 2023: 128; 2024: 163; 2025: 151; 2026: 133.

596 papers.

Sort:

By area:

  1. 2022OpenOOD: Benchmarking Generalized Out-of-Distribution Detectioncited by 267
  2. 2022Mitigating Neural Network Overconfidence with Logit Normalizationcited by 251
  3. 2022Delving into Out-of-Distribution Detection with Vision-Language Representationscited by 215
  4. 2022Extremely Simple Activation Shaping for Out-of-Distribution Detectioncited by 212
  5. 2022Out-of-Distribution Detection and Selective Generation for Conditional Language Modelscited by 193
  6. 2023OpenOOD v1.5: Enhanced Benchmark for Out-of-Distribution Detectioncited by 178
  7. 2023In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluationcited by 132
  8. 2023Non-Parametric Outlier Synthesiscited by 129
  9. 2022Is Out-of-Distribution Detection Learnable?cited by 109
  10. 2022POEM: Out-of-Distribution Detection with Posterior Samplingcited by 108
  11. 2023A Holistic Approach to Unifying Automatic Concept Extraction and Concept Importance Estimationcited by 108
  12. 2023LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learningcited by 107
38 more
  1. 2024ARGS: Alignment as Reward-Guided Searchcited by 99
  2. 2024Process Reward Model with Q-Value Rankingscited by 78
  3. 2023Dream the Impossible: Outlier Imagination with Diffusion Modelscited by 77
  4. 2024Negative Label Guided OOD Detection with Pretrained Vision-Language Modelscited by 66
  5. 2023Nearest Neighbor Guidance for Out-of-Distribution Detectioncited by 64
  6. 2023Feed Two Birds with One Scone: Exploiting Wild Data for Both Out-of-Distribution Generalization and Detectioncited by 57
  7. 2022Boosting Out-of-distribution Detection with Typical Featurescited by 48
  8. 2023AdaNPC: Exploring Non-Parametric Classifier for Test-Time Adaptationcited by 48
  9. 2023Fast Decision Boundary based Out-of-Distribution Detectorcited by 48
  10. 2024Learning with Mixture of Prototypes for Out-of-Distribution Detectioncited by 43
  11. 2023Out-of-distribution Detection with Implicit Outlier Transformationcited by 42
  12. 2023NECO: NEural Collapse Based Out-of-distribution detectioncited by 41
  13. 2023How Does Fine-Tuning Impact Out-of-Distribution Detection for Vision-Language Models?cited by 38
  14. 2023Diversified Outlier Exposure for Out-of-Distribution Detection via Informative Extrapolationcited by 38
  15. 2023Learning to Augment Distributions for Out-of-Distribution Detectioncited by 38
  16. 2023GL-MCM: Global and Local Maximum Concept Matching for Zero-Shot Out-of-Distribution Detectioncited by 36
  17. 2024How Does Unlabeled Data Provably Help Out-of-Distribution Detection?cited by 36
  18. 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Surveycited by 36
  19. 2025Failure Prediction at Runtime for Generative Robot Policiescited by 36
  20. 2023LINe: Out-of-Distribution Detection by Leveraging Important Neuronscited by 34
  21. 2024Outlier detection by ensembling uncertainty with negative objectnesscited by 34
  22. 2022OpenCon: Open-world Contrastive Learningcited by 33
  23. 2022SAFE: Sensitivity-Aware Features for Out-of-Distribution Object Detectioncited by 33
  24. 2023Continuous Learning for Android Malware Detectioncited by 33
  25. 2023Detecting Out-of-Distribution Through the Lens of Neural Collapsecited by 33
  26. 2023A Survey on Out-of-Distribution Detection in NLPcited by 31
  27. 2023Out-of-distribution Detection Learning with Unreliable Out-of-distribution Sourcescited by 31
  28. 2024Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detectioncited by 30
  29. 2025Mahalanobis++: Improving OOD Detection via Feature Normalizationcited by 30
  30. 2023Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain Detectioncited by 29
  31. 2024GalLoP: Learning Global and Local Prompts for Vision-Language Modelscited by 29
  32. 2023Neuron Activation Coverage: Rethinking Out-of-distribution Detection and Generalizationcited by 28
  33. 2024MultiOOD: Scaling Out-of-Distribution Detection for Multiple Modalitiescited by 28
  34. 2024On Effects of Steering Latent Representation for Large Language Model Unlearningcited by 27
  35. 2023Unlocking Feature Visualization for Deeper Networks with MAgnitude Constrained Optimizationcited by 26
  36. 2023DiffGuard: Semantic Mismatch-Guided Out-of-Distribution Detection using Pre-trained Diffusion Modelscited by 25
  37. 2023Understanding the Feature Norm for Out-of-Distribution Detectioncited by 25
  38. 2023Improving Selective Visual Question Answering by Learning from Your Peerscited by 24

50 most cited of 596 All 596 (JSON)