DensePure: Understanding Diffusion Models for Adversarial Robustness
Chaowei Xiao, Zhongzhu Chen, Kun Jin, Jiongxiao Wang, Weili Nie, Mingyan Liu, Anima Anandkumar, Bo Li, Dawn Song
Abstract
Diffusion models have been recently employed to improve certified robustness through the process of denoising. However, the theoretical understanding of why diffusion models are able to improve the certified robustness is still lacking, preventing from further improvement. In this study, we close this gap by analyzing the fundamental properties of diffusion models and establishing the conditions under which they can enhance certified robustness. This deeper understanding allows us to propose a new method DensePure, designed to improve the certified robustness of a pretrained model (i.e. classifier). Given an (adversarial) input, DensePure consists of multiple runs of denoising via the reverse process of the diffusion model (with different random seeds) to get multiple reversed samples, which are then passed through the classifier, followed by majority voting of inferred labels to make the final prediction. This design of using multiple runs of denoising is informed by our theoretical analysis of the conditional distribution of the reversed sample. Specifically, when the data density of a clean sample is high, its conditional density under the reverse process in a diffusion model is also high; thus sampling from the latter conditional distribution can purify the adversarial example and return the corresponding clean sample with a high probability. By using the highest density point in the conditional distribution as the reversed sample, we identify the robust region of a given instance under the diffusion model's reverse process. We show that this robust region is a union of multiple convex sets, and is potentially much larger than the robust regions identified in previous works. In practice, DensePure can approximate the label of the high density region in the conditional distribution so that it can enhance certified robustness. We conduct extensive experiments to demonstrate the effectiveness of DensePure by evaluating its certified robustness given a standard model via randomized smoothing. We show that DensePure is consistently better than existing methods on ImageNet, with 7% improvement on average.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 5115e351-6214-4ced-8541-9f7983c21bfdCited by top-tier papers18
- Diffusion-Based Adversarial Sample Generation for Improved Stealthiness and ControllabilityHaotian Xue, Alexandre Araujo, Bin Hu, Yongxin ChenNeurIPS 2023 · 110 citations
- Robust Classification via a Single Diffusion ModelHuanran Chen, Yinpeng Dong, Zhengyi Wang, Xiao Yang et al.ICML 2024 · 94 citations
- Diffusion Models are Certifiably Robust ClassifiersHuanran Chen, Yinpeng Dong, Shitong Shao, Zhongkai Hao et al.NeurIPS 2024 · 42 citations
- Diffusion Models Demand Contrastive Guidance for Adversarial Purification to AdvanceMingyuan Bai, Wei Huang, Tenghui Li, Andong Wang et al.ICML 2024 · 18 citations
- Multi-scale Diffusion Denoised SmoothingJongheon Jeong, Jinwoo ShinNeurIPS 2023 · 15 citations
Builds on18
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- 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
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- Improved Denoising Diffusion Probabilistic ModelsAlexander Quinn Nichol, Prafulla DhariwalICML 2021 · 5,234 citations
- Score-Based Generative Modeling through Stochastic Differential EquationsYang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar et al.ICLR 2021 · 1,270 citations
Related papers
- DiffSmooth: Certifiably Robust Learning via Diffusion Models and Local SmoothingJiawei Zhang, Zhongzhu Chen, Huan Zhang, Chaowei Xiao et al.USENIX Security 2023
- Watch the Watchers! On the Security Risks of Robustness-Enhancing Diffusion ModelsChangjiang Li, Ren Pang, Bochuan Cao, Jinghui Chen et al.USENIX Security 2025
- (Certified!!) Adversarial Robustness for Free!Nicholas Carlini, Florian Tramèr, Krishnamurthy (Dj) Dvijotham, Leslie Rice et al.ICLR 2023 · 17 citations
- Diffusion Models for Adversarial PurificationWeili Nie, Brandon Guo, Yujia Huang, Chaowei Xiao et al.ICML 2022 · 663 citations
- Robust Representation Consistency Model via Contrastive DenoisingJiachen Lei, Julius Berner, Jiongxiao Wang, Zhongzhu Chen et al.ICLR 2025
