Papers › Out-of-Distribution Detection with Deep Nearest Neighbors
Out-of-Distribution Detection with Deep Nearest Neighbors
Yiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan Li
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.
In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2204.06507")
Code
Syntology Ran 30 of 38 code samples harvested from 2 repositories linked to this paper; 8 have no recorded run. Of those that ran: 4 ran · honoured contract; 5 ran · violated contract; 6 ran · our draft was wrong; 15 ran · fixture could not drive it.
By repository: official repository: 19 samples from 1 repository, 16 ran; community (archive-listed): 19 samples from 1 repository, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
38 samples harvested; 30 ran; 4 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.
Licence: 38 of the 38 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.
Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
aafda009101cbfd4 · report
7d9344ac520f8918 · report
9b68216c4f2d895c · report
32ed88f27881480a · report
e3080865e3e46e82 · report
6c3b1825ad096dce · report
209469a90d2f8a72 · report
5560caaae9a95e1e · report
bc501b91abbe50d1 · report
3d782851b3c7d7e7 · report
861d7015808075fb · report
683101b9e3719e85 · report
0d63630115fb978b · report
0b59395cfb5cb50d · report
6126345504c875f7 · report
4f51a10a1b49685f · report
ba2203eb42a97fcf · report
4c3cef6f0f0e686b · report
b874b3a0ce06fd5f · report
d19bd686618a876f · report
44a0bd7d7960c422 · report
0b036e2cb2801ede · report
0dee8a92419cff7b · report
bc8c3813716a0475 · report
d666af0191f0d996 · report
c8f5824b7a3abec9 · report
b502b7ebecfb473e · report
bbbc398d91edfdea · report
e3776c1edecaa404 · report
d9c1685e770cd6de · report
de4f0891f2a2ecb3 · report
9970a3a581cf0c70 · report
5ac9567da183a7fb · report
86c6428acf21785c · report
c615b69c364d7bbd · report
df7da02ff75b6fbd · report
ed7b5ddceab83aeb · report
422865e3a9dbb328 · report
Tasks
Results from the paper archive 2025-07-28
Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections