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.
