SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.00685 · NeurIPS · 2021

Excess Capacity and Backdoor Poisoning

Naren Manoj, Avrim Blum

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 3 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2109.00685.json · badge: /api/ran/2109.00685.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
MadryLab/backdoor_data_poisoning canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
config_to_namedtuple Ran
ran on a synthesized input
MadryLab/backdoor_data_poisoning/utilities.py
code served (permissive licence) · get_code("8819c051481276db")
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 GenericDict. 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.

from collections import namedtuple

# Test case 1: Simple dict with scalar values
simple_dict = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 10
}

# Test case 2: Nested dict
nested_dict = {
    'model': {
        'hidden_size': 128,
        'num_layers': 2,
        'dropout': 0.5
    },
    'training': {
        'optimizer': 'adam',
        'loss': 'mse'
    },
    'value': 42
}

# Test case 3: Dict with list values
dict_with_list = {
    'layers': [64, 128, 256],
    'activations': ['relu', 'tanh', 'sigmoid'],
    'name': 'network'
}

# Test case 4: Complex nested structure
complex_dict = {
    'model': {
        'encoder': {
            'hidden_dim': 256,
            'num_heads': 8
        },
        'decoder': {
            'hidden_dim': 512,
            'layers': [128, 256, 512]
        }
    },
    'training': {
        'lr': 1e-4,
        'warmup_steps': 1000
    }
}

# Test case 5: List as top-level input
list_input = [
    {'a': 1, 'b': 2},
    {'c': 3, 'd': 4},
    [1, 2, 3]
]

# Test case 6: Scalar value (not dict or list)
scalar_input = 42

# Test case 7: Empty dict
empty_dict = {}

# Test case 8: Dict with None values
dict_with_none = {
    'value1': None,
    'value2': 123,
    'nested': {
        'inner': None,
        'data': [1, 2, None]
    }
}

ARGS = {
    'obj': nested_dict
}
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 GenericDict — a GenericDict 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
get_config Ran
ran on a synthesized input
MadryLab/backdoor_data_poisoning/utilities.py
code served (permissive licence) · get_code("dbc32498ce12142e")
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 dict. 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
import os
import tempfile
import shutil

# Create a temporary directory for our test files
test_dir = tempfile.mkdtemp()
original_cwd = os.getcwd()
os.chdir(test_dir)

try:
    # Create base config file
    base_config = {
        "model": {
            "hidden_size": 128,
            "num_layers": 2,
            "dropout": 0.1
        },
        "training": {
            "learning_rate": 0.001,
            "batch_size": 32,
            "epochs": 10
        }
    }
    
    config_path = os.path.join(test_dir, 'config.json')
    with open(config_path, 'w') as f:
        json.dump(base_config, f)
    
    # Create job_parameters.json file
    param_config = {
        "model": {
            "hidden_size": 256,
            "dropout": 0.2
        },
        "training": {
            "learning_rate": 0.0005
        }
    }
    
    param_path = os.path.join(test_dir, 'job_parameters.json')
    with open(param_path, 'w') as f:
        json.dump(param_config, f)
    
    ARGS = {
        "config_path": config_path
    }

finally:
    os.chdir(original_cwd)
    # Note: test_dir will be cleaned up after execution
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
poison Ran
ran on a synthesized input
MadryLab/backdoor_data_poisoning/dataset_input.py
code served (permissive licence) · get_code("f668dfcd1116a4f8")
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 3, dtype family float, shape (8, 6, 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

# Case 1: 3D array with 'pixel' method
x_3d = np.random.rand(8, 6, 3).astype(np.float32)
method_pixel = 'pixel'
pos_pixel = [2, 3]
col_rgb = [255, 128, 64]

# Case 2: 4D array with 'pattern' method
x_4d = np.random.rand(2, 8, 6, 3).astype(np.float32)
method_pattern = 'pattern'
pos_pattern = [3, 3]
col_pattern = [100, 150, 200]

# Case 3: 3D array with 'ell' method
x_3d_ell = np.random.rand(8, 6, 3).astype(np.float32)
method_ell = 'ell'
pos_ell = [2, 2]
col_ell = [50, 75, 100]

# Use the first case as the primary ARGS
ARGS = {
    'x': x_3d,
    'method': method_pixel,
    'pos': pos_pixel,
    'col': col_rgb,
}
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 3, dtype family float, shape (8, 6, 3) — shape (8, 6, 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 3 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.

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 backdoor data poisoning attack is an adversarial attack wherein the attacker injects several watermarked, mislabeled training examples into a training set. The watermark does not impact the test-time performance of the model on typical data; however, the model reliably errs on watermarked examples. To gain a better foundational understanding of backdoor data poisoning attacks, we present a formal theoretical framework within which one can discuss backdoor data poisoning attacks for classification problems. We then use this to analyze important statistical and computational issues surrounding these attacks. On the statistical front, we identify a parameter we call the memorization capacity that captures the intrinsic vulnerability of a learning problem to a backdoor attack. This allows us to argue about the robustness of several natural learning problems to backdoor attacks. Our results favoring the attacker involve presenting explicit constructions of backdoor attacks, and our robustness results show that some natural problem settings cannot yield successful backdoor attacks. From a computational standpoint, we show that under certain assumptions, adversarial training can detect the presence of backdoors in a training set. We then show that under similar assumptions, two closely related problems we call backdoor filtering and robust generalization are nearly equivalent. This implies that it is both asymptotically necessary and sufficient to design algorithms that can identify watermarked examples in the training set in order to obtain a learning algorithm that both generalizes well to unseen data and is robust to backdoors.

For agents

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

get_harvested_code_for_paper("2109.00685")
get_code_for_paper("2109.00685")
have("2109.00685")

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

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

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

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

Connect an agent — have() is free.