How Do Diffusion Models Improve Adversarial Robustness?
Liu Yuezhang, Xue-Xin Wei
TL;DR
Diffusion-model-based adversarial purification does not merely denoise; this work systematically uncovers the mechanisms behind observed robustness. By dissecting randomness, measuring how purification moves inputs in $\ell_p$ space, and introducing a compression-rate metric, it shows that (i) internal randomness largely drives purification outputs, (ii) a deterministic compression of image space correlates with robust accuracy, and (iii) removing randomness substantially reduces reported gains. The authors demonstrate that prior robustness estimates were inflated by stochasticity and that, under fixed randomness, the true robustness on CIFAR-10 drops to $23.7\%$ and to $29.5\%$ on ImageNet, highlighting a principled, gradient-free predictor via compression rate. They propose a compression-based purification framework and provide actionable guidance for designing more reliable adversarial purification systems with strong clean accuracy at anchor points and meaningful input-space compression around them.
Abstract
Recent findings suggest that diffusion models significantly enhance empirical adversarial robustness. While some intuitive explanations have been proposed, the precise mechanisms underlying these improvements remain unclear. In this work, we systematically investigate how and how well diffusion models improve adversarial robustness. First, we observe that diffusion models intriguingly increase, rather than decrease, the $\ell_p$ distance to clean samples--challenging the intuition that purification denoises inputs closer to the original data. Second, we find that the purified images are heavily influenced by the internal randomness of diffusion models, where a compression effect arises within each randomness configuration. Motivated by this observation, we evaluate robustness under fixed randomness and find that the improvement drops to approximately 24% on CIFAR-10--substantially lower than prior reports approaching 70%. Importantly, we show that this remaining robustness gain strongly correlates with the model's ability to compress the input space, revealing the compression rate as a reliable robustness indicator without requiring gradient-based analysis. Our findings provide novel insights into the mechanisms underlying diffusion-based purification, and offer guidance for developing more effective and principled adversarial purification systems.
