Table of Contents
Fetching ...

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

TL;DR

This work reconsiders diffusion-based purification (DBP) robustness, arguing that intrinsic stochasticity in the diffusion process, not solely the forward diffusion’s distribution-gap reduction, is the main driver of robustness. By introducing Deterministic White-box (DW-box) attacks, the authors demonstrate that removing stochasticity weakens DBP defenses, and that attack trajectories rely on stochastic gradients rather than flat loss landscapes. To enhance robustness, they propose Adversarial Denoising Diffusion Training (ADDT) and Rank-Based Gaussian Mapping (RBGM), which inject adversarial perturbations into diffusion training in a Gaussian-mymmetric way that preserves diffusion training dynamics. Extensive experiments across CIFAR-10/100, Tiny-ImageNet, and ImageNet-1k show ADDT improves robustness for multiple DBP variants and classifiers, while ablations highlight RBGM’s role in maintaining image fidelity and CGPO’s effectiveness. The paper concludes that future DBP research should disentangle stochasticity-based from purification-based robustness and explore complementary strategies for both to achieve stronger, scalable defenses.

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.

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

TL;DR

This work reconsiders diffusion-based purification (DBP) robustness, arguing that intrinsic stochasticity in the diffusion process, not solely the forward diffusion’s distribution-gap reduction, is the main driver of robustness. By introducing Deterministic White-box (DW-box) attacks, the authors demonstrate that removing stochasticity weakens DBP defenses, and that attack trajectories rely on stochastic gradients rather than flat loss landscapes. To enhance robustness, they propose Adversarial Denoising Diffusion Training (ADDT) and Rank-Based Gaussian Mapping (RBGM), which inject adversarial perturbations into diffusion training in a Gaussian-mymmetric way that preserves diffusion training dynamics. Extensive experiments across CIFAR-10/100, Tiny-ImageNet, and ImageNet-1k show ADDT improves robustness for multiple DBP variants and classifiers, while ablations highlight RBGM’s role in maintaining image fidelity and CGPO’s effectiveness. The paper concludes that future DBP research should disentangle stochasticity-based from purification-based robustness and explore complementary strategies for both to achieve stronger, scalable defenses.

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.
Paper Structure (54 sections, 24 equations, 11 figures, 23 tables, 1 algorithm)

This paper contains 54 sections, 24 equations, 11 figures, 23 tables, 1 algorithm.

Figures (11)

  • Figure 1: Comparison of attack trajectories under different evaluation settings. The attack trajectory in the standard white-box setting significantly deviates from the DW-box trajectory and demonstrates lower effectiveness.
  • Figure 2: DPDDPM and DPDDIM robust accuracy under different attack settings on CIFAR-10. Both models lose most of their robustness only when the attacker knows all stochastic elements (highlighted in bold: DWBoth-box for DPDDPM/DPDDIM and DWFwd-box for DPDDIM).
  • Figure 3: Visualisation of attack trajectories for White-box-EoT attacks and DW-box attacks on the loss landscape. The loss landscape is steep in the direction of the DW-box attack. The plot is based on the first 128 images of CIFAR-10.
  • Figure 4: Overview of Adversarial Denoising Diffusion Training (ADDT). ADDT alternates between a CGPO step (left grey box) to refine the perturbations with a frozen diffusion model and classifier, and a training step (right grey box) to update the diffusion model with the refined perturbation. Throughout the process, RBGM is used to make the perturbation more "Gaussian-like".
  • Figure 5: Rank-Based Gaussian Mapping. RBGM trims the input to follow Gaussian distribution. It samples a Gaussian noise and then replaces elements in the input with corresponding values from the noise, based on matching ranks.
  • ...and 6 more figures