Skip to main content
QUICK REVIEW

[Paper Review] DensePure: Understanding Diffusion Models towards Adversarial Robustness

Chaowei Xiao, Zhong‐Zhu Chen|arXiv (Cornell University)|Nov 1, 2022
Adversarial Robustness in Machine LearningComputer Science18 citations
TL;DR

DensePure proposes a novel, off-the-shelf method to enhance certified adversarial robustness of pretrained classifiers using diffusion models. By repeatedly denoising an adversarial input via the diffusion model's reverse process with different random seeds and applying majority voting on the classifier outputs, DensePure identifies a robust region composed of multiple convex sets around high-density clean samples, achieving state-of-the-art certified robustness on ImageNet with a 7% average improvement.

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.

Motivation & Objective

  • To theoretically understand why diffusion models enhance certified robustness in adversarial defense.
  • To identify the conditions under which diffusion model reverse processes can reliably recover clean labels from adversarial inputs.
  • To develop a practical, parameter-free method that improves certified robustness without retraining the classifier.
  • To characterize the robust region of a sample under the diffusion model's reverse process as a union of multiple convex sets.
  • To empirically validate that the proposed method outperforms existing approaches in certified robustness on ImageNet and CIFAR-10.

Proposed method

  • DensePure uses the reverse process of a pretrained diffusion model to generate multiple denoised samples from a single adversarial input, each with different random seeds.
  • The method applies the pretrained classifier to each of these denoised samples and uses majority voting to determine the final prediction.
  • Theoretical analysis shows that when the data density of clean samples is high, the conditional density of reversed samples under the diffusion model is also high, enabling reliable recovery of clean labels.
  • The robust region for a given input is characterized as the union of multiple convex sets, each centered around a high-density clean sample, which can be significantly larger than single-neighborhood robust regions.
  • The method uses the highest density point in the conditional distribution as a deterministic proxy for the reversed sample, improving stability and robustness.
  • Fast sampling techniques (e.g., b=2, K=10) are employed to reduce computational cost while maintaining strong certified accuracy.

Experimental results

Research questions

  • RQ1Under what conditions does the reverse process of a diffusion model reliably recover clean data from adversarial inputs?
  • RQ2How does the conditional distribution of reversed samples relate to the data density of clean samples?
  • RQ3Can the robust region of a diffusion-based defense be characterized as a union of multiple convex sets, and how does this compare to prior methods?
  • RQ4Does repeated denoising with diverse random seeds improve certified robustness beyond single-sample denoising?
  • RQ5Can a purely inference-based, non-tuning method like DensePure achieve state-of-the-art certified robustness on ImageNet?

Key findings

  • DensePure achieves a 7% average improvement in certified robustness on ImageNet compared to existing methods, including the prior SOTA from Carlini et al. (2022).
  • On ImageNet with ViT-B/16, DensePure achieves 92.0% certified accuracy at ϵ=2.0, outperforming the previous SOTA of 90.0%.
  • For the BEiT backbone on ImageNet, DensePure achieves 80.0% certified accuracy at ϵ=2.0, compared to 77.0% for the prior SOTA.
  • The robust region identified by DensePure is a union of multiple convex sets, which is significantly larger than the single-neighborhood robust regions in prior works.
  • The method maintains strong performance across different architectures, including ViT, BEiT, and WideResNet, on both ImageNet and CIFAR-10.
  • Even with fast sampling (b=2, K=10), DensePure achieves nontrivial certified accuracy, demonstrating practical feasibility despite high computational cost.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.