Adversarial guided diffusion models for adversarial purification

Guang Lin, Zerui Tao, Jianhai Zhang, Toshihisa Tanaka, Qibin Zhao

TL;DR

This paper introduces Adversarial Guided Diffusion Models (AGDM) for adversarial purification, a technique to remove malicious perturbations from images. AGDM enhances existing diffusion model-based purification by incorporating a novel adversarial guidance mechanism that preserves image semantics while effectively removing adversarial noise, leading to improved robustness against various attacks.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are notoriously vulnerable to adversarial examples – subtly modified inputs that cause misclassifications. Adversarial purification (AP) offers a promising defense by removing these perturbations before feeding images to a classifier. While diffusion models (DMs) have shown great potential for AP, they often struggle to balance removing adversarial noise with preserving the original image's semantic information. Existing methods that try to guide DMs often rely on distance measures that can inadvertently preserve some adversarial perturbations, leading to suboptimal robustness. This paper addresses the challenge of achieving effective adversarial purification that simultaneously removes perturbations and maintains semantic integrity, thereby enhancing overall model robustness.

Methods

The core innovation of this work is the Adversarial Guided Diffusion Model (AGDM). Unlike previous methods that might use pixel-level distances or rely on the classifier's confidence, AGDM introduces a novel adversarial guidance during the reverse diffusion process. This guidance is learned by an auxiliary neural network trained adversarially. This network maps data into latent representations, and the guidance encourages purified examples to align with the clean examples in these latent spaces, rather than in pixel space. This approach aims to preserve semantic information without explicitly involving adversarial perturbations, thus avoiding the preservation of residual noise. The guidance is incorporated into the reverse process of the diffusion model by modifying the sampling step, effectively steering the denoising process towards cleaner, semantically consistent outputs.

Datasets

The authors evaluated their method on the following datasets:

  • CIFAR-10
  • CIFAR-100
  • ImageNet

Key Insights and Ideas

  • Latent Space Guidance is Key: The paper highlights that guiding diffusion models in the latent representation space, rather than pixel space, is crucial for preserving semantic information while removing adversarial perturbations.
  • Adversarial Training for Guidance: Training an auxiliary network adversarially to generate this guidance is more robust than methods relying on direct distance measures or classifier confidence, which can be manipulated by attackers.
  • Balancing Act: The fundamental challenge in adversarial purification is the trade-off between removing perturbations and preserving semantic information. AGDM offers a principled way to navigate this trade-off.
  • Guidance, Not Retraining: AGDM's approach of adding guidance to existing pre-trained diffusion models is computationally more efficient than methods that require fine-tuning the entire diffusion model or retraining the classifier.

Key Results

The AGDM method demonstrated significant improvements in adversarial purification:

  • On CIFAR-10, AGDM achieved an average robust accuracy improvement of up to 7.30% compared to existing DM-based AP methods.
  • Under AutoAttack, AGDM improved robust accuracy by up to 8.26% compared to vanilla DMs and 5.27% on CIFAR-10 and 13.57% on CIFAR-100 compared to the second-best method.
  • The method showed strong generalization capabilities against unseen attacks.
  • Qualitative results (Figures 4 and 5) visually confirm that AGDM effectively removes adversarial perturbations while preserving the semantic content of the images.

Limitations and Future Work

  • Time-Consuming Reverse Process: Similar to other diffusion model-based methods, AGDM's reverse process is computationally intensive, making it time-consuming.
  • Theoretical Justification: The authors acknowledge that their current approach is heuristic and suggest future work to provide more comprehensive theoretical justifications for the adversarial guidance.
  • Faster Sampling: Exploring more reliable and faster sampling strategies for AGDM is identified as an important future research direction.

Summary updated

BibTeX
@article{lin2025adversarial,
  author = {Guang Lin and Zerui Tao and Jianhai Zhang and Toshihisa Tanaka and Qibin Zhao},
  title = {{Adversarial guided diffusion models for adversarial purification}},
  journal = {Neural Networks},
  year = {2025},
  doi = {10.1016/j.neunet.2025.107705},
}
Figure