AdvDiffuser: Natural Adversarial Example Synthesis with Diffusion Models

Xinquan Chen, Xitong Gao, Juanjuan Zhao, Kejiang Ye, Cheng-Zhong Xu

Introduction

Traditional adversarial attacks typically rely on a tiny "perturbation budget" (measured by $\ell_p$ norms) to ensure changes are invisible. However, these mathematical bounds often fail to align with human perception; a human can easily recognize an image even if every pixel has been shifted, provided the semantic meaning remains intact.

This discrepancy has led to the study of Unrestricted Adversarial Examples (UAEs), which can undergo significant changes as long as they remain "semantically plausible." Previous attempts to generate UAEs using Generative Adversarial Networks (GANs) or Variational Autoencoders (VAEs) often struggled with quality, producing blurry images or unnatural artifacts. AdvDiffuser bridges this gap by leveraging diffusion models to create adversarial images that are virtually indistinguishable from real data.

Methodology

AdvDiffuser introduces two primary technical innovations to the standard diffusion pipeline to ensure both high attack success and visual naturalness.

The AdvDiffuser framework, highlighting the Adversarial Inpainting and Adversarial Guidance modules.

1. Adversarial Guidance

During the reverse diffusion (denoising) process, the algorithm performs a saddle-point optimization at each timestep. It steers the latent code to satisfy two conditions: staying on the natural data manifold (via the diffusion model) and maximizing the loss of a target classifier (via a PGD-like attack). This ensures the final output is both a "real-looking" image and a successful adversarial sample.

2. Adversarial Inpainting

To prevent the attack from distorting the most important parts of an image, AdvDiffuser uses Grad-CAM (Gradient-weighted Class Activation Mapping) to identify salient regions. It then applies a mask that preserves the core object's features while allowing adversarial noise to be concentrated in less critical areas or blended into background textures.

Experimental Results

The researchers evaluated AdvDiffuser across three standard computer vision benchmarks: CIFAR-10, CelebA, and ImageNet, testing against top-tier models from the RobustBench leaderboard.

Visual Fidelity and Stealth

Compared to previous state-of-the-art methods like GA-attack, AdvDiffuser produced images with 6x smaller LPIPS perturbations and 2-3x better FID scores. As illustrated in the visual comparisons, AdvDiffuser maintains the clarity and color profile of the original images far better than GA-FSA or GA-PGD, which often introduce noticeable haze or artifacts.

Visual comparison of AdvDiffuser against other unrestricted adversarial attack methods (GA-FSA, GA-PGD) and the original images.

Attack Success and Robustness

AdvDiffuser achieved a near 100% success rate against the most robust models on CIFAR-10. Furthermore, the study found that training models on these high-quality UAEs significantly improved their robustness against "unseen" threat models, such as JPEG corruption or color shifts, suggesting that AdvDiffuser captures fundamental aspects of model vulnerability.

Conclusion

AdvDiffuser demonstrates that diffusion models are a superior backbone for stealthy adversarial attacks due to their inherent denoising objectives that naturally remove "unnatural" components. While diffusion-based sampling is more computationally intensive than simple gradient-based attacks, the resulting gains in visual fidelity and the potential for enhancing model robustness through high-quality synthesis represent a significant advancement in the field of AI security.

Summary updated

Abstract

Previous work on adversarial examples typically involves a fixed norm perturbation budget, which fails to capture the way humans perceive perturbations. Recent work has shifted towards natural unrestricted adversarial examples (UAEs) that breaks ℓp perturbation bounds but nonetheless remain semantically plausible. Current methods use GAN or VAE to generate UAEs by perturbing latent codes. However, this leads to loss of high-level information, resulting in low-quality and unnatural UAEs. In light of this, we propose AdvDiffuser, a new method for synthesizing natural UAEs using diffusion models. It can generate UAEs from scratch or conditionally based on reference images. To generate natural UAEs, we perturb predicted images to steer their latent code towards the adversarial sample space of a particular classifier. We also propose adversarial inpainting based on class activation mapping to retain the salient regions of the image while perturbing less important areas. On CIFAR-10, CelebA and ImageNet, we demonstrate that it can defeat the most robust models on the RobustBench leaderboard with near 100% success rates. Furthermore, The synthesized UAEs are not only more natural but also stronger compared to the current state-of-the-art attacks. Specifically, compared with GA-attack, the UAEs generated with AdvDiffuser exhibit 6× smaller LPIPS perturbations, 2 ~ 3× smaller FID scores and 0.28 higher in SSIM metrics, making them perceptually stealthier. Finally, adversarial training with AdvDiffuser further improves the model robustness against attacks with unseen threat models.1
BibTeX
@inproceedings{chen2023advdiffuser,
  author = {Xinquan Chen and Xitong Gao and Juanjuan Zhao and Kejiang Ye and Cheng-Zhong Xu},
  title = {{AdvDiffuser: Natural Adversarial Example Synthesis with Diffusion Models}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.00421},
}
Figure