Out-of-Distribution Detection with Deep Nearest Neighbors
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.
Code (3)
Tasks
Out-of-Distribution DetectionSimilar Papers 제목 키워드 기반
A Local Density-Based Approach for Local Outlier Detection
This paper presents a simple but effective density-based outlier detection approach with the local kernel density estimation (KDE). A Relative Density-based Outlier Score (RDOS) is introduced to measure the local outlier…
Density EstimationObjectOutlier DetectionNearest Neighbor Based Out-of-Distribution Detection in Remote Sensing Scene Classification
Deep learning models for image classification are typically trained under the "closed-world" assumption with a predefined set of image classes. However, when the models are deployed they may be faced with input images no…
Classificationimage-classificationImage ClassificationOut-of-Distribution Detection+2Study on spike-and-wave detection in epileptic signals using t-location-scale distribution and the K-nearest neighbors classifier
Pattern classification in electroencephalography (EEG) signals is an important problem in biomedical engineering since it enables the detection of brain activity, particularly the early detection of epileptic seizures. I…
ClassificationEEGSeizure DetectionSensitivity+1k-NNN: Nearest Neighbors of Neighbors for Anomaly Detection
Anomaly detection aims at identifying images that deviate significantly from the norm. We focus on algorithms that embed the normal training examples in space and when given a test image, detect anomalies based on the fe…
Anomaly DetectionOn Out-of-Distribution Detection for Audio with Deep Nearest Neighbors
Out-of-distribution (OOD) detection is concerned with identifying data points that do not belong to the same distribution as the model's training data. For the safe deployment of predictive models in a real-world environ…
Automatic Speech RecognitionAutomatic Speech Recognition (ASR)Event DetectionOut-of-Distribution Detection+6