Papers › ZeroPur: Succinct Training-Free Adversarial Purification

ZeroPur: Succinct Training-Free Adversarial Purification

5 Jun 2024arXiv:2406.03143archive 2025-07-28

Erhu Liu, Zonglin Yang, Bo Liu, Bin Xiao, Xiuli Bi

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 computation-consuming. 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-the-art robust performance. The code will be publicly available.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.03143")

Code

Syntology Ran 7 of 13 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 7 ran with no contract checked.

By repository: found in paper text by Syntology: 13 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

fra31/auto-attack officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 7 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

7ran
6unverified

Licence: 13 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from erhul/ZeroPur. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

create_window erhul/ZeroPur/peceptual/distances.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · 7fad0aef219ec2a6 · report
gaussian erhul/ZeroPur/peceptual/distances.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · a945dca82afbbec0 · report
get_pred erhul/ZeroPur/utils.py found in paper text by Syntology ran no licence file found · pointer only · 5105d577deca7c37 · report
get_transforms erhul/ZeroPur/utils.py found in paper text by Syntology ran no licence file found · pointer only · f01fff0fc0c2503d · report
normalize_flatten_features erhul/ZeroPur/peceptual/distances.py found in paper text by Syntology ran no licence file found · pointer only · 096fecc8a890169a · report
run_attack_with_random_targets erhul/ZeroPur/stadv_eot/attacks.py found in paper text by Syntology ran no licence file found · pointer only · 984b130647734ed0 · report
select_random_neighbor erhul/ZeroPur/transformations/quilting_fast.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · 4df8b47f5cfc0bd1 · report
generate_patches erhul/ZeroPur/transformations/quilting_fast.py found in paper text by Syntology unverified no licence file found · pointer only · d79c1f192b2849e2 · report
generate_quilted_images erhul/ZeroPur/transformations/quilting_fast.py found in paper text by Syntology unverified no licence file found · pointer only · 28464a7d42500331 · report
get_accuracy erhul/ZeroPur/utils.py found in paper text by Syntology unverified no licence file found · pointer only · fa9947c95b2f3518 · report
get_lpips_model erhul/ZeroPur/peceptual/misc.py found in paper text by Syntology unverified no licence file found · pointer only · 84d62d2d23039e48 · report
get_self_lpips_model erhul/ZeroPur/peceptual/misc.py found in paper text by Syntology unverified no licence file found · pointer only · cbb5e6f16de9abd7 · report
set_loader erhul/ZeroPur/comparison.py found in paper text by Syntology unverified no licence file found · pointer only · 38e917a54ba28703 · report

Tasks

Adversarial Purification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections