Papers › When and How Does In-Distribution Label Help Out-of-Distribution Detection?

When and How Does In-Distribution Label Help Out-of-Distribution Detection?

28 May 2024arXiv:2405.18635archive 2025-07-28

Xuefeng Du, Yiyou Sun, Yixuan Li

Detecting data points deviating from the training distribution is pivotal for ensuring reliable machine learning. Extensive research has been dedicated to the challenge, spanning classical anomaly detection techniques to contemporary out-of-distribution (OOD) detection approaches. While OOD detection commonly relies on supervised learning from a labeled in-distribution (ID) dataset, anomaly detection may treat the entire ID data as a single class and disregard ID labels. This fundamental distinction raises a significant question that has yet to be rigorously explored: when and how does ID label help OOD detection? This paper bridges this gap by offering a formal understanding to theoretically delineate the impact of ID labels on OOD detection. We employ a graph-theoretic approach, rigorously analyzing the separability of ID data from OOD data in a closed-form manner. Key to our approach is the characterization of data representations through spectral decomposition on the graph. Leveraging these representations, we establish a provable error bound that compares the OOD detection performance with and without ID labels, unveiling conditions for achieving enhanced OOD detection. Lastly, we present empirical results on both simulated and real datasets, validating theoretical guarantees and reinforcing our insights. Code is publicly available at https://github.com/deeplearning-wisc/id_label.

PaperPDFCodeCode Syntology ran

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="2405.18635")

Code

Syntology Ran 11 of 12 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 7 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

deeplearning-wisc/id_label officialmentioned in papermentioned on GitHubpytorch report

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

12 samples harvested; 11 ran; 1 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
7ran
1unverified

Licence: 12 of the 12 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 deeplearning-wisc/id_label. “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.

D deeplearning-wisc/id_label/models/spectral.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · cb279c9dbdcb97c0 · report
D deeplearning-wisc/id_label/models/spectral_old.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · cd6d57e7c8432808 · report
accuracy deeplearning-wisc/id_label/linear_probe.py official repository ran no licence file found · pointer only · 31f45aff0c4290a2 · report
fpr_and_fdr_at_recall deeplearning-wisc/id_label/metric_utils.py official repository ran no licence file found · pointer only · 1134ab62338793e2 · report
get_measures deeplearning-wisc/id_label/metric_utils.py official repository ran no licence file found · pointer only · 9b1abfca5a67be06 · report
get_model deeplearning-wisc/id_label/models/builder.py official repository ran no licence file found · pointer only · 32af8c00b3d09da4 · report
load_ood_dataset deeplearning-wisc/id_label/make_dataset.py official repository ran no licence file found · pointer only · 55f4568be6fd0df0 · report
normalized_thresh deeplearning-wisc/id_label/models/spectral.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · b645d731bc4d2de3 · report
set_optimizer deeplearning-wisc/id_label/linear_probe.py official repository ran no licence file found · pointer only · a44a1925c2c778ba · report
stable_cumsum deeplearning-wisc/id_label/metric_utils.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · d4acb3120a027622 · report
train deeplearning-wisc/id_label/linear_probe.py official repository ran no licence file found · pointer only · 1ae39c289c58b21c · report
load_CIFAR deeplearning-wisc/id_label/make_dataset.py official repository unverified no licence file found · pointer only · d778b5788d9b7914 · report

Tasks

Anomaly DetectionOut of Distribution (OOD) DetectionOut-of-Distribution Detection

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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