SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1908.00686 · 2019

Demon in the Variant: Statistical Analysis of DNNs for Robust Backdoor Contamination Detection

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/1908.00686.json · badge: /api/ran/1908.00686.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
TDteach/backdoor canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
Hbeta Ran
ran, honoured the contract we drafted
TDteach/backdoor/tsne.py
code served (permissive licence) · get_code("77fb404ad78a22d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small distance matrix as the D parameter
# This should be a 1D array of distances
D = np.array([0.0, 0.5, 1.0, 1.5, 2.0])

# Create the beta parameter
beta = 1.0

# Construct the ARGS dictionary with all parameters
ARGS = {
    'D': D,
    'beta': beta
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_base_model Ran
ran; our contract draft was wrong, not the code
TDteach/backdoor/pysrc/train_cifar10.py
code served (permissive licence) · get_code("874d05e9545938a1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Functional. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

ARGS = {
    'x': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_base_model Ran
ran; our contract draft was wrong, not the code
TDteach/backdoor/pysrc/train_gtsrb.py
code served (permissive licence) · get_code("e15bd05849cc4332")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Functional. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

ARGS = {
    'x': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_model Ran
ran; our contract draft was wrong, not the code
TDteach/backdoor/pysrc/train_gtsrb.py
code served (permissive licence) · get_code("45579f864dad8357")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Functional. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

# Set seed for reproducibility
tf.random.set_seed(0)

# Define ARGS dict with all parameters for build_model
ARGS = {
    'mode': 'normal'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Functional — a Functional output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Functional output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
options_to_json Ran
ran; our contract draft was wrong, not the code
TDteach/backdoor/pysrc/utils.py
code served (permissive licence) · get_code("5117993745c7bae0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

class Options:
    def __init__(self):
        self.learning_rate = 0.001
        self.batch_size = 32
        self.epochs = 10
        self.model_name = "test_model"
        self.seed = 42
        self.verbose = True

options = Options()

ARGS = {
    'options': options
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pca Ran
ran; our contract draft was wrong, not the code
TDteach/backdoor/tsne.py
code served (permissive licence) · get_code("f60cb3cead55f81b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (5, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

np.random.seed(0)

# Create a small test dataset: 5 samples, 10 features
X = np.random.randn(5, 10).astype(np.float32)

# Set no_dims to reduce to 3 dimensions
no_dims = 3

ARGS = {
    'X': X,
    'no_dims': no_dims
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 3) — shape (5, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
x2p Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TDteach/backdoor/tsne.py
code served (permissive licence) · get_code("654e67f1bec03fc8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (5, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function x2p expects:
# - X: a 2D numpy array of shape (n, d) containing n data points in d dimensions
# - tol: a float tolerance value
# - perplexity: a float perplexity value

# Create a small dataset: 5 points in 3 dimensions
np.random.seed(0)
X = np.random.randn(5, 3).astype(np.float64)

ARGS = {
    'X': X,
    'tol': 1e-5,
    'perplexity': 30.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 5) — shape (5, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_record Not yet run
unverified (harvested, no recorded run)
TDteach/backdoor/pysrc/train_cifar10.py
code served (permissive licence) · get_code("4e8aeb9bb95b5b61")
How it ran

no invocation recorded.

split_model Not yet run
unverified (harvested, no recorded run)
TDteach/backdoor/pysrc/train_cifar10.py
code served (permissive licence) · get_code("a756332b6091f3b8")
How it ran

no invocation recorded.

split_model Not yet run
unverified (harvested, no recorded run)
TDteach/backdoor/pysrc/train_gtsrb.py
code served (permissive licence) · get_code("69b6b3cbe737eaf2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 9 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
Hbeta 3 other papers
1 dated earlier, 2 later
1606.02185 (2016-06)
Towards a Neural Statistician
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
2510.07746 (2025-10)
t-SNE Exaggerates Clusters, Provably
pca 2 other papers
1 dated earlier, 1 later
1606.02185 (2016-06)
Towards a Neural Statistician
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
x2p 2 other papers
1 dated earlier, 1 later
1606.02185 (2016-06)
Towards a Neural Statistician
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
build_base_model 1 other paper
1 later
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
build_base_model 1 other paper
1 later
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
build_model 1 other paper
1 later
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
options_to_json 1 other paper
1 later
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
parse_record 1 other paper
1 later
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense
split_model 1 other paper
1 later
2310.00542 (2023-10)
Watch Out! Simple Horizontal Class Backdoor Can Trivially Evade Defense

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-22.

Repositories linked to this paper

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

Abstract

A security threat to deep neural networks (DNN) is backdoor contamination, in which an adversary poisons the training data of a target model to inject a Trojan so that images carrying a specific trigger will always be classified into a specific label. Prior research on this problem assumes the dominance of the trigger in an image's representation, which causes any image with the trigger to be recognized as a member in the target class. Such a trigger also exhibits unique features in the representation space and can therefore be easily separated from legitimate images. Our research, however, shows that simple target contamination can cause the representation of an attack image to be less distinguishable from that of legitimate ones, thereby evading existing defenses against the backdoor infection. In our research, we show that such a contamination attack actually subtly changes the representation distribution for the target class, which can be captured by a statistic analysis. More specifically, we leverage an EM algorithm to decompose an image into its identity part (e.g., person, traffic sign) and variation part within a class (e.g., lighting, poses). Then we analyze the distribution in each class, identifying those more likely to be characterized by a mixture model resulted from adding attack samples to the legitimate image pool. Our research shows that this new technique effectively detects data contamination attacks, including the new one we propose, and is also robust against the evasion attempts made by a knowledgeable adversary.

For agents

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

get_harvested_code_for_paper("1908.00686")
get_code_for_paper("1908.00686")
have("1908.00686")

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

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

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

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

Connect an agent — have() is free.