Papers › Rethinking PGD Attack: Is Sign Function Necessary?

Rethinking PGD Attack: Is Sign Function Necessary?

3 Dec 2023arXiv:2312.01260archive 2025-07-28

Junjie Yang, Tianlong Chen, Xuxi Chen, Zhangyang Wang, Yingbin Liang

Neural networks have demonstrated success in various domains, yet their performance can be significantly degraded by even a small input perturbation. Consequently, the construction of such perturbations, known as adversarial attacks, has gained significant attention, many of which fall within "white-box" scenarios where we have full access to the neural network. Existing attack algorithms, such as the projected gradient descent (PGD), commonly take the sign function on the raw gradient before updating adversarial inputs, thereby neglecting gradient magnitude information. In this paper, we present a theoretical analysis of how such sign-based update algorithm influences step-wise attack performance, as well as its caveat. We also interpret why previous attempts of directly using raw gradients failed. Based on that, we further propose a new raw gradient descent (RGD) algorithm that eliminates the use of sign. Specifically, we convert the constrained optimization problem into an unconstrained one, by introducing a new hidden variable of non-clipped perturbation that can move beyond the constraint. The effectiveness of the proposed RGD algorithm has been demonstrated extensively in experiments, outperforming PGD and other competitors in various settings, without incurring any additional computational overhead. The codes is available in https://github.com/JunjieYang97/RGD.

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="2312.01260")

Code

Syntology Ran 9 of 10 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 6 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

junjieyang97/rgd officialmentioned in papermentioned on GitHubpytorchLGPL-3.0 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

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

2ran · our draft was wrong
1ran · fixture could not drive it
6ran
1unverified

Licence: 10 of the 10 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 junjieyang97/rgd. “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.

L1_norm junjieyang97/rgd/autoattack/other_utils.py official repository ran · our draft was wrong fingerprinted LGPL-3.0 (copyleft) · pointer only · edab3f9c146ad457 · report
L1_projection junjieyang97/rgd/autoattack/autopgd_base.py official repository ran · our draft was wrong fingerprinted LGPL-3.0 (copyleft) · pointer only · 7325c49fd8c6a7d2 · report
L2_norm junjieyang97/rgd/autoattack/other_utils.py official repository ran · fixture could not drive it fingerprinted LGPL-3.0 (copyleft) · pointer only · fa19820305aabe1d · report
check_imgs junjieyang97/rgd/autoattack/other_utils.py official repository ran LGPL-3.0 (copyleft) · pointer only · 77fd60953273db9a · report
check_range_output junjieyang97/rgd/autoattack/checks.py official repository ran LGPL-3.0 (copyleft) · pointer only · 5d7ff050610414d0 · report
get_cifar10_test_loader junjieyang97/rgd/attack.py official repository ran LGPL-3.0 (copyleft) · pointer only · f73ae9cbfd1838f6 · report
projection_l1 junjieyang97/rgd/autoattack/fab_projections.py official repository ran fingerprinted LGPL-3.0 (copyleft) · pointer only · 9647e1400ee744e4 · report
projection_l2 junjieyang97/rgd/autoattack/fab_projections.py official repository ran fingerprinted LGPL-3.0 (copyleft) · pointer only · a345677b413ef5ca · report
projection_linf junjieyang97/rgd/autoattack/fab_projections.py official repository ran fingerprinted LGPL-3.0 (copyleft) · pointer only · b8bdb6e496b4b5fa · report
get_cifar100_test_loader junjieyang97/rgd/attack.py official repository unverified LGPL-3.0 (copyleft) · pointer only · 2d5dc7a04c57cafa · report

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