SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.12510 · 2019

Detecting Out-of-Distribution Examples with In-distribution Examples and Gram Matrices

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 3 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/1912.12510.json · badge: /api/ran/1912.12510.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
VectorInstitute/gram-ood-detection canonical (classifier label)
classifier basis: classifier_2025
0 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
5 ran · 0 no recorded run
FunctionStatusWhere it lives
G_p Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joelsimonoff/gram-adversary-detection
pointer only; the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("17dd7052b2035130")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

cpu Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joelsimonoff/gram-adversary-detection
pointer only; the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("48a9e0f0fbcaf665")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

normalize_l2 Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joelsimonoff/gram-adversary-detection
pointer only; the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("b16e920816efe253")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

tensor_clamp Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joelsimonoff/gram-adversary-detection
pointer only; the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("5b640b32a444ae38")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

tensor_clamp_l2 Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joelsimonoff/gram-adversary-detection
pointer only; the stored copy get_code serves, from joelsimonoff/gram-adversary-detection, is pointer only (licence: NONE) · get_code("63b4423b18c974ad")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

compute_metric Not yet run
unverified (harvested, no recorded run)
VectorInstitute/gram-ood-detection/calculate_log.py
pointer only (licence: NONE) · get_code("160824dee7076cd5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, VectorInstitute/gram-ood-detection 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_curve Not yet run
unverified (harvested, no recorded run)
VectorInstitute/gram-ood-detection/calculate_log.py
pointer only (licence: NONE) · get_code("749638f4131be5e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, VectorInstitute/gram-ood-detection 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.

metric Not yet run
unverified (harvested, no recorded run)
VectorInstitute/gram-ood-detection/calculate_log.py
pointer only (licence: NONE) · get_code("511013ffe412491c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, VectorInstitute/gram-ood-detection 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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 3 later) and 0 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
tensor_clamp 4 other papers
4 dated earlier
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1906.12340 (2019-06)
Using Self-Supervised Learning Can Improve Model Robustness and Uncertainty
and 1 more not named here
normalize_l2 3 other papers
3 dated earlier
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1906.12340 (2019-06)
Using Self-Supervised Learning Can Improve Model Robustness and Uncertainty
tensor_clamp_l2 3 other papers
3 dated earlier
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1901.09960 (2019-01)
Using Pre-Training Can Improve Model Robustness and Uncertainty
1906.12340 (2019-06)
Using Self-Supervised Learning Can Improve Model Robustness and Uncertainty
metric 2 other papers
2 later
2105.14399 (2021-05)
Enhanced Isotropy Maximization Loss: Seamless and High-Performance Out-of-Distribution Detection Simply Replacing the SoftMax Loss
2106.00948 (2021-06)
Unsupervised Out-of-Domain Detection via Pre-trained Transformers
G_p 1 other paper
1 dated earlier
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
compute_metric 1 other paper
1 later
2106.00948 (2021-06)
Unsupervised Out-of-Domain Detection via Pre-trained Transformers
cpu 1 other paper
1 dated earlier
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
get_curve 1 other paper
1 later
2106.00948 (2021-06)
Unsupervised Out-of-Domain Detection via Pre-trained Transformers

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

When presented with Out-of-Distribution (OOD) examples, deep neural networks yield confident, incorrect predictions. Detecting OOD examples is challenging, and the potential risks are high. In this paper, we propose to detect OOD examples by identifying inconsistencies between activity patterns and class predicted. We find that characterizing activity patterns by Gram matrices and identifying anomalies in gram matrix values can yield high OOD detection rates. We identify anomalies in the gram matrices by simply comparing each value with its respective range observed over the training data. Unlike many approaches, this can be used with any pre-trained softmax classifier and does not require access to OOD data for fine-tuning hyperparameters, nor does it require OOD access for inferring parameters. The method is applicable across a variety of architectures and vision datasets and, for the important and surprisingly hard task of detecting far-from-distribution out-of-distribution examples, it generally performs better than or equal to state-of-the-art OOD detection methods (including those that do assume access to OOD examples).

For agents

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

get_harvested_code_for_paper("1912.12510")
get_code_for_paper("1912.12510")
have("1912.12510")

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

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

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

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

Connect an agent — have() is free.