SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.03888 · 2018

A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks

Honglak Lee, Jinwoo Shin, Kimin Lee, Kibok Lee

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 6 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1807.03888.json · badge: /api/ran/1807.03888.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
pokaxpoka/deep_Mahalanobis_detector marked official in Papers with Code
Papers with Code archive
6 ran · 3 no recorded run
kimjeyoung/Mahalanobis-BERT community
Papers with Code archive
3 ran · 0 no recorded run
lancopku/avg-avg community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
BertLinear Ran
ran; our contract draft was wrong, not the code
kimjeyoung/Mahalanobis-BERT/models/mahalanobis.py
pointer only (licence: NONE) · get_code("4868113bacf5fb6a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kimjeyoung/Mahalanobis-BERT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Classifier Ran
ran on a synthesized input · constructed an object; no result was computed
kimjeyoung/Mahalanobis-BERT/models/mahalanobis.py
pointer only (licence: NONE) · get_code("add2eea7681c9ce3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kimjeyoung/Mahalanobis-BERT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

getNonTargetDataSet Ran
ran on a synthesized input
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("7d4b9ccab3f5129d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

getSVHN Ran
ran; our contract draft was wrong, not the code
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("e126771f22bb7a57")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

getTargetDataSet Ran
ran on a synthesized input
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("f0d4069281238eb0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_Mahalanobis_score Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("ab12cb31239fb0f3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

l2_normalize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
kimjeyoung/Mahalanobis-BERT/models/mahalanobis.py
pointer only (licence: NONE) · get_code("ddaf1f8283422da4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kimjeyoung/Mahalanobis-BERT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

merge_and_generate_labels Ran
ran; our contract draft was wrong, not the code
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("75204880d1278c85")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sample_estimator Ran
ran; our contract draft was wrong, not the code
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("7947812fb91dd7ab")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

getCIFAR10 Not yet run
unverified (harvested, no recorded run)
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("41c7e1368b8aabb5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

getCIFAR100 Not yet run
unverified (harvested, no recorded run)
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("83c36cbef5f51c93")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_Mahalanobis_score Not yet run
unverified (harvested, no recorded run)
lancopku/avg-avg/lib/inference/maha.py
code served (permissive licence) · get_code("a6cc0332f174b30c")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
pokaxpoka/deep_Mahalanobis_detector/OOD_Generate_Mahalanobis.py
pointer only (licence: NONE) · get_code("e950644c44d7e448")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, pokaxpoka/deep_Mahalanobis_detector when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
sample_estimator
brick of this paper's assembly: helper
1 other paper
1 later
2010.03759 (2020-10)
Energy-based Out-of-distribution Detection

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Detecting test samples drawn sufficiently far away from the training distribution statistically or adversarially is a fundamental requirement for deploying a good classifier in many real-world machine learning applications. However, deep neural networks with the softmax classifier are known to produce highly overconfident posterior distributions even for such abnormal samples. In this paper, we propose a simple yet effective method for detecting any abnormal samples, which is applicable to any pre-trained softmax neural classifier. We obtain the class conditional Gaussian distributions with respect to (low-and upper-level) features of the deep models under Gaussian discriminant analysis, which result in a confidence score based on the Mahalanobis distance. While most prior methods have been evaluated for detecting either out-of-distribution or adversarial samples, but not both, the proposed method achieves the state-of-the-art performances for both cases in our experiments. Moreover, we found that our proposed method is more robust in harsh cases, e.g., when the training dataset has noisy labels or small number of samples. Finally, we show that the proposed method enjoys broader usage by applying it to class-incremental learning: whenever out-of-distribution samples are detected, our classification rule can incorporate new classes well without further training deep models.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1807.03888")
get_code_for_paper("1807.03888")
have("1807.03888")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1807.03888.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1807.03888.svg)](https://syntology.ai/paper/1807.03888)

Connect an agent — have() is free.