SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.06704 · 2022

COLLIDER: A Robust Training Framework for Backdoor Data

arXiv · PDF · Open in the Atlas

Code that ran

7 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 5 have no contract verdict; 2 failures of our instrument; 1 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.06704.json · badge: /api/ran/2210.06704.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
hmdolatabadi/collider canonical (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran on a synthesized input
hmdolatabadi/collider/utils.py
code served (permissive licence) · get_code("93a6f83b77333cee")
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 list, ndim 2, 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 small tensors for testing the accuracy function
# output: logits/scores for each class (batch_size x num_classes)
# target: ground truth class indices (batch_size,)

batch_size = 2
num_classes = 4

# Create output tensor with shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# Create target tensor with class indices (0 to num_classes-1)
target = torch.randint(0, num_classes, (batch_size,))

# Define topk parameter
topk = (1, 2)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk,
}
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 list, ndim 2, 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
hmdolatabadi/collider/models/resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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) and returned Conv2d. 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)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
hmdolatabadi/collider/models/resnet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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) and returned Conv2d. 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 = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
Setup block drafted by
a language model, Claude Haiku 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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
get_dataset Ran
ran on a synthesized input
hmdolatabadi/collider/data_aux.py
code served (permissive licence) · get_code("3768614c02d02313")
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 CustomIndexedTensorDataset. 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
import numpy as np
from torchvision.transforms import transforms
import tempfile
import os

torch.manual_seed(0)
np.random.seed(0)

# Create a temporary directory for the test
tmpdir = tempfile.mkdtemp()

# Create mock dataset files
# For 'no_backdoor' case (train partition)
train_data_clean = torch.randn(10, 3, 32, 32)
train_labels_clean = torch.randint(0, 10, (10,))
torch.save({
    'data': train_data_clean,
    'targets': train_labels_clean
}, os.path.join(tmpdir, 'cifar10_train.pth'))

# For backdoor case (train partition)
train_data_backdoor = torch.randn(8, 3, 32, 32)
train_labels_backdoor = torch.randint(0, 10, (8,))
pois_idx = np.array([0, 1, 2])
torch.save({
    'data': train_data_backdoor,
    'targets': train_labels_backdoor,
    'pois_idx': pois_idx
}, os.path.join(tmpdir, 'cifar10_backdoor_train_0_100_0.3.pth'))

# For validation partition (no_backdoor case)
val_data_clean = torch.randn(4, 3, 32, 32)
val_labels_clean = torch.randint(0, 10, (4,))
torch.save({
    'data': val_data_clean,
    'targets': val_labels_clean
}, os.path.join(tmpdir, 'cifar10_val.pth'))

# For validation partition (backdoor case)
val_data_backdoor = torch.randn(4, 3, 32, 32)
val_labels_backdoor = torch.randint(0, 10, (4,))
torch.save({
    'data': val_data_backdoor,
    'targets': val_labels_backdoor
}, os.path.join(tmpdir, 'cifar10_backdoor_val_0_100_0.3.pth'))

ARGS = {
    'root': tmpdir,
    'dataset': 'cifar10',
    'attack_type': 'no_backdoor',
    'injection_rate': 0.3,
    'partition': 'train',
    'data_transform': 'train',
    'valid_frac': 0.04,
    'indexed': True,
    'lid_batch_size': 100,
    'seed': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CustomIndexedTensorDataset — a CustomIndexedTensorDataset 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
lazy_greedy_heap Ran
ran on a synthesized input
hmdolatabadi/collider/lazyGreedy.py
code served (permissive licence) · get_code("23d880ed996f2ead")
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, ndim 2, 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 heapq

class MockF:
    """Mock facility location function object with required methods and attributes."""
    def __init__(self):
        self.D = [0, 1, 2, 3, 4]  # Mock dataset
        self.curVal = 0
    
    def inc(self, sset, index):
        """Return the marginal gain of adding index to sset."""
        # Simple mock: gain decreases as set grows
        return max(0, 5 - len(sset) - index * 0.5)
    
    def add(self, sset, index, improv):
        """Add index to sset and return new total value."""
        self.curVal += improv
        return self.curVal


def test_heappush_max():
    """Verify the custom heap functions work."""
    heap = []
    def _heappush_max(heap, item):
        heap.append(item)
        heapq._siftdown_max(heap, 0, len(heap) - 1)
    
    def _heappop_max(heap):
        lastelt = heap.pop()
        if heap:
            returnitem = heap[0]
            heap[0] = lastelt
            heapq._siftup_max(heap, 0)
            return returnitem
        return lastelt
    
    _heappush_max(heap, (5, 'a'))
    _heappush_max(heap, (3, 'b'))
    _heappush_max(heap, (7, 'c'))
    assert _heappop_max(heap) == (7, 'c')


# Create mock function object
F = MockF()

# V: list of indices to consider
V = [0, 1, 2, 3, 4]

# B: budget (maximum size of selected set)
B = 3

ARGS = {
    'F': F,
    'V': V,
    'B': B
}
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 tuple, ndim 2, dtype family float — a tuple 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
mle_batch Ran
ran on a synthesized input
hmdolatabadi/collider/utils.py
code served (permissive licence) · get_code("0bd6258603a6a95b")
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 float, shape (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

# Create small sample data
np.random.seed(0)

# data: reference dataset, shape (n_samples, n_features)
# The function will compute distances from batch to data
data = np.random.randn(10, 4).astype(np.float32)

# batch: query points, shape (m_samples, n_features)
# Must have same feature dimension as data
batch = np.random.randn(3, 4).astype(np.float32)

# k: number of neighbors to consider
# Must be less than len(data), so k=5 works with data of size 10
k = 5

ARGS = {
    "data": data,
    "batch": batch,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 float, shape (3,) — shape (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
resnet32 Ran
ran on a synthesized input
hmdolatabadi/collider/models/resnet_cifar.py
code served (permissive licence) · get_code("673b646b5aa019be")
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_s. 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 ResNet_s — a ResNet_s output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet_s 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)
hmdolatabadi/collider/models/resnet.py
code served (permissive licence) · get_code("f1efc5f21f78fc9d")
How it ran

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, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 4 later) and 4 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
conv1x1 431 other papers
211 dated earlier, 5 the same month, 203 later, 11 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
133 dated earlier, 5 the same month, 164 later, 9 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
resnet18 95 other papers
40 dated earlier, 1 the same month, 50 later, 3 same year, order not determinable, 1 undated
1805.00907 (2018-05)
Glow: Graph Lowering Compiler Techniques for Neural Networks
1902.08153 (2019-02)
Learned Step Size Quantization
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 92 more not named here
lazy_greedy_heap 1 other paper
1 later
2306.11911 (2023-06)
LNL+K: Enhancing Learning with Noisy Labels Through Noise Source Knowledge Integration

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

Deep neural network (DNN) classifiers are vulnerable to backdoor attacks. An adversary poisons some of the training data in such attacks by installing a trigger. The goal is to make the trained DNN output the attacker's desired class whenever the trigger is activated while performing as usual for clean data. Various approaches have recently been proposed to detect malicious backdoored DNNs. However, a robust, end-to-end training approach, like adversarial training, is yet to be discovered for backdoor poisoned data. In this paper, we take the first step toward such methods by developing a robust training framework, COLLIDER, that selects the most prominent samples by exploiting the underlying geometric structures of the data. Specifically, we effectively filter out candidate poisoned data at each training epoch by solving a geometrical coreset selection objective. We first argue how clean data samples exhibit (1) gradients similar to the clean majority of data and (2) low local intrinsic dimensionality (LID). Based on these criteria, we define a novel coreset selection objective to find such samples, which are used for training a DNN. We show the effectiveness of the proposed method for robust training of DNNs on various poisoned datasets, reducing the backdoor success rate significantly.

For agents

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

get_harvested_code_for_paper("2210.06704")
get_code_for_paper("2210.06704")
have("2210.06704")

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

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

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

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

Connect an agent — have() is free.