[Paper Review] To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now
This paper proposes UnlearnDiff, a novel adversarial prompting method that exploits the inherent classification capabilities of diffusion models to generate adversarial prompts that bypass safety-driven unlearning mechanisms. It demonstrates that even state-of-the-art unlearned diffusion models remain highly vulnerable to such attacks, with UnlearnDiff achieving up to 90.27% attack success rate on nudity unlearning tasks, exposing critical robustness gaps in current safety defenses.
The recent advances in diffusion models (DMs) have revolutionized the generation of realistic and complex images. However, these models also introduce potential safety hazards, such as producing harmful content and infringing data copyrights. Despite the development of safety-driven unlearning techniques to counteract these challenges, doubts about their efficacy persist. To tackle this issue, we introduce an evaluation framework that leverages adversarial prompts to discern the trustworthiness of these safety-driven DMs after they have undergone the process of unlearning harmful concepts. Specifically, we investigated the adversarial robustness of DMs, assessed by adversarial prompts, when eliminating unwanted concepts, styles, and objects. We develop an effective and efficient adversarial prompt generation approach for DMs, termed UnlearnDiffAtk. This method capitalizes on the intrinsic classification abilities of DMs to simplify the creation of adversarial prompts, thereby eliminating the need for auxiliary classification or diffusion models. Through extensive benchmarking, we evaluate the robustness of widely-used safety-driven unlearned DMs (i.e., DMs after unlearning undesirable concepts, styles, or objects) across a variety of tasks. Our results demonstrate the effectiveness and efficiency merits of UnlearnDiffAtk over the state-of-the-art adversarial prompt generation method and reveal the lack of robustness of current safetydriven unlearning techniques when applied to DMs. Codes are available at https://github.com/OPTML-Group/Diffusion-MU-Attack. WARNING: There exist AI generations that may be offensive in nature.
Motivation & Objective
- To evaluate the robustness of safety-driven unlearned diffusion models against adversarial prompts.
- To address the lack of systematic evaluation frameworks for unlearning robustness in text-to-image diffusion models.
- To develop a method that simplifies adversarial prompt generation by leveraging the diffusion model's own classification capacity.
- To benchmark the effectiveness of unlearning mechanisms across multiple unlearning tasks and model variants.
Proposed method
- UnlearnDiff leverages the diffusion model’s internal classifier head to guide adversarial prompt generation, treating it similarly to how adversarial attacks are conducted in image classification.
- It formulates the attack as an optimization problem in the text embedding space, using a loss function that maximizes the likelihood of generating unsafe images under perturbed prompts.
- The method avoids reliance on external models or additional training, making it efficient and directly applicable to any text-to-image diffusion model with a classifier head.
- It employs iterative optimization with gradient-based updates to generate adversarial prompts that subtly evade unlearning mechanisms while maintaining semantic coherence.
- The approach is evaluated across multiple unlearning tasks, including nudity, violence, and copyrighted styles, using diverse SD-based models.
- Transferability is tested across different Stable Diffusion versions, demonstrating the attack’s generalization capability despite model architecture and data distribution shifts.

Experimental results
Research questions
- RQ1Can adversarial prompts effectively bypass safety-driven unlearning mechanisms in diffusion models?
- RQ2How robust are current unlearned diffusion models to subtle, optimized text perturbations that evade unlearning?
- RQ3To what extent can adversarial prompts generated via the model’s own classification capability achieve high attack success rates?
- RQ4How does the attack performance vary across different diffusion model versions and unlearning tasks?
- RQ5Can random prompt or noise seed perturbations also bypass unlearning mechanisms, indicating inherent model fragility?
Key findings
- UnlearnDiff achieves a 90.27% attack success rate on nudity unlearning in ESD models fine-tuned on Stable Diffusion v1.4, significantly outperforming prior methods like P4D.
- The attack maintains high effectiveness (54.87% ASR) even when transferring from a v1.4-based victim model to a v2.1 target model, demonstrating strong generalization.
- Random text prompt attacks achieve a 57.75% success rate, and random noise seed attacks reach 14.01%, indicating that unlearning mechanisms are vulnerable even to non-optimized, stochastic perturbations.
- The attack performance drops when targeting SD v2.0, likely due to its more aggressive NSFW filtering, but remains substantial (42.48% ASR), suggesting filtering does not fully eliminate vulnerabilities.
- Unlearned DMs trained on filtered datasets still fail to robustly unlearn unsafe concepts, revealing fundamental weaknesses in current safety-by-design approaches.
- The study exposes that current safety-driven unlearning is insufficient, as even subtle adversarial prompts can reliably generate unsafe outputs, challenging the trustworthiness of these models.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.