Abstract
Robustness against image perturbations bounded by a $\ell_p$ ball have been well-studied in recent literature. Perturbations in the real-world, however, rarely exhibit the pixel independence that $\ell_p$ threat models assume. A recently proposed Wasserstein distance-bounded threat model is a promising alternative that limits the perturbation to pixel mass movements. We point out and rectify flaws in previous definition of the Wasserstein threat model and explore stronger attacks and defenses under our better-defined framework. Lastly, we discuss the inability of current Wasserstein-robust models in defending against perturbations seen in the real world. Our code and trained models are available at https://github.com/edwardjhu/improved_wasserstein .
Introduction
Standard adversarial attacks typically bound perturbations using $\ell_p$ norms. However, $\ell_p$ threat models assume pixels are perturbed independently, which fails to capture realistic, real-world image corruptions like translations, rotations, or blurring. To address this, prior work (Wong et al., 2019) proposed using the Wasserstein distance—which measures the "cost" of moving pixel mass from one part of an image to another—as a more perceptually aligned threat model.
However, we discovered a major flaw in that prior formulation: it only considered normalized images (probability distributions) and ignored total pixel mass. Because of this, a "robust" model could be completely broken simply by dimming the image brightness—a trivial attack with a Wasserstein distance of zero. Furthermore, previous attack algorithms used ad-hoc clamping to keep pixel values in the valid $[0, 1]$ range, which inadvertently pushed the generated adversarial examples outside the allowed Wasserstein budget.
Methodology: A Better Threat Model
To fix the threat model and generate strictly valid adversarial examples, we introduce several key improvements. We explicitly add an $\ell_1$ norm constraint to preserve total pixel mass (brightness) and an $\ell_\infty$ constraint to ensure pixels remain in the valid $[0, 1]$ range.
Constrained Sinkhorn Iteration
Instead of generating an attack and then unsafely clamping the pixels, we modify the entropy-regularized optimal transport projection (Sinkhorn iteration). Our new algorithm projects the perturbed image directly onto the intersection of the Wasserstein ball and the $\ell_\infty$ ball.
Stronger PGD Attacks
We improve the Projected Gradient Descent (PGD) attack itself. Instead of using the sign of the gradient (steepest descent w.r.t. the $\ell_\infty$ norm), we use steepest descent w.r.t. the $\ell_2$ norm and increase the step size. To offset the computational overhead of the new constraints, we initialize the dual variables in the Sinkhorn iteration using the stopping conditions from the previous PGD step, drastically speeding up convergence.
Experimental Results
We evaluated our methods on MNIST and CIFAR-10. Our findings demonstrate that previous defenses were significantly less robust than reported.
Massively Stronger Attacks
The new attack drastically reduces the accuracy of previously defended models. On MNIST (at a Wasserstein radius of $\epsilon=100$), accuracy drops from 94% (under the old attack) to just 39%. On CIFAR-10 (at $\epsilon=100$), it drops from 82% to 20%.
Efficiency and Defense Restoration
Thanks to dual-variable initialization optimizations, our constrained Sinkhorn projection runs in 38 minutes on the MNIST test set, nearly matching the 34 minutes of the flawed, unconstrained original algorithm. By using this stronger attack in an adversarial training loop, we successfully trained new models that are robust to both the old and new attacks.
Discussion and Limitations
Despite being perceptually aligned, simply defending against a Wasserstein adversary does not automatically confer robustness to natural perturbations like translations and rotations. When tested against standard translations and rotations, the Wasserstein-robust models still largely failed (e.g., MNIST accuracy dropped to 49.3% under a 20% translation).
Adversarial training against Wasserstein adversaries currently does not scale to large enough radii to protect against real-world natural perturbations. Furthermore, the local transport plans used to make the math computationally efficient inherently limit the maximum spatial movement the model can handle. Future work should consider adding "smoothness" constraints to the Wasserstein threat model to better simulate real-world physics.
Summary updated