Demystifying Adversarial Robustness in Diffusion Models: Compression, Randomness, and Geometry
On the map: Diffusion models → Robustness, privacy and adversarial aspects
Abstract (arXiv)
Recent studies suggest that diffusion models significantly improve the empirical adversarial robustness of deep neural network models. While intuitive explanations have been proposed, the mechanisms underlying diffusion-based robustness remain largely unclear. This work aims to demystify how diffusion models improve adversarial robustness. We observe that diffusion models surprisingly increase the ℓp distance to clean samples, thus rejecting the hypothesis that purification denoises perturbed images closer to the clean ones. Next, we provide a unifying account of the robustness improvement in diffusion-based purification by decomposing it into two sources: (i) gradient masking induced by randomness; (ii) compression of the image space. First, we find that the purified images are heavily influenced by the internal randomness of diffusion models. This randomness leads to gradient masking that cannot be removed by the previously proposed remedy, i.e., expectation-over-transformation (EOT). The improvement in robustness due to randomness is determined by the cosine similarity of the optimal vs. empirical attack directions, as predicted by a hyperspherical cap model of the adversarial regions. Second, we find that, when fixing the randomness, diffusion models substantially compress the image space. Importantly, we discover a lawful relationship between the model's ability to compress the image space and the genuine adversarial robustness gain. Further theoretical analyses show that convergent score fields encoded in diffusion models explain these compression effects. Our findings reveal new insights into the mechanisms underlying diffusion-based purification, and offer guidance for developing more effective and principled adversarial purification systems.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Robustness, privacy and adversarial aspects, one of 14 directions in Diffusion models. Builds on 47 of its 70 references that are in the map. First posted on arXiv 28 May 2025.
Builds on
47 of 70 references.
Closest ancestors · 11
Same direction, newest first
- 2025FlowPure: Continuous Normalizing Flows for Adversarial Purification19 May
- 2024DiffBreak: Is Diffusion-Based Purification Robust?25 Nov
- 2024ADBM: Adversarial diffusion bridge model for reliable adversarial purification1 Aug
- 2024Towards Understanding the Robustness of Diffusion-Based Purification: A Stochastic Perspective22 Apr
- 2023Robust Classification via a Single Diffusion Model24 May
- 2023Defending against Adversarial Audio via Diffusion Model2 Mar
- 2022Improving Adversarial Robustness by Contrastive Guided Diffusion Process18 Oct
- 2022(Certified!!) Adversarial Robustness for Free!21 Jun
- 2022Guided Diffusion Model for Adversarial Purification30 May
- 2022Diffusion Models for Adversarial Purification16 May
- 2021Adversarial purification with Score-based generative models11 Jun
Other references · 36
- 2020Denoising Diffusion Probabilistic Modelscited by 20,851
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,694
- 2020Denoising Diffusion Implicit Modelscited by 9,655
- 2020Score-Based Generative Modeling through Stochastic Differential Equationscited by 8,964
- 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,185
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2022Flow Matching for Generative Modelingcited by 5,426
- 2013Intriguing properties of neural networkscited by 5,114
- 2022DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Stepscited by 1,961
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,324
24 more
- 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,259
- 2016Practical Black-Box Attacks against Machine Learningcited by 893
- 2017Ensemble Adversarial Training: Attacks and Defensescited by 833
- 2020RobustBench: a standardized adversarial robustness benchmarkcited by 659
- 2019On Evaluating Adversarial Robustnesscited by 442
- 2018Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Modelscited by 362
- 2017Defense against Adversarial Attacks Using High-Level Representation Guided Denoisercited by 329
- 2021The Intrinsic Dimension of Images and Its Impact on Learningcited by 307
- 2019A Fourier Perspective on Model Robustness in Computer Visioncited by 288
- 2017PixelDefend: Leveraging Generative Models to Understand and Defend against Adversarial Examplescited by 243
- 2020Bag of Tricks for Adversarial Trainingcited by 199
- 2023Generalization in diffusion models arises from geometry-adaptive harmonic representationscited by 179
- 2023Score Approximation, Estimation and Distribution Recovery of Diffusion Models on Low-Dimensional Datacited by 171
- 2017The Space of Transferable Adversarial Examplescited by 156
- 2014Towards Deep Neural Network Architectures Robust to Adversarial Examplescited by 146
- 2021On the Convergence and Robustness of Adversarial Trainingcited by 127
- 2019Adversarial Examples Are a Natural Consequence of Test Error in Noisecited by 114
- 2018Towards the first adversarially robust neural network model on MNISTcited by 104
- 2019advertorch v0.1: An Adversarial Robustness Toolbox based on PyTorchcited by 69
- 2023Robust Evaluation of Diffusion-Based Adversarial Purificationcited by 65
- 2024The Unreasonable Effectiveness of Gaussian Score Approximation for Diffusion Models and its Applicationscited by 32
- 2020Adversarial Robustness of Stabilized NeuralODEs Might be from Obfuscated Gradientscited by 22
- 2022On the Limitations of Stochastic Pre-processing Defensescited by 21
- 2025CLIPure: Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classificationcited by 12
Built on by
Citing papers per year: 2025: 1.
1 paper.
- 2025GCG Attack On A Diffusion LLMcited by 1
- 2025GCG Attack On A Diffusion LLM30 Dec 2025
Similar, not cited
Close in wording, no citation either way
- 2025Diffusion Models are Robust Pretrainers
- 2025Beyond Classification: Evaluating Diffusion Denoised Smoothing for Security-Utility Trade off
- 2022Guided Diffusion Model for Adversarial Purification from Random Noise
- 2023Better Diffusion Models Further Improve Adversarial Training
- 2023On the Robustness of Latent Diffusion Models
- 2024Adversarial Examples are Misaligned in Diffusion Model Manifolds
- 2022DensePure: Understanding Diffusion Models towards Adversarial Robustness
- 2023DiffSmooth: Certifiably Robust Learning via Diffusion Models and Local Smoothing