atlas

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

Adaptive Median Smoothing: Adversarial Defense for Unlearned Text-to-Image Diffusion Models at Inference Time

ICML 2025 · 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 Adaptive Median Smoothing, an inference-time defense that adds token-wise anisotropic Gaussian noise to text embeddings (scaled by concept relevance) and takes an element-wise median, to make unlearned Stable Diffusion models robust to adversarial prompts.

Problem

Unlearned text-to-image diffusion models can be prompted with adversarial inputs that regenerate erased concepts such as nudity and violence, and existing defenses either hurt utility or are costly at inference.

Approach

Reformulates robustness of unlearned diffusion as robust regression and generalizes median smoothing from isotropic to anisotropic Gaussian noise with a provable ellipsoidal guarantee; noise intensity per token is set by its cosine relevance to a target-concept direction, and the median is taken over text embeddings (not noise predictions) to save compute.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add Adaptive Median SmoothingESD · Nudity adversarial attacksAverage ASR: 25.42 -> 6.80Helped
add Adaptive Median SmoothingUCE · Nudity adversarial attacksAverage ASR: 40.34 -> 11.02Helped
add Adaptive Median SmoothingESD · Violence adversarial attacksAverage ASR: 33.56 -> 20.20Helped
add Adaptive Median SmoothingUCE · Violence adversarial attacksAverage ASR: 46.17 -> 22.31Helped
set σ0 to 0.009 instead of 0.006 (ablation)Adaptive Median Smoothing on ESD · NudityAverage ASR: 6.80 -> 2.78Helped
set σ0 to 0.009 instead of 0.006 (ablation)Adaptive Median Smoothing on ESD · NudityFID: 7.365 -> 7.530Hurt
set k to 13 instead of 9 (ablation)Adaptive Median Smoothing on ESD · NudityAverage ASR: 6.80 -> 4.98Helped
set k to 5 instead of 9 (ablation)Adaptive Median Smoothing on ESD · NudityAverage ASR: 6.80 -> 11.28Hurt
set σ0 to 0.012 instead of 0.006 (ablation)Adaptive Median Smoothing on UCE · NudityAverage ASR: 18.69 -> 11.02Helped
set σ0 to 0.012 instead of 0.006 (ablation)Adaptive Median Smoothing on UCE · NudityFID: 4.477 -> 5.343Hurt
set k to 13 instead of 9 (ablation)Adaptive Median Smoothing on UCE · NudityAverage ASR: 11.02 -> 9.14Helped
set k to 5 instead of 9 (ablation)Adaptive Median Smoothing on UCE · NudityAverage ASR: 11.02 -> 17.71Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ViSU prompt pairs (7,863 nudity pairs) COCO validation set

Benchmarks: I2P P4D UDA RAB MMA QF-PGD

Metrics: attack success rate (ASR) FID CLIP score inference time

Baselines: RACE RECE SLD-Weak SLD-Medium SLD-Strong SLD-Max Blacklist POSI

Builds on: Randomized smoothing median (Chiang et al., 2020) ESD UCE Safe Latent Diffusion

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