SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.03143 · 2024

ZeroPur: Succinct Training-Free Adversarial Purification

Bo Liu, Bin Xiao, Junwei Han, Zonglin Yang, Xiuli Bi, Erhu Liu, Xianjia Meng

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 4 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2406.03143.json · badge: /api/ran/2406.03143.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
erhul/ZeroPur canonical (classifier label)
classifier basis: census
7 ran · 6 no recorded run
FunctionStatusWhere it lives
create_window Ran
ran, honoured the contract we drafted
erhul/ZeroPur/peceptual/distances.py
pointer only (licence: NONE) · get_code("7fad0aef219ec2a6")
How it ran

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

gaussian Ran
ran, honoured the contract we drafted
erhul/ZeroPur/peceptual/distances.py
pointer only (licence: NONE) · get_code("a945dca82afbbec0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, erhul/ZeroPur 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_pred Ran
ran; our contract draft was wrong, not the code
erhul/ZeroPur/utils.py
pointer only (licence: NONE) · get_code("5105d577deca7c37")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, erhul/ZeroPur 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_transforms Ran
ran; our contract draft was wrong, not the code
erhul/ZeroPur/utils.py
pointer only (licence: NONE) · get_code("f01fff0fc0c2503d")
How it ran

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

normalize_flatten_features Ran
ran, honoured the contract we drafted
erhul/ZeroPur/peceptual/distances.py
pointer only (licence: NONE) · get_code("096fecc8a890169a")
How it ran

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

run_attack_with_random_targets Ran
ran; our contract draft was wrong, not the code
erhul/ZeroPur/stadv_eot/attacks.py
pointer only (licence: NONE) · get_code("984b130647734ed0")
How it ran

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

select_random_neighbor Ran
ran, honoured the contract we drafted
erhul/ZeroPur/transformations/quilting_fast.py
pointer only (licence: NONE) · get_code("4df8b47f5cfc0bd1")
How it ran

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

generate_patches Not yet run
unverified (harvested, no recorded run)
erhul/ZeroPur/transformations/quilting_fast.py
pointer only (licence: NONE) · get_code("d79c1f192b2849e2")
How it ran

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

generate_quilted_images Not yet run
unverified (harvested, no recorded run)
erhul/ZeroPur/transformations/quilting_fast.py
pointer only (licence: NONE) · get_code("28464a7d42500331")
How it ran

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

get_accuracy Not yet run
unverified (harvested, no recorded run)
erhul/ZeroPur/utils.py
pointer only (licence: NONE) · get_code("fa9947c95b2f3518")
How it ran

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

get_lpips_model Not yet run
unverified (harvested, no recorded run)
erhul/ZeroPur/peceptual/misc.py
pointer only (licence: NONE) · get_code("84d62d2d23039e48")
How it ran

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

get_self_lpips_model Not yet run
unverified (harvested, no recorded run)
erhul/ZeroPur/peceptual/misc.py
pointer only (licence: NONE) · get_code("cbb5e6f16de9abd7")
How it ran

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

set_loader Not yet run
unverified (harvested, no recorded run)
erhul/ZeroPur/comparison.py
pointer only (licence: NONE) · get_code("38e917a54ba28703")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, erhul/ZeroPur 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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 2 later) and 10 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
gaussian 160 other papers
100 dated earlier, 8 the same month, 51 later, 1 same year, order not determinable · 7 only as an assembly brick
1812.11941 (2018-12)
High Quality Monocular Depth Estimation via Transfer Learning
1904.01538 (2019-04)
Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset
1907.11628 (2019-07)
Unsupervised Learning for Optical Flow Estimation Using Pyramid Convolution LSTM
and 157 more not named here
create_window 52 other papers
39 dated earlier, 2 the same month, 11 later · 5 only as an assembly brick
1904.01538 (2019-04)
Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset
1907.11628 (2019-07)
Unsupervised Learning for Optical Flow Estimation Using Pyramid Convolution LSTM
2002.11616 (2020-02)
Zooming Slow-Mo: Fast and Accurate One-Stage Space-Time Video Super-Resolution
and 49 more not named here
normalize_flatten_features 4 other papers
4 dated earlier
2006.12655 (2020-06)
Perceptual Adversarial Robustness: Defense Against Unseen Threat Models
2209.05785 (2022-09)
Adversarial Coreset Selection for Efficient Robust Training
2210.09852 (2022-10)
Scaling Adversarial Training to Large Perturbation Bounds
and 1 more not named here

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

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 is a kind of defense technique that can defend against various unseen adversarial attacks without modifying the victim classifier. Existing methods often depend on external generative models or cooperation between auxiliary functions and victim classifiers. However, retraining generative models, auxiliary functions, or victim classifiers relies on the domain of the fine-tuned dataset and is computationconsuming. In this work, we suppose that adversarial images are outliers of the natural image manifold, and the purification process can be considered as returning them to this manifold. Following this assumption, we present a simple adversarial purification method without further training to purify adversarial images, called ZeroPur. ZeroPur contains two steps: given an adversarial example, Guided Shift obtains the shifted embedding of the adversarial example by the guidance of its blurred counterparts; after that, Adaptive Projection constructs a directional vector by this shifted embedding to provide momentum, projecting adversarial images onto the manifold adaptively. ZeroPur is independent of external models and requires no retraining of victim classifiers or auxiliary functions, relying solely on victim classifiers themselves to achieve purification. Extensive experiments on three datasets (CIFAR-10, CIFAR-100, and ImageNet-1K) using various classifier architectures (ResNet, WideResNet) demonstrate that our method achieves state-of-theart robust performance. The source code is publicly available at: https://github.com/erhul/ZeroPur.

For agents

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

get_harvested_code_for_paper("2406.03143")
get_code_for_paper("2406.03143")
have("2406.03143")

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

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

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

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

Connect an agent — have() is free.