SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.09671 · 2022

Not All Poisons are Created Equal: Robust Training against Data Poisoning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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 5 have no contract verdict; 4 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/2210.09671.json · badge: /api/ran/2210.09671.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
yuyang0901/effective-poison-identification canonical (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
FunctionStatusWhere it lives
AutoContrast Ran
ran; our contract draft was wrong, not the code
yuyang0901/effective-poison-identification/dataset/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxH1996/FedXDS, is pointer only (licence: NONE) · get_code("c6e7c3451c85404f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MaxH1996/FedXDS, and GitHub detected no licence in that repository 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.

Brightness Ran
ran; our contract draft was wrong, not the code
yuyang0901/effective-poison-identification/dataset/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxH1996/FedXDS, is pointer only (licence: NONE) · get_code("0d1a8d6ce2015fc7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MaxH1996/FedXDS, and GitHub detected no licence in that repository 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.

Color Ran
ran; our contract draft was wrong, not the code
yuyang0901/effective-poison-identification/dataset/randaugment.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxH1996/FedXDS, is pointer only (licence: NONE) · get_code("32cb3f5760fa593e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MaxH1996/FedXDS, and GitHub detected no licence in that repository 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.

accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yuyang0901/effective-poison-identification/utils/misc.py
code served (permissive licence) · get_code("18badd533b52adb3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 torch

torch.manual_seed(0)

# Create a batch of 2 samples with 5 classes
batch_size = 2
num_classes = 5

# output: model predictions (logits) - shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# target: ground truth class indices - shape (batch_size,)
target = torch.tensor([1, 3])

# topk: tuple of k values for which to compute precision@k
topk = (1, 3)

ARGS = {
    'output': output,
    'target': target,
    'topk': topk
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
get_random_subset Ran
ran on a synthesized input
yuyang0901/effective-poison-identification/utils/subset.py
code served (permissive licence) · get_code("e6f4e5ea17a7ffd9")
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 1, dtype family int, shape (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

ARGS = {
    'B': 5,
    'N': 20
}
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 1, dtype family int, shape (5,) — shape (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
get_target Ran
ran on a synthesized input
yuyang0901/effective-poison-identification/dataset/cifar.py
code served (permissive licence) · get_code("d65b4886674fe03e")
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. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-26T22:57:59Z. 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 os
import sys
import torch
import pickle
from torchvision import transforms
from PIL import Image
import tempfile

torch.manual_seed(0)

# Create a temporary directory for pickle files
temp_dir = tempfile.mkdtemp()

# Create a simple args object with required attributes
class Args:
    def __init__(self):
        self.backdoor = False
        self.poisons_path = temp_dir
        self.patch_size = 4

# Create test data for the non-backdoor case
# Create a small PIL image (5x5)
test_image = Image.new('RGB', (5, 5), color='red')
target_class = 2
patch = torch.ones(3, 4, 4)
startx, starty = 0, 0

# Save target.pickle with 4-element tuple (image, class, patch, (startx, starty))
target_tuple = (test_image, target_class, patch, (startx, starty))
with open(os.path.join(temp_dir, 'target.pickle'), 'wb') as f:
    pickle.dump(target_tuple, f)

# Also create source.pickle for backdoor case
source_images = [
    (Image.new('RGB', (5, 5), color='blue'), 1),
    (Image.new('RGB', (5, 5), color='green'), 1)
]
with open(os.path.join(temp_dir, 'source.pickle'), 'wb') as f:
    pickle.dump(source_images, f)

# Create transform_test
transform_test = transforms.Compose([
    transforms.ToTensor()
])

# Create args instance
args = Args()

ARGS = {
    'args': args,
    'transform_test': transform_test
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — 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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
resnet_picker Ran
ran on a synthesized input
yuyang0901/effective-poison-identification/models/ap_resnet.py
code served (permissive licence) · get_code("9cab94b4eba6256c")
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 ResNet. 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 torch
import torchvision
from torchvision.models.resnet import BasicBlock

torch.manual_seed(0)

ARGS = {
    "arch": "ResNet20",
    "dataset": "CIFAR10",
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
vgg11 Ran
ran on a synthesized input
yuyang0901/effective-poison-identification/models/vgg.py
code served (permissive licence) · get_code("57636423450ce2a4")
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 VGG. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_classes': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
vgg16 Ran
ran on a synthesized input
yuyang0901/effective-poison-identification/models/vgg.py
code served (permissive licence) · get_code("8c60051157c60390")
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 VGG. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_classes': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
resnet18 Not yet run
unverified (harvested, no recorded run)
yuyang0901/effective-poison-identification/models/resnet.py
code served (permissive licence) · get_code("cae978d0a6f422f9")
How it ran

no invocation recorded.

resnet34 Not yet run
unverified (harvested, no recorded run)
yuyang0901/effective-poison-identification/models/resnet.py
code served (permissive licence) · get_code("d48e87956df93e58")
How it ran

no invocation recorded.

resnet50 Not yet run
unverified (harvested, no recorded run)
yuyang0901/effective-poison-identification/models/resnet.py
code served (permissive licence) · get_code("8a16838753a239a4")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
AutoContrast 19 other papers
5 dated earlier, 14 later
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2003.10580 (2020-03)
Meta Pseudo Labels
2104.07713 (2021-04)
Contrastive Learning with Stronger Augmentations
and 16 more not named here
Brightness 19 other papers
5 dated earlier, 14 later
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2003.10580 (2020-03)
Meta Pseudo Labels
2104.07713 (2021-04)
Contrastive Learning with Stronger Augmentations
and 16 more not named here
accuracy 19 other papers
6 dated earlier, 13 later
1805.08318 (2018-05)
Self-Attention Generative Adversarial Networks
2105.14148 (2021-05)
OpenMatch: Open-set Consistency Regularization for Semi-supervised Learning with Outliers
2110.03006 (2021-10)
Unsupervised Selective Labeling for More Effective Semi-Supervised Learning
and 16 more not named here
Color 18 other papers
5 dated earlier, 13 later
2001.07685 (2020-01)
FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence
2003.10580 (2020-03)
Meta Pseudo Labels
2104.07713 (2021-04)
Contrastive Learning with Stronger Augmentations
and 15 more not named here
resnet18 1 other paper
1 dated earlier
2006.12557 (2020-06)
Just How Toxic is Data Poisoning? A Unified Benchmark for Backdoor and Data Poisoning Attacks
resnet34 1 other paper
1 dated earlier
2006.12557 (2020-06)
Just How Toxic is Data Poisoning? A Unified Benchmark for Backdoor and Data Poisoning Attacks
resnet50 1 other paper
1 dated earlier
2006.12557 (2020-06)
Just How Toxic is Data Poisoning? A Unified Benchmark for Backdoor and Data Poisoning Attacks
vgg11 1 other paper
1 dated earlier
2006.12557 (2020-06)
Just How Toxic is Data Poisoning? A Unified Benchmark for Backdoor and Data Poisoning Attacks
vgg16 1 other paper
1 dated earlier
2006.12557 (2020-06)
Just How Toxic is Data Poisoning? A Unified Benchmark for Backdoor and Data Poisoning Attacks

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

Data poisoning causes misclassification of test time target examples by injecting maliciously crafted samples in the training data. Existing defenses are often effective only against a specific type of targeted attack, significantly degrade the generalization performance, or are prohibitive for standard deep learning pipelines. In this work, we propose an efficient defense mechanism that significantly reduces the success rate of various data poisoning attacks, and provides theoretical guarantees for the performance of the model. Targeted attacks work by adding bounded perturbations to a randomly selected subset of training data to match the targets' gradient or representation. We show that: (i) under bounded perturbations, only a number of poisons can be optimized to have a gradient that is close enough to that of the target and make the attack successful; (ii) such effective poisons move away from their original class and get isolated in the gradient space; (iii) dropping examples in low-density gradient regions during training can successfully eliminate the effective poisons, and guarantees similar training dynamics to that of training on full data. Our extensive experiments show that our method significantly decreases the success rate of state-of-the-art targeted attacks, including Gradient Matching and Bullseye Polytope, and easily scales to large datasets.

For agents

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

get_harvested_code_for_paper("2210.09671")
get_code_for_paper("2210.09671")
have("2210.09671")

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

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

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

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

Connect an agent — have() is free.