Diffusion Models are Certifiably Robust Classifiers

Huanran Chen, Yinpeng Dong, Shitong Shao, Zhongkai Hao, Xiao Yang +2 more
2/3/2026

No official code found. Best implementation: huanranchen/NoisedDiffusionClassifiers (18 stars, last commit 2024-02-02).

Abstract

Generative learning, recognized for its effective modeling of data distributions, offers inherent advantages in handling out-of-distribution instances, especially for enhancing robustness to adversarial attacks. Among these, diffusion classifiers, utilizing powerful diffusion models, have demonstrated superior empirical robustness. However, a comprehensive theoretical understanding of their robustness is still lacking, raising concerns about their vulnerability to stronger future attacks. In this study, we prove that diffusion classifiers possess $O(1)$ Lipschitzness, and establish their certified robustness, demonstrating their inherent resilience. To achieve non-constant Lipschitzness, thereby obtaining much tighter certified robustness, we generalize diffusion classifiers to classify Gaussian-corrupted data. This involves deriving the evidence lower bounds (ELBOs) for these distributions, approximating the likelihood using the ELBO, and calculating classification probabilities via Bayes' theorem. Experimental results show the superior certified robustness of these Noised Diffusion Classifiers (NDCs). Notably, we achieve over 80% and 70% certified robustness on CIFAR-10 under adversarial perturbations with \(\ell_2\) norms less than 0.25 and 0.5, respectively, using a single off-the-shelf diffusion model without any additional data.

View on arXivView PDF

Code Implementations(1)

Official code implement of "Your Diffusion Model is Secretly a Certifiably Robust Classifier"

181C++, CudaFeb 2, 20242 years ago

Similar Papers

Cite this paper

@article{chen2026diffusion,
  title  = {Diffusion Models are Certifiably Robust Classifiers},
  author = {Huanran Chen and Yinpeng Dong and Shitong Shao and Zhongkai Hao and Xiao Yang and Hang Su and Jun Zhu},
  year   = {2026},
  eprint = {2402.02316},
  archivePrefix = {arXiv},
  doi    = {10.52202/079017-1584},
  url    = {https://arxiv.org/abs/2402.02316},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.02316.svg)](https://codeofpaper.com/paper/2402.02316)

Discussion