atlas

Research map / Adversarial robustness and security / Attacks on text and graphs

Diffusion Models Demand Contrastive Guidance for Adversarial Purification to Advance

ICML 2024 · Adversarial robustness and security › Attacks on text and graphs · approach: Diffusion-based adversarial purification

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes contrastive-guided diffusion purification: a partially noised adversarial input is denoised with the reverse SDE steered by the gradient of a contrastive (InfoNCE/HNM) loss, with a theoretical Gaussian-mixture analysis motivating the noise level and guidance.

Problem

Adversarial purification with diffusion models removes adversarial perturbations but purified images remain poorly class-separable, and DiffPure's noise level and guidance are not theoretically tuned; the paper asks whether contrastive guidance can steer purification toward the clean distribution.

Approach

Derives, under a Gaussian mixture model, the forward noise level t* for purification and shows that a contrastive loss gradient in the reverse process boosts the signal direction; then adds the gradient of a contrastive loss (InfoNCE or hard-negative-mining) between the anchor and its positive pair to the score during reverse diffusion, without changing diffusion training.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use contrastive-guided diffusion purification instead of DiffPureCIFAR-10 with WideResNet-28-10 · CIFAR-10, AutoAttack ℓ∞ (ϵ = 8/255)robust accuracy: 70.64 -> 82.81Helped
use contrastive-guided diffusion purification instead of DiffPureCIFAR-10 with WideResNet-70-16 · CIFAR-10, AutoAttack ℓ∞ (ϵ = 8/255)robust accuracy: 71.29 -> 82.81Helped
use contrastive-guided diffusion purification instead of the strongest listed baselineCIFAR-10 with WideResNet-28-10 · CIFAR-10, AutoAttack ℓ2 (ϵ = 0.5)robust accuracy: 83.68 -> 84.38Helped
use contrastive-guided diffusion purification instead of DiffPureCIFAR-10 with ResNet-50 · CIFAR-10, unseen AutoAttack ℓ2 (ϵ = 1)robust accuracy: 70.90 -> 79.12Helped
use contrastive-guided diffusion purification instead of DiffPureGTSRB with ResNet-18 · GTSRB, AutoAttack ℓ∞ (ϵ = 8/255)robust accuracy: 42.19 -> 69.53Helped
use contrastive-guided diffusion purification instead of DiffPureGTSRB with ResNet-18 · GTSRB, BPDA+EOT ℓ∞ (ϵ = 8/255)robust accuracy: 61.43 -> 61.25No clear effect
use VP-SDE rather than VP-ODE (ablation)contrastive-guided diffusion purification · CIFAR-10, AutoAttack ℓ∞ (ϵ = 8/255)robust accuracy: 69.79 -> 82.81Helped
add contrastive guidance to diffusion purification (ablation)diffusion purification on CIFAR-100 · CIFAR-100, AutoAttack ℓ∞ (ϵ = 8/255)robust accuracy: 8.60 -> 24.22Helped
add contrastive guidance to diffusion purification (ablation)diffusion purification on CIFAR-100 · CIFAR-100, AutoAttack ℓ∞ (ϵ = 8/255)standard accuracy: 62.50 -> 57.82Hurt

Surprising findings

Limitations

Experimental setup

Datasets: CIFAR-10 CIFAR-100 GTSRB ImageNet

Benchmarks: CIFAR-10 CIFAR-100 GTSRB ImageNet

Metrics: standard accuracy robust accuracy

Baselines: DiffPure Adversarial training methods from RobustBench Hill et al. 2021 EBM purification Yoon et al. 2021 DSM purification DensePure

Builds on: DiffPure Lu et al. 2023 contrastive energy guidance Ouyang et al. 2023 contrastive guided diffusion InfoNCE hard negative mining

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy