Lune

ICLR2025Top-tier venue

Towards Understanding the Robustness of Diffusion-Based Purification: A Stochastic Perspective

Yiming Liu, Kezhao Liu, Yao Xiao, Ziyi Dong, Xiaogang Xu, Pengxu Wei, Liang Lin

Abstract

Diffusion-Based Purification (DBP) has emerged as an effective defense mechanism against adversarial attacks. The success of DBP is often attributed to the forward diffusion process, which reduces the distribution gap between clean and adversarial images by adding Gaussian noise. While this explanation is theoretically sound, the exact role of this mechanism in enhancing robustness remains unclear. In this paper, through empirical analysis, we propose that the intrinsic stochasticity in the DBP process is the primary factor driving robustness. To test this hypothesis, we introduce a novel Deterministic White-Box (DW-box) setting to assess robustness in the absence of stochasticity, and we analyze attack trajectories and loss landscapes. Our results suggest that DBP models primarily rely on stochasticity to avoid effective attack directions, while their ability to purify adversarial perturbations may be limited. To further enhance the robustness of DBP models, we propose Adversarial Denoising Diffusion Training (ADDT), which incorporates classifier-guided adversarial perturbations into the diffusion training process, thereby strengthening the models' ability to purify adversarial perturbations. Additionally, we propose Rank-Based Gaussian Mapping (RBGM) to improve the compatibility of perturbations with diffusion models. Experimental results validate the effectiveness of ADDT. In conclusion, our study suggests that future research on DBP can benefit from a clearer distinction between stochasticity-driven and purification-driven robustness. Recently, diffusion-based purification (DBP) (Nie et al., 2022) has emerged as a promising defense against adversarial attacks. Existing studies suggest that DBP robustness primarily stems from the forward diffusion process, which reduces the distribution gap between clean and adversarial images by applying Gaussian noise (Nie et al., 2022; Wang et al., 2022) . While this reduction is theoretically supported, its contribution to DBP robustness has not been sufficiently validated through empirical studies. Additionally, experimental results suggest that the stochastic nature of DBP might also play a significant role in enhancing its robustness (Nie et al., 2022) . In this paper, we present a new perspective that emphasizes the role of stochasticity throughout the DBP process as a key contributor to its robustness, challenging the traditional focus on the forward diffusion process. To assess the impact of stochasticity, we propose a Deterministic White-box (DW-box) attack setting, in which the attacker has complete knowledge of both the model parameters and the stochastic elements. Our findings reveal that DBP models experience a significant loss of robustness when the process is made entirely deterministic from the attacker's perspective. Further analysis of attack trajectories and the loss landscape shows that DBP models do not defend against adversarial perturbations by relying on a flat loss landscape, as is common in adversarial training (AT) (Madry et al., 2018) ; instead, they leverage stochasticity to bypass the most effective attack directions, as illustrated in Figure 1 . Building on this new perspective of DBP robustness, we hypothesize that strengthening the diffusion model's ability to purify adversarial perturbations could further improve the robustness. To test this hypothesis, we propose Adversarial Denoising Diffusion Training (ADDT) for DBP models. This method follows an iterative two-step process: first, the Classifier-Guided Perturbation Optimization (CGPO) step generates adversarial perturbations; then, the diffusion model training step updates the parameters of the diffusion model using these perturbations. To better integrate these perturbations into the diffusion framework, we propose Rank-Based Gaussian Mapping (RBGM), which adjusts the adversarial perturbations to more closely resemble Gaussian noise, in line with the theoretical foundation of diffusion models. Experiments confirm that ADDT consistently enhances the robustness of DBP models. Through further empirical analysis and discussion, we argue that future research on DBP should separate the robustness derived from stochasticity and that achieved through purification. This distinction points to two complementary directions for improving DBP: (1) enhancing its ability to purify adversarial perturbations through efficient training methods, and (2) defending against Expectation over Transformation (EoT) attacks (Athalye et al., 2018b) by increasing the variance of attack gradients. Our main contributions are as follows: • We offer a novel perspective on DBP robustness, highlighting the crucial role of stochasticity while challenging the conventional, purification-based view that robustness primarily arises from distribution gap reduction during the forward diffusion process. • We introduce a new Determini

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Improved Denoising Diffusion Probabilistic Models cites Denoising Diffusion Probabilistic Models
  • Improved Denoising Diffusion Probabilistic Models cites Denoising Diffusion Implicit Models
  • DiffBreak: Is Diffusion-Based Purification Robust? cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • DiffBreak: Is Diffusion-Based Purification Robust? cites Denoising Diffusion Probabilistic Models
  • Steganography Beyond Pixels: Reimagining Image Steganography as Cross-Modal Linguistic Communication cites Denoising Diffusion Probabilistic Models
  • Steganography Beyond Pixels: Reimagining Image Steganography as Cross-Modal Linguistic Communication cites Denoising Diffusion Implicit Models
  • Why Adversarially Train Diffusion Models? cites Improved Denoising Diffusion Probabilistic Models
  • Why Adversarially Train Diffusion Models? cites Denoising Diffusion Probabilistic Models
  • Why Adversarially Train Diffusion Models? cites Denoising Diffusion Implicit Models
  • Denoising Diffusion Implicit Models cites Denoising Diffusion Probabilistic Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. DiffBreak: Is Diffusion-Based Purification Robust?Andre Kassis, Urs Hengartner, Yaoliang YuNeurIPS 2025 · 8 citations
  2. Steganography Beyond Pixels: Reimagining Image Steganography as Cross-Modal Linguistic CommunicationLijing Ren, Denghui ZhangACL 2026
  3. Why Adversarially Train Diffusion Models?Maria Rosaria Briglia, Mujtaba Hussain Mirza, Giuseppe Lisanti, Iacopo MasiICLR 2026

Builds on18

  1. Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
  4. Robust Speech Recognition via Large-Scale Weak SupervisionAlec Radford, Jong Wook Kim, Tao Xu, Greg Brockman et al.ICML 2023 · 6,966 citations
  5. Improved Denoising Diffusion Probabilistic ModelsAlexander Quinn Nichol, Prafulla DhariwalICML 2021 · 5,234 citations

Related papers

  1. ADBM: Adversarial Diffusion Bridge Model for Reliable Adversarial PurificationXiao Li, Wenxuan Sun, Huanran Chen, Qiongxiu Li et al.ICLR 2025
  2. Robust Evaluation of Diffusion-Based Adversarial PurificationMinjong Lee, Dongwoo KimICCV 2023 · 96 citations
  3. Diffusion Models Demand Contrastive Guidance for Adversarial Purification to AdvanceMingyuan Bai, Wei Huang, Tenghui Li, Andong Wang et al.ICML 2024 · 18 citations
  4. Watch the Watchers! On the Security Risks of Robustness-Enhancing Diffusion ModelsChangjiang Li, Ren Pang, Bochuan Cao, Jinghui Chen et al.USENIX Security 2025
  5. DiffAttack: Evasion Attacks Against Diffusion-Based Adversarial PurificationMintong Kang, Dawn Song, Bo LiNeurIPS 2023 · 66 citations
Dusk over the sea between two cliffs drawn in fine vertical lines