SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.07460 · ICML · 2022

Diffusion Models for Adversarial Purification

Anima Anandkumar, Weili Nie, Arash Vahdat, Yujia Huang, Chaowei Xiao, Brandon Guo

arXiv · PDF · Open in the Atlas

Code that ran

16 of 23 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; 4 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 5 failures of our instrument; 7 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/2205.07460.json · badge: /api/ran/2205.07460.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
chail/gan-ensembling canonical (classifier label)
classifier basis not recorded on the link
11 ran · 4 no recorded run
NVlabs/DiffPure canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
eladrich/pixel2style2pixel canonical (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 1 no recorded run
point0bar1/ebm-defense unrelated (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
ermongroup/SDEdit community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
EBM Ran
ran on a synthesized input
point0bar1/ebm-defense/nets.py
pointer only (licence: NOASSERTION) · get_code("53b522e213c74c83")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, point0bar1/ebm-defense (NOASSERTION). 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.

betas_for_alpha_bar Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from suxuann/ddib
pointer only · get_code("809d6a4eb92a37c4")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

betas_for_alpha_bar Ran
ran, honoured the contract we drafted
NVlabs/DiffPure/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NOASSERTION) · get_code("2ab2316ac6fdd869")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, NVlabs/DiffPure (NOASSERTION). 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.

downsample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chail/gan-ensembling/networks/classifiers/attribute_utils.py
code served (permissive licence) · get_code("a56784666af5bd6d")
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 4, dtype family float, shape (2, 3, 256, 256) 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 test image tensor with shape [batch, channels, height, width]
# Using distinct dimensions: batch=2, channels=3, height=512, width=512
# This satisfies the condition images.shape[2] > size (512 > 256)
# and factor = 512 // 256 = 2, so factor * size == 512
images = torch.randn(2, 3, 512, 512)

ARGS = {
    "images": images,
    "size": 256
}
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 4, dtype family float, shape (2, 3, 256, 256) — shape (2, 3, 256, 256) 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
format_time Ran
ran; our contract draft was wrong, not the code
chail/gan-ensembling/networks/classifiers/cifar10_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from JunlinHan/YOCO, is pointer only (licence: NONE) · get_code("8d7ec010c29e813b")
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 JunlinHan/YOCO, 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.

get_keys Ran
ran; our contract draft was wrong, not the code
eladrich/pixel2style2pixel/models/psp.py
code served (permissive licence) · get_code("29b9a890f149a3a6")
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 dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a state dict that mimics a checkpoint with nested module names
# The function extracts keys that start with a specific name prefix
state_dict = {
    'encoder.layer1.weight': torch.randn(4, 3),
    'encoder.layer1.bias': torch.randn(4),
    'encoder.layer2.weight': torch.randn(5, 4),
    'encoder.layer2.bias': torch.randn(5),
    'decoder.layer1.weight': torch.randn(3, 5),
    'decoder.layer1.bias': torch.randn(3),
    'other.param': torch.randn(2, 2)
}

# Wrap it in a checkpoint-like dict (function checks for 'state_dict' key)
d = {'state_dict': state_dict, 'epoch': 10, 'optimizer': {}}

# Name to filter by
name = 'encoder'

ARGS = {
    'd': d,
    'name': name
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_logit Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chail/gan-ensembling/networks/classifiers/attribute_utils.py
code served (permissive licence) · get_code("a59556109795f95c")
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, 10) 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal nn.Module that accepts a tensor and returns logits
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4 * 256 * 256, 10)
    
    def forward(self, x):
        # x shape: [batch, channels, height, width]
        batch_size = x.shape[0]
        x = x.view(batch_size, -1)
        return self.fc(x)

# Create the network
net = SimpleNet()

# Create a sample image tensor
# Shape: [batch=2, channels=4, height=512, width=512]
# This will be downsampled to [2, 4, 256, 256] by the downsample function
im = torch.randn(2, 4, 512, 512)

ARGS = {
    'net': net,
    'im': im
}
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, 10) — shape (2, 10) 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_mean_and_std Ran
ran on a synthesized input
chail/gan-ensembling/networks/classifiers/cifar10_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from seominseok0429/label-smoothing-visualization-pytorch, is pointer only (licence: NONE) · get_code("3cbdd3b190b16350")
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 seominseok0429/label-smoothing-visualization-pytorch, 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.

get_named_beta_schedule Ran
ran, honoured the contract we drafted
NVlabs/DiffPure/guided_diffusion/gaussian_diffusion.py
pointer only (licence: NOASSERTION) · get_code("a086d6286a40b889")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, NVlabs/DiffPure (NOASSERTION). 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.

lerp_clip Ran
ran; our contract draft was wrong, not the code
chail/gan-ensembling/networks/classifiers/attribute_classifier.py
pointer only (licence: MIT); the stored copy get_code serves, from hfmei/idc, is pointer only (licence: NONE) · get_code("195d635db8eb778b")
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 hfmei/idc, 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.

max_res_from_state_dict Ran
ran, honoured the contract we drafted
chail/gan-ensembling/networks/classifiers/attribute_classifier.py
pointer only (licence: MIT); the stored copy get_code serves, from hfmei/idc, is pointer only (licence: NONE) · get_code("d5eb57879ef1704e")
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 hfmei/idc, 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.

modify_layers Ran
ran on a synthesized input
chail/gan-ensembling/utils/customnet.py
code served (permissive licence) · get_code("8659b4900a4273d0")
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
import torch.nn as nn

torch.manual_seed(0)

class SimpleLayer(nn.Module):
    def __init__(self):
        super(SimpleLayer, self).__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Create a list of layers with (name, module) tuples
layers = [
    ('layer1', SimpleLayer()),
    ('layer2', SimpleLayer()),
]

ARGS = {
    'layers': layers
}
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
polyinterp Ran
ran on a synthesized input
chail/gan-ensembling/utils/LBFGS.py
code served (permissive licence) · get_code("a55a9c6d78060f5a")
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 float64, ndim 0, 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 numpy as np

# Construct a simple points array for polyinterp
# Format: each row is [x, f, g] where x is position, f is function value, g is gradient
# Using 2 points with both function and derivative information to test the quadratic case
points = np.array([
    [0.0, 1.0, 1.0],      # point at x=0, f=1, gradient=1
    [1.0, 0.5, -1.0]       # point at x=1, f=0.5, gradient=-1
], dtype=np.float64)

ARGS = {
    "points": points,
    "x_min_bound": 0.0,
    "x_max_bound": 1.0,
    "plot": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
postprocess Ran
ran on a synthesized input
chail/gan-ensembling/networks/domain_classifier.py
code served (permissive licence) · get_code("6774ed80906f2f42")
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)

# Test case 1: 2D tensor (batch of logits)
classifier_output_2d = torch.randn(2, 4)

# Test case 2: 1D tensor (single sample)
classifier_output_1d = torch.randn(4)

# Use the 2D case for the main test
ARGS = {
    "classifier_output": classifier_output_2d
}
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
state_dict_from_tf_parameters Ran
ran on a synthesized input
chail/gan-ensembling/networks/classifiers/attribute_classifier.py
code served (permissive licence) · get_code("1835534046b4b465")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create mock TensorFlow variable objects that have an eval() method
class MockTFVariable:
    def __init__(self, data):
        self._data = data
    
    def eval(self):
        return self._data

# Create parameters dict with various tensor names and shapes
# following patterns the function expects to handle
parameters = {
    'layer1/weight': MockTFVariable(np.random.randn(3, 2, 4, 5).astype(np.float32)),  # conv weight: (out_channels, in_channels, h, w) in TF
    'layer1/bias': MockTFVariable(np.random.randn(3).astype(np.float32)),
    'dense_layer/weight': MockTFVariable(np.random.randn(6, 4).astype(np.float32)),  # dense weight: (in_features, out_features) in TF
    'fromrgb_lod.0/weight': MockTFVariable(np.random.randn(3, 2, 4, 5).astype(np.float32)),
    'lod': MockTFVariable(np.array(1.0, dtype=np.float32)),
}

ARGS = {
    'parameters': parameters
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
stylegan_setting Ran
ran on a synthesized input
chail/gan-ensembling/networks/stylegan2/stylegan2_networks.py
code served (permissive licence) · get_code("2f887a37af9d3f65")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a single parameter: domain
# It's a string that determines configuration values
# Valid domains based on the function logic: 'ffhq', 'car', or any other string (default case)

ARGS = {
    'domain': 'ffhq'
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Model Not yet run
unverified (harvested, no recorded run)
ermongroup/SDEdit/models/diffusion.py
code served (permissive licence) · get_code("3b923ff790cbbc0b")
How it ran

no invocation recorded.

define_classifier Not yet run
unverified (harvested, no recorded run)
chail/gan-ensembling/networks/domain_classifier.py
code served (permissive licence) · get_code("41e902f9c7c2e2eb")
How it ran

no invocation recorded.

define_generator Not yet run
unverified (harvested, no recorded run)
chail/gan-ensembling/networks/domain_generator.py
code served (permissive licence) · get_code("773b8b462df07b05")
How it ran

no invocation recorded.

get_named_beta_schedule Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from suxuann/ddib
pointer only · get_code("3dfd61c7077a1607")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

get_softmaxed Not yet run
unverified (harvested, no recorded run)
chail/gan-ensembling/networks/classifiers/attribute_utils.py
code served (permissive licence) · get_code("839a62fe894a78a3")
How it ran

no invocation recorded.

is_legal Not yet run
unverified (harvested, no recorded run)
chail/gan-ensembling/utils/LBFGS.py
code served (permissive licence) · get_code("45be190c3dfd3c8f")
How it ran

no invocation recorded.

run_on_batch Not yet run
unverified (harvested, no recorded run)
eladrich/pixel2style2pixel/predict.py
code served (permissive licence) · get_code("a7def332eb991665")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 10 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 4 the same month, 10 later) and 11 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
betas_for_alpha_bar 92 other papers
9 dated earlier, 1 the same month, 82 later · 3 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2102.09672 (2021-02)
Improved Denoising Diffusion Probabilistic Models
and 89 more not named here
get_named_beta_schedule 63 other papers
8 dated earlier, 1 the same month, 54 later
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2108.02938 (2021-08)
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
and 60 more not named here
format_time 37 other papers
25 dated earlier, 3 the same month, 9 later
1603.05027 (2016-03)
Identity Mappings in Deep Residual Networks
1605.07146 (2016-05)
Wide Residual Networks
1805.11327 (2018-05)
Lightweight Probabilistic Deep Networks
and 34 more not named here
get_mean_and_std 18 other papers
12 dated earlier, 1 the same month, 5 later
1603.05027 (2016-03)
Identity Mappings in Deep Residual Networks
1605.07146 (2016-05)
Wide Residual Networks
1805.11327 (2018-05)
Lightweight Probabilistic Deep Networks
and 15 more not named here
get_keys 14 other papers
6 dated earlier, 8 later
2008.00951 (2020-08)
Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation
2011.12799 (2020-11)
StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation
2103.17249 (2021-03)
StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery
and 11 more not named here
is_legal 3 other papers
1 dated earlier, 2 later
2109.02606 (2021-09)
Gaussian Process Uniform Error Bounds with Unknown Hyperparameters for Safety-Critical Applications
2206.04734 (2022-06)
Fast Bayesian Inference with Batch Bayesian Quadrature via Kernel Recombination
2210.17299 (2022-10)
Bayesian Model Selection of Lithium-Ion Battery Models via Bayesian Quadrature
lerp_clip 3 other papers
3 later
2311.16124 (2023-11)
DiffAttack: Evasion Attacks Against Diffusion-Based Adversarial Purification
2401.16352 (2024-01)
Adversarial Training on Purification (AToP): Advancing Both Robustness and Generalization
2408.08502 (2024-08)
Efficient Image-to-Image Diffusion Classifier for Adversarial Robustness
max_res_from_state_dict 3 other papers
3 later
2311.16124 (2023-11)
DiffAttack: Evasion Attacks Against Diffusion-Based Adversarial Purification
2401.16352 (2024-01)
Adversarial Training on Purification (AToP): Advancing Both Robustness and Generalization
2408.08502 (2024-08)
Efficient Image-to-Image Diffusion Classifier for Adversarial Robustness
downsample 2 other papers
2 later
2311.18403 (2023-11)
Detecting and Corrupting Convolution-based Unlearnable Examples
2401.16352 (2024-01)
Adversarial Training on Purification (AToP): Advancing Both Robustness and Generalization
get_logit 2 other papers
2 later
2311.18403 (2023-11)
Detecting and Corrupting Convolution-based Unlearnable Examples
2401.16352 (2024-01)
Adversarial Training on Purification (AToP): Advancing Both Robustness and Generalization

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

Adversarial purification refers to a class of defense methods that remove adversarial perturbations using a generative model. These methods do not make assumptions on the form of attack and the classification model, and thus can defend pre-existing classifiers against unseen threats. However, their performance currently falls behind adversarial training methods. In this work, we propose DiffPure that uses diffusion models for adversarial purification: Given an adversarial example, we first diffuse it with a small amount of noise following a forward diffusion process, and then recover the clean image through a reverse generative process. To evaluate our method against strong adaptive attacks in an efficient and scalable way, we propose to use the adjoint method to compute full gradients of the reverse generative process. Extensive experiments on three image datasets including CIFAR-10, ImageNet and CelebA-HQ with three classifier architectures including ResNet, WideResNet and ViT demonstrate that our method achieves the state-of-the-art results, outperforming current adversarial training and adversarial purification methods, often by a large margin. Project page: https://diffpure.github.io.

For agents

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

get_harvested_code_for_paper("2205.07460")
get_code_for_paper("2205.07460")
have("2205.07460")

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

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

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

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

Connect an agent — have() is free.