SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2001.03994 · 2020

Fast is better than free: Revisiting adversarial training

J Zico Kolter, Eric Wong, Leslie Rice

arXiv · PDF · Open in the Atlas

Code that ran

22 of 32 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, 2 violated it and 14 have no contract verdict; 6 failures of our instrument; 10 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-21; 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/2001.03994.json · badge: /api/ran/2001.03994.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
tml-epfl/understanding-fast-adv-training canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
locuslab/fast_adversarial canonical (classifier label)
classifier basis: census
0 ran · 1 no recorded run
aliborji/Shapedefence community (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
MetaSolver/icml2021 community (classifier label)
classifier basis not recorded on the link
7 ran · 4 no recorded run
alirezaabdollahpour/CURE_fast_adversarial reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 2 no recorded run
elijahcn/TextCNN-AdversarialTraining community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
aliborji/shapedefense extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
is_image_file Ran
ran, violated the contract we drafted
aliborji/Shapedefence/make_imagenet_64_c.py
pointer only (licence: MIT); the stored copy get_code serves, from tmlr-group/cover, is pointer only (licence: NONE) · get_code("89c2cf3b97685684")
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 tmlr-group/cover, 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.

PreActResNet18 Ran
ran; our contract draft was wrong, not the code
tml-epfl/understanding-fast-adv-training/models.py
pointer only (licence: NONE) · get_code("fa636f649fc7a458")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tml-epfl/understanding-fast-adv-training 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.

auc Ran
ran, violated the contract we drafted
aliborji/shapedefense/test_noise_robustness.py
code served (permissive licence) · get_code("7a93b4bf9b9553b9")
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 float, ndim 0, dtype family float, shape () 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 calculates the area under a curve using the trapezoidal rule
# It expects errs to be a list or array-like object with numeric values
# representing error values at different points

errs = [0.1, 0.3, 0.5, 0.4, 0.2]

ARGS = {
    'errs': errs
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
build_ButcherTableau_Heun Ran
ran on a synthesized input
MetaSolver/icml2021/sopa/src/solvers/rk_parametric_order2stage2.py
code served (permissive licence) · get_code("5f605ede6476e2b2")
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 torch

torch.manual_seed(0)

ARGS = {
    "dtype": torch.float32,
    "device": torch.device("cpu")
}
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 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_ButcherTableau_Midpoint Ran
ran on a synthesized input
MetaSolver/icml2021/sopa/src/solvers/rk_parametric_order2stage2.py
code served (permissive licence) · get_code("ef2b42bfdaa3556e")
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 torch

torch.manual_seed(0)

ARGS = {
    "dtype": torch.float32,
    "device": "cpu",
}
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 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_ButcherTableau_RK38 Ran
ran on a synthesized input
MetaSolver/icml2021/sopa/src/solvers/rk_parametric_order4stage4.py
code served (permissive licence) · get_code("414bc3938ef8364c")
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 torch

torch.manual_seed(0)

ARGS = {
    "dtype": torch.float32,
    "device": "cpu",
}
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 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_ButcherTableau_RKStandard Ran
ran on a synthesized input
MetaSolver/icml2021/sopa/src/solvers/rk_parametric_order4stage4.py
code served (permissive licence) · get_code("2bc3009bc37610d0")
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 torch

torch.manual_seed(0)

ARGS = {
    "dtype": torch.float32,
    "device": torch.device("cpu"),
}
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 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_iterator Ran
ran on a synthesized input
elijahcn/TextCNN-AdversarialTraining/utils.py
code served (permissive licence) · get_code("d2f33f1ecdf5b3bc")
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 DatasetIterater. 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

torch.manual_seed(0)

# Create a small dataset with tuples of (x, y, seq_len)
# Each sample is (input_id, label, sequence_length)
dataset = [
    (1, 0, 5),
    (2, 1, 4),
    (3, 0, 6),
    (4, 1, 3),
    (5, 0, 5),
    (6, 1, 4),
]

# Create a minimal config class with required attributes
class Config:
    def __init__(self):
        self.batch_size = 2
        self.device = 'cpu'

config = Config()

ARGS = {
    'dataset': dataset,
    'config': config,
}
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 DatasetIterater — a DatasetIterater output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DatasetIterater 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
clamp Ran
ran on a synthesized input
MetaSolver/icml2021/MegaAdversarial/src/attacks/fgsm.py
code served (permissive licence) · get_code("f1f502008abfb7b0")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 torch

torch.manual_seed(0)

# Create a small tensor to clamp
X = torch.randn(2, 4)

# Define lower and upper limits (can be scalars or tensors)
lower_limit = -1.0
upper_limit = 1.0

ARGS = {
    "X": X,
    "lower_limit": lower_limit,
    "upper_limit": upper_limit,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
detect_edge_gtsrb Ran
ran on a synthesized input
aliborji/Shapedefence/edge_detector.py
code served (permissive licence) · get_code("5f385a03a326c920")
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 (4, 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 torch
import numpy as np

torch.manual_seed(0)

# The function expects a tensor with shape (C, H, W)
# It will permute to (H, W, C), then take mean over axis 2
# So we need a 3D tensor with channels first
img = torch.randn(3, 4, 5)  # (C=3, H=4, W=5)

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage, torch — 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 (4, 5) — shape (4, 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
detect_edge_new Ran
ran on a synthesized input
aliborji/Shapedefence/edge_detector.py
code served (permissive licence) · get_code("daa0543c8e065130")
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 (4, 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 torch
import numpy as np
import cv2

torch.manual_seed(0)

# Create a small test image tensor
# The function expects a tensor with shape (C, H, W) based on permute(1, 2, 0)
# Create a tensor with 3 channels (C=3), height=4, width=5
img = torch.randint(0, 256, (3, 4, 5), dtype=torch.uint8).float()

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — 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 (4, 5) — shape (4, 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
detect_edge_new_cifar Ran
ran on a synthesized input
aliborji/Shapedefence/edge_detector.py
code served (permissive licence) · get_code("9b843c30b475815c")
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 (4, 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 torch
import numpy as np

torch.manual_seed(0)

# The function expects a tensor with shape (C, H, W)
# where C is channels, H is height, W is width
# It will permute to (H, W, C) and then compute mean across axis 2
img = torch.randn(3, 4, 5)  # 3 channels, 4 height, 5 width

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — 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 (4, 5) — shape (4, 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
find_classes Ran
ran; our contract draft was wrong, not the code
aliborji/Shapedefence/make_imagenet_64_c.py
code served (permissive licence) · get_code("52d10a10fb72fb9f")
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 os
import tempfile
import shutil

# Create a temporary directory with some subdirectories to simulate a class directory structure
temp_dir = tempfile.mkdtemp()
os.makedirs(os.path.join(temp_dir, "class_a"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_b"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "class_c"), exist_ok=True)

ARGS = {
    "dir": temp_dir
}
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 — 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
get_norm_layer Ran
ran on a synthesized input
aliborji/Shapedefence/pix2pix-pytorch/networks.py
code served (permissive licence) · get_code("a116f92d34de08d0")
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 partial. 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 functools

torch.manual_seed(0)

# Define a stand-in SwitchNorm2d class since it's referenced in the function
class SwitchNorm2d(nn.Module):
    def __init__(self, num_features):
        super().__init__()
        self.num_features = num_features
    
    def forward(self, x):
        return x

# Test cases for different norm_type values
ARGS = {
    'norm_type': 'instance'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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_scheduler Ran
ran on a synthesized input
aliborji/Shapedefence/pix2pix-pytorch/networks.py
code served (permissive licence) · get_code("78865ef3023c58ad")
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 LambdaLR. 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
from torch.optim import Adam

torch.manual_seed(0)

# Create a minimal model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model and optimizer
model = SimpleModel()
optimizer = Adam(model.parameters(), lr=0.001)

# Create a config object with required attributes
class OptConfig:
    def __init__(self, lr_policy='lambda'):
        self.lr_policy = lr_policy
        self.epoch_count = 0
        self.niter = 100
        self.niter_decay = 50
        self.lr_decay_iters = 10

# Build arguments for each policy type (testing with 'lambda')
opt = OptConfig(lr_policy='lambda')

ARGS = {
    'optimizer': optimizer,
    'opt': opt
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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
init_net Ran
ran on a synthesized input
aliborji/Shapedefence/pix2pix-pytorch/networks.py
code served (permissive licence) · get_code("debf7fa6a54c7259")
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 SimpleNet. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch.nn import init

torch.manual_seed(0)

# Build a simple neural network with Conv, Linear, and BatchNorm2d layers
class SimpleNet(nn.Module):
    def __init__(self):
        super(SimpleNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3)
        self.bn1 = nn.BatchNorm2d(16)
        self.linear1 = nn.Linear(16, 8)
        self.linear2 = nn.Linear(8, 4)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        return x

net = SimpleNet()

ARGS = {
    'net': net,
    'init_type': 'normal',
    'init_gain': 0.02,
    'gpu_id': 'cpu'
}
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 SimpleNet — a SimpleNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleNet 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
l0_mid_points Ran
ran; our contract draft was wrong, not the code
alirezaabdollahpour/CURE_fast_adversarial/attacks/fmn.py
pointer only (licence: NONE) · get_code("89f1ad5572085e04")
How it ran

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

l1_mid_points Ran
ran; our contract draft was wrong, not the code
alirezaabdollahpour/CURE_fast_adversarial/attacks/fmn.py
pointer only (licence: NONE) · get_code("47bfdbebc768db6a")
How it ran

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

linf_projection_Alireza Ran
ran; our contract draft was wrong, not the code
alirezaabdollahpour/CURE_fast_adversarial/attacks/fmn.py
pointer only (licence: NONE) · get_code("f6debb1c3f5dd7da")
How it ran

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

make_dataset Ran
ran; our contract draft was wrong, not the code
aliborji/Shapedefence/make_imagenet_64_c.py
code served (permissive licence) · get_code("195faaace44890e8")
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 os
import tempfile
import shutil

# Create a temporary directory structure with image files
temp_dir = tempfile.mkdtemp()

# Create class subdirectories
class_names = ['class_a', 'class_b']
for class_name in class_names:
    class_dir = os.path.join(temp_dir, class_name)
    os.makedirs(class_dir, exist_ok=True)
    
    # Create some image files
    for i in range(2):
        img_path = os.path.join(class_dir, f'image_{i}.jpg')
        with open(img_path, 'w') as f:
            f.write('dummy image data')

# Create class_to_idx mapping
class_to_idx = {
    'class_a': 0,
    'class_b': 1
}

ARGS = {
    'dir': temp_dir,
    'class_to_idx': class_to_idx
}
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 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
noise_params Ran
ran on a synthesized input
MetaSolver/icml2021/sopa/src/solvers/utils.py
code served (permissive licence) · get_code("7d6882c87b7d7d18")
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 torch
from torch.distributions.normal import Normal
from torch.distributions.cauchy import Cauchy

torch.manual_seed(0)

# Create a small tensor for mean_u
mean_u = torch.tensor(0.5, dtype=torch.float32, device='cpu')

# Create a small tensor for mean_v
mean_v = torch.tensor(0.3, dtype=torch.float32, device='cpu')

# Standard deviation
std = 0.01

# Bernoulli probability
bernoulli_p = 1.0

# Noise type
noise_type = 'cauchy'

# Minimize RK2 error flag
minimize_rk2_error = False

ARGS = {
    'mean_u': mean_u,
    'mean_v': mean_v,
    'std': std,
    'bernoulli_p': bernoulli_p,
    'noise_type': noise_type,
    'minimize_rk2_error': minimize_rk2_error
}
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 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
sample_noise Ran
ran on a synthesized input
MetaSolver/icml2021/sopa/src/solvers/utils.py
code served (permissive licence) · get_code("1a22911f27fa7a50")
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 Tensor, ndim 1, dtype family float, shape (2,) 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 torch
from torch.distributions.normal import Normal
from torch.distributions.cauchy import Cauchy

torch.manual_seed(0)

ARGS = {
    'mu': 0.0,
    'sigma': 1.0,
    'noise_type': 'cauchy',
    'size': 2,
    'device': 'cpu',
    'minimize_rk2_error': False
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
attack_pgd_Alireza Not yet run
unverified (harvested, no recorded run)
alirezaabdollahpour/CURE_fast_adversarial/train_CIFAR10.py
pointer only (licence: NONE) · get_code("b6a22c7b74d0b566")
How it ran

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

build_dataset Not yet run
unverified (harvested, no recorded run)
elijahcn/TextCNN-AdversarialTraining/utils.py
code served (permissive licence) · get_code("c31db8461c9422cd")
How it ran

no invocation recorded.

build_vocab Not yet run
unverified (harvested, no recorded run)
elijahcn/TextCNN-AdversarialTraining/utils.py
code served (permissive licence) · get_code("48d009a3bfb3919f")
How it ran

no invocation recorded.

clamp Not yet run
unverified (harvested, no recorded run)
locuslab/fast_adversarial/MNIST/evaluate_mnist.py
pointer only (licence: NONE) · get_code("8a93e041134b597a")
How it ran

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

create_solver Not yet run
unverified (harvested, no recorded run)
MetaSolver/icml2021/sopa/src/solvers/utils.py
code served (permissive licence) · get_code("412d129df08139d7")
How it ran

no invocation recorded.

get_cifar10_test_loader Not yet run
unverified (harvested, no recorded run)
MetaSolver/icml2021/sopa/src/models/odenet_cifar10/data.py
code served (permissive licence) · get_code("842519d6c63098ed")
How it ran

no invocation recorded.

get_cifar10_train_val_loaders Not yet run
unverified (harvested, no recorded run)
MetaSolver/icml2021/sopa/src/models/odenet_cifar10/data.py
code served (permissive licence) · get_code("6d6817a15cfeccc0")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
tml-epfl/understanding-fast-adv-training/models.py
pointer only (licence: NONE) · get_code("cc55d19dea2beabe")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tml-epfl/understanding-fast-adv-training 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.

load_model Not yet run
unverified (harvested, no recorded run)
MetaSolver/icml2021/sopa/src/models/utils.py
code served (permissive licence) · get_code("7ceaa0e5bd758ab3")
How it ran

no invocation recorded.

zero_grad Not yet run
unverified (harvested, no recorded run)
alirezaabdollahpour/CURE_fast_adversarial/train_CIFAR10.py
pointer only (licence: NONE) · get_code("5c6723ed7945b680")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, alirezaabdollahpour/CURE_fast_adversarial 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 32 samples lifted from this paper's linked repositories, 32 carry a function identity and 0 do not. Of the 32 distinct functions with an identity, 10 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 6 later) and 22 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
clamp 33 other papers
1 dated earlier, 32 later · 1 only as an assembly brick
1706.06083 (2017-06)
Towards Deep Learning Models Resistant to Adversarial Attacks
2002.11569 (2020-02)
Overfitting in adversarially robust deep learning
2003.01690 (2020-03)
Reliable Evaluation of Adversarial Robustness with an Ensemble of Diverse Parameter-free Attacks
and 30 more not named here
find_classes 30 other papers
7 dated earlier, 23 later
1406.2661 (2014-06)
Generative Adversarial Networks
1612.06321 (2016-12)
Large-Scale Image Retrieval with Attentive Deep Local Features
1809.04729 (2018-09)
A Less Biased Evaluation of Out-of-distribution Sample Detectors
and 27 more not named here
is_image_file 22 other papers
7 dated earlier, 15 later
1406.2661 (2014-06)
Generative Adversarial Networks
1603.08511 (2016-03)
Colorful Image Colorization
1805.08318 (2018-05)
Self-Attention Generative Adversarial Networks
and 19 more not named here
make_dataset 5 other papers
1 dated earlier, 4 later
1911.07205 (2019-11)
REFIT: A Unified Watermark Removal Framework For Deep Learning Systems With Limited Data
Ren_Masked_Jigsaw_Puzzle_A_Versatile_Position_Embedding_for_Vision_Transformers_CVPR_2023_paper (2023 (year only))
Masked Jigsaw Puzzle: A Versatile Position Embedding for Vision Transformers
2310.05397 (2023-10)
Enhancing Clustered Federated Learning: Integration of Strategies and Improved Methodologies
and 2 more not named here
auc 3 other papers
3 later
2110.13771 (2021-10)
AugMax: Adversarial Composition of Random Augmentations for Robust Training
Ren_Masked_Jigsaw_Puzzle_A_Versatile_Position_Embedding_for_Vision_Transformers_CVPR_2023_paper (2023 (year only))
Masked Jigsaw Puzzle: A Versatile Position Embedding for Vision Transformers
2506.13277 (2025-06)
SeqPE: Transformer with Sequential Position Encoding
attack_pgd_Alireza 1 other paper
1 dated earlier
1811.09716 (2018-11)
Robustness via curvature regularization, and vice versa
get_norm_layer 1 other paper
1 dated earlier
1804.00921 (2018-04)
DeSIGN: Design Inspiration from Generative Networks
get_scheduler 1 other paper
1 later
2203.12691 (2022-03)
Learning to generate line drawings that convey geometry and semantics
init_net 1 other paper
1 dated earlier
1804.00921 (2018-04)
DeSIGN: Design Inspiration from Generative Networks
zero_grad 1 other paper
1 dated earlier
1811.09716 (2018-11)
Robustness via curvature regularization, and vice versa

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

Repositories linked to this paper

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

Abstract

Adversarial training, a method for learning robust deep networks, is typically assumed to be more expensive than traditional training due to the necessity of constructing adversarial examples via a first-order method like projected gradient decent (PGD). In this paper, we make the surprising discovery that it is possible to train empirically robust models using a much weaker and cheaper adversary, an approach that was previously believed to be ineffective, rendering the method no more costly than standard training in practice. Specifically, we show that adversarial training with the fast gradient sign method (FGSM), when combined with random initialization, is as effective as PGD-based training but has significantly lower cost. Furthermore we show that FGSM adversarial training can be further accelerated by using standard techniques for efficient training of deep networks, allowing us to learn a robust CIFAR10 classifier with 45% robust accuracy to PGD attacks with = 8/255 in 6 minutes, and a robust ImageNet classifier with 43% robust accuracy at = 2/255 in 12 hours, in comparison to past work based on "free" adversarial training which took 10 and 50 hours to reach the same respective thresholds. Finally, we identify a failure mode referred to as "catastrophic overfitting" which may have caused previous attempts to use FGSM adversarial training to fail. All code for reproducing the experiments in this paper as well as pretrained model weights are at https://github.com/locuslab/fast_adversarial.

For agents

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

get_harvested_code_for_paper("2001.03994")
get_code_for_paper("2001.03994")
have("2001.03994")

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

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

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

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

Connect an agent — have() is free.