SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.14222 · ICCV · 2021

Adversarial Attacks are Reversible with Natural Supervision

Hao Wang, Carl Vondrick, Chengzhi Mao, Junfeng Yang, Mia Chiquier

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 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; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 7 failures of our instrument; 2 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/2103.14222.json · badge: /api/ran/2103.14222.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
cvlab-columbia/SelfSupDefense canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
L1_projection Ran
ran; our contract draft was wrong, not the code
cvlab-columbia/SelfSupDefense/AAattack/autopgd_base.py
code served (permissive licence) · get_code("7325c49fd8c6a7d2")
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 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)

# x2: center of the L1 ball (bs x input_dim)
x2 = torch.rand(2, 4)

# y2: current perturbation (bs x input_dim)
y2 = torch.rand(2, 4) * 0.1

# eps1: radius of the L1 ball
eps1 = 0.5

ARGS = {
    "x2": x2,
    "y2": y2,
    "eps1": eps1,
}
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 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
PreActResNet18 Ran
ran; our contract draft was wrong, not the code
cvlab-columbia/SelfSupDefense/learning/preactresnet.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jiancongxiao/moreau-envelope-sgd, is pointer only (licence: NONE) · get_code("1153837ba4a94242")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from jiancongxiao/moreau-envelope-sgd, 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.

PreActResNet18Mhead Ran
ran on a synthesized input
cvlab-columbia/SelfSupDefense/learning/preactresnet.py
code served (permissive licence) · get_code("d043e79456d2e240")
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 PreActResNetMhead. 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 PreActResNetMhead — a PreActResNetMhead output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PreActResNetMhead 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
PreActResNet18SSL Ran
ran; our contract draft was wrong, not the code
cvlab-columbia/SelfSupDefense/learning/preactresnet.py
code served (permissive licence) · get_code("25f994ffc02d5ca9")
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 PreActResNetSSL. 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 PreActResNetSSL — a PreActResNetSSL output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PreActResNetSSL 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
getDictImageNetClasses Ran
ran on a synthesized input
cvlab-columbia/SelfSupDefense/utils.py
code served (permissive licence) · get_code("3bb1c5ca33fbb118")
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 tempfile
import os

# Create a temporary file with ImageNet class data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("n02119789 1 kit_fox\n")
temp_file.write("n02100735 2 english_setter\n")
temp_file.write("n02110063 3 malamute\n")
temp_file.write("n02096294 4 afghan_hound\n")
temp_file.write("n02102040 5 english_springer\n")
temp_file.close()

ARGS = {
    'path_imagenet_classes_name': temp_file.name
}
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
normal_guassian_normalize Ran
ran, honoured the contract we drafted
cvlab-columbia/SelfSupDefense/cifar10_defense.py
code served (permissive licence) · get_code("86fba5d0611cc5ae")
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 with shape (2, 4)
T = torch.randn(2, 4)

ARGS = {
    "T": T
}
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
normalize Ran
ran, honoured the contract we drafted
cvlab-columbia/SelfSupDefense/cifar10_defense.py
code served (permissive licence) · get_code("464c263f3a828a31")
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
import numpy as np

torch.manual_seed(0)

# The function `normalize(X)` takes a single parameter X and returns it unchanged.
# X is most likely a tensor or array-like object based on the function name.
# We'll construct a small tensor as the argument.

X = torch.randn(2, 4)

ARGS = {
    "X": X
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
pad Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cvlab-columbia/SelfSupDefense/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jiancongxiao/moreau-envelope-sgd, is pointer only (licence: NONE) · get_code("1e0eb41fc8899d05")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from jiancongxiao/moreau-envelope-sgd, 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.

projection_l1 Ran
ran; our contract draft was wrong, not the code
cvlab-columbia/SelfSupDefense/AAattack/fab_projections.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from junjieyang97/rgd, is pointer only (licence: LGPL-3.0) · get_code("9647e1400ee744e4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from junjieyang97/rgd, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

projection_l2 Ran
ran; our contract draft was wrong, not the code
cvlab-columbia/SelfSupDefense/AAattack/fab_projections.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from junjieyang97/rgd, is pointer only (licence: LGPL-3.0) · get_code("a345677b413ef5ca")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from junjieyang97/rgd, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

projection_linf Ran
ran; our contract draft was wrong, not the code
cvlab-columbia/SelfSupDefense/AAattack/fab_projections.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from junjieyang97/rgd, is pointer only (licence: LGPL-3.0) · get_code("b8bdb6e496b4b5fa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from junjieyang97/rgd, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

clamp Not yet run
unverified (harvested, no recorded run)
cvlab-columbia/SelfSupDefense/cifar10_defense.py
code served (permissive licence) · get_code("8a93e041134b597a")
How it ran

no invocation recorded.

normalise Not yet run
unverified (harvested, no recorded run)
cvlab-columbia/SelfSupDefense/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from jiancongxiao/moreau-envelope-sgd, is pointer only (licence: NONE) · get_code("d2a4ac781b2a9628")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from jiancongxiao/moreau-envelope-sgd, 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. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 13 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 1 the same month, 13 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
clamp 33 other papers
8 dated earlier, 25 later · 1 only as an assembly brick
1706.06083 (2017-06)
Towards Deep Learning Models Resistant to Adversarial Attacks
2001.03994 (2020-01)
Fast is better than free: Revisiting adversarial training
2002.11569 (2020-02)
Overfitting in adversarially robust deep learning
and 30 more not named here
PreActResNet18 22 other papers
2 dated earlier, 20 later
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
2003.04887 (2020-03)
ReZero is All You Need: Fast Convergence at Large Depth
2202.14026 (2022-02)
Robust Training under Label Noise by Over-parameterization
and 19 more not named here
L1_projection 8 other papers
1 dated earlier, 1 the same month, 6 later · 2 only as an assembly brick
1511.00561 (2015-11)
SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation
2103.01208 (2021-03)
Mind the Box: l 1 -APGD for Sparse Adversarial Attacks on Image Classifiers
2105.12508 (2021-05)
Adversarial Robustness against Multiple and Single l p -Threat Models via Quick Fine-Tuning of Robust Classifiers
and 5 more not named here
normalise 8 other papers
3 dated earlier, 5 later
1905.02249 (2019-05)
MixMatch: A Holistic Approach to Semi-Supervised Learning
2003.14297 (2020-03)
Generative Latent Implicit Conditional Optimization when Learning from Small Sample
2006.12135 (2020-06)
Learning to Generate Noise for Multi-Attack Robustness
and 5 more not named here
pad 6 other papers
1 dated earlier, 5 later
2006.12135 (2020-06)
Learning to Generate Noise for Multi-Attack Robustness
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
2210.03543 (2022-10)
A2: Efficient Automated Attacker for Boosting Adversarial Training
and 3 more not named here
projection_l1 4 other papers
2 dated earlier, 2 later
2006.13726 (2020-06)
Imbalanced Gradients: A Subtle Cause of Overestimated Adversarial Robustness
2010.01950 (2020-10)
Torchattacks: A PyTorch Repository for Adversarial Attacks
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
and 1 more not named here
projection_l2 4 other papers
2 dated earlier, 2 later
2006.13726 (2020-06)
Imbalanced Gradients: A Subtle Cause of Overestimated Adversarial Robustness
2010.01950 (2020-10)
Torchattacks: A PyTorch Repository for Adversarial Attacks
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
and 1 more not named here
projection_linf 4 other papers
2 dated earlier, 2 later
2006.13726 (2020-06)
Imbalanced Gradients: A Subtle Cause of Overestimated Adversarial Robustness
2010.01950 (2020-10)
Torchattacks: A PyTorch Repository for Adversarial Attacks
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
and 1 more not named here
PreActResNet18Mhead 1 other paper
1 later
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
PreActResNet18SSL 1 other paper
1 later
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
getDictImageNetClasses 1 other paper
1 later
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
normal_guassian_normalize 1 other paper
1 later
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS
normalize 1 other paper
1 later
2204.03714 (2022-04)
ICLR 2022 PAIR 2 Struct Workshop USING MULTIPLE SELF-SUPERVISED TASKS IM-PROVES MODEL ROBUSTNESS

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

We find that images contain intrinsic structure that enables the reversal of many adversarial attacks. Attack vectors cause not only image classifiers to fail, but also collaterally disrupt incidental structure in the image. We demonstrate that modifying the attacked image to restore the natural structure will reverse many types of attacks, providing a defense. Experiments demonstrate significantly improved robustness for several state-of-the-art models across the CIFAR-10, CIFAR-100, SVHN, and ImageNet datasets. Our results show that our defense is still effective even if the attacker is aware of the defense mechanism. Since our defense is deployed during inference instead of training, it is compatible with pre-trained networks as well as most other defenses. Our results suggest deep networks are vulnerable to adversarial examples partly because their representations do not enforce the natural structure of images.

For agents

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

get_harvested_code_for_paper("2103.14222")
get_code_for_paper("2103.14222")
have("2103.14222")

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

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

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

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

Connect an agent — have() is free.