Abstract
State-of-the-art adversarial attacks on neural networks typically rely on expensive iterative methods and numerous random restarts to explore the image space effectively. Iterative methods like Projected Gradient Descent (PGD) without restarts often trade off performance for computational efficiency, as they are highly sensitive to the choice of step size and prone to getting stuck in local minima. We propose Wide Iterative Stochastic crafting (WITCHcraft), a variant of PGD that utilizes a random, coordinate-wise step size to improve attack performance without the overhead of random restarts. Our method achieves results superior to classical PGD on CIFAR-10 and MNIST benchmarks at no additional computational cost, making it an ideal candidate for real-time applications such as adversarial training.
Introduction
Adversarial attacks—finding small, human-imperceptible perturbations that cause neural networks to misclassify inputs—are essential for evaluating and improving model robustness. The gold standard for generating these perturbations is Projected Gradient Descent (PGD). However, PGD faces two significant hurdles: high sensitivity to the step size parameter and a tendency to stagnate in local minima. To overcome these, researchers often employ "random restarts," running the attack multiple times from different initial points. While effective, this approach multiplies the computational budget, which is often prohibitive during the inner loop of adversarial training.
WITCHcraft addresses these limitations by injecting randomness directly into the optimization step, allowing for better exploration of the image space without the need for multiple runs.
Methodology: Stochastic Coordinate-wise Step Sizes
The core innovation of WITCHcraft is the replacement of a fixed step size with a stochastic, coordinate-wise step size. In standard PGD, every pixel is adjusted by a fixed value $\tau$ in each iteration. In contrast, WITCHcraft samples a unique step size for every single pixel independently at each step.
Specifically, for an expected step size $a$, the step sizes are drawn from a uniform distribution $U(0, 2a)$. This simple modification acts as a form of stochastic preconditioning. By allowing each pixel to move by a different random amount, the algorithm is less likely to oscillate or stagnate, enabling it to "aggressively explore" the complex loss landscape of the neural network.
Experimental Evaluation
The researchers evaluated WITCHcraft against models hardened with state-of-the-art adversarial training on two canonical datasets: CIFAR-10 (using a WideResNet-34-10) and MNIST (using a standard two-layer CNN).
Performance and Efficiency
WITCHcraft consistently outperformed standard PGD at equal computational costs. On CIFAR-10, a 20-step WITCHcraft attack reduced model accuracy to 45.92%, compared to 47.04% for standard PGD. Remarkably, a 100-step WITCHcraft attack (45.20% accuracy) outperformed a 20-step PGD attack with 10 random restarts (45.21%), despite the latter having a similar total budget of gradient updates. This demonstrates that stochastic steps can be more effective than multiple restarts from different initializations.
On the MNIST dataset, the advantage was even more pronounced. As shown in the figure above, WITCHcraft maintains a lower robust accuracy (indicating a stronger attack) across all step counts compared to the fixed-step baseline.
Key Insights
Hyperparameter Immunity
A major practical advantage of WITCHcraft is its reduced sensitivity to the "expected step size" parameter. Tuning the step size for PGD is often a tedious process, as the optimal value can vary between models and datasets. WITCHcraft is significantly more stable across a wide range of parameter choices.
Breaking the Saturation Point
Standard PGD often hits a plateau where increasing the number of iterations yields diminishing returns. Because WITCHcraft injects noise into every update, it continues to improve as more steps are added, suggesting a superior ability to escape local minima that trap deterministic methods.
Conclusion
WITCHcraft provides a simple yet powerful modification to the PGD attack. By replacing fixed step sizes with random, coordinate-wise updates, it achieves the exploratory benefits of random restarts without the associated computational cost. Its robustness to hyperparameter settings and superior performance on standard benchmarks make it a highly efficient tool for both testing robustness and performing adversarial training in real-time.
Summary updated