Out-of-distribution Detection with Deep Nearest Neighbors
By Yiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan Li. International Conference on Machine Learning, 2022
857 citations recorded by the source corpus.
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.
Subfields: Artificial Intelligence
View Paper: https://www.semanticscholar.org/paper/8b1233107bff00355d4d1656795ec62d4f85e523
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
Citations in the corpus
- Generalized Out-of-Distribution Detection: A Survey (2021, neutral): “3: Distance-based Methods [103], [110], [173], [174], [175], [176], [177], [178], [179]”
- OpenOOD: Benchmarking Generalized Out-of-Distribution Detection (2022, methodology): “By comparing UDG [50] (the best from extra-data part) with KNN [65] (the best from extra data-free part), the advantage of UDG only lies in CIFAR-10 near-OOD, which”
- Mitigating Neural Network Overconfidence with Logit Normalization (2022, background): “Indeed, many prior works turned to define alternative OOD scoring functions (Liang et al., 2018; Lee et al., 2018; Liu et al., 2020; Sastry & Oore, 2020; Sun et al., 2021; Huang et al., 2021; Sun et al., 2022).”
- Is Out-of-Distribution Detection Learnable? (2022, methodology): “[44] Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li.”
- Do You Know What You Are Talking About? Characterizing Query-Knowledge Relevance For Reliable Retrieval Augmented Generation (2024, background): “An extension of the maximum similarity score is to estimate the similarity score between the query and its k -th nearest document embeddings (Ra-maswamy et al., 2000; Sun et al., 2022), i.e., t ( q ) = − s k where s k is the k -th largest element of { S ( E ϕ ( d ) , E ϕ ( q )) d ∈ D} .”