mlsanityData to 14 Oct 2026

PurifyGen: A Risk-Discrimination and Semantic-Purification Model for Safe Text-to-Image Generation

arXiv 2512.23546 ↗First posted 29 Dec 2025cs.CVcited by 5

On the map: Diffusion models → Robustness, privacy and adversarial aspects

Abstract (arXiv)

Recent advances in diffusion models have notably enhanced text-to-image (T2I) generation quality, but they also raise the risk of generating unsafe content. Traditional safety methods like text blacklisting or harmful content classification have significant drawbacks: they can be easily circumvented or require extensive datasets and extra training. To overcome these challenges, we introduce PurifyGen, a novel, training-free approach for safe T2I generation that retains the model's original weights. PurifyGen introduces a dual-stage strategy for prompt purification. First, we evaluate the safety of each token in a prompt by computing its complementary semantic distance, which measures the semantic proximity between the prompt tokens and concept embeddings from predefined toxic and clean lists. This enables fine-grained prompt classification without explicit keyword matching or retraining. Tokens closer to toxic concepts are flagged as risky. Second, for risky prompts, we apply a dual-space transformation: we project toxic-aligned embeddings into the null space of the toxic concept matrix, effectively removing harmful semantic components, and simultaneously align them into the range space of clean concepts. This dual alignment purifies risky prompts by both subtracting unsafe semantics and reinforcing safe ones, while retaining the original intent and coherence. We further define a token-wise strategy to selectively replace only risky token embeddings, ensuring minimal disruption to safe content. PurifyGen offers a plug-and-play solution with theoretical grounding and strong generalization to unseen prompts and models. Extensive testing shows that PurifyGen surpasses current methods in reducing unsafe content across five datasets and competes well with training-dependent approaches. The code can refer to https://github.com/AI-Researcher-Team/PurifyGen.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Robustness, privacy and adversarial aspects, one of 14 directions in Diffusion models. Builds on 28 of its 48 references that are in the map. First posted on arXiv 29 Dec 2025.

Builds on

28 of 48 references.

Closest ancestors · 13

Same direction, newest first

  1. 2024SAFREE: Training-Free and Adaptive Guard for Safe Text-to-Image And Video Generation16 Oct
  2. 2024ConceptPrune: Concept Editing in Diffusion Models via Skilled Neuron Pruning29 May
  3. 2024Pruning for Robust Concept Erasing in Diffusion Models26 May
  4. 2024Unlearning Concepts in Diffusion Model via Concept Domain Correction and Concept Preserving Gradient24 May
  5. 2024Jailbreaking Prompt Attack: A Controllable Adversarial Attack against Diffusion Models2 Apr
  6. 2024MACE: Mass Concept Erasure in Diffusion Models10 Mar
  7. 2023Receler: Reliable Concept Erasing of Text-to-Image Diffusion Models via Lightweight Erasers29 Nov
  8. 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov
  9. 2023To Generate or Not? Safety-Driven Unlearned Diffusion Models Are Still Easy To Generate Unsafe Images ... For Now18 Oct
  10. 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
  11. 2023Unified Concept Editing in Diffusion Models25 Aug
  12. 2023Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models30 Mar
1 more
  1. 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov

Other references · 15

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  3. 2018The Unreasonable Effectiveness of Deep Features as a Perceptual Metriccited by 11,177
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2022Imagen Video: High Definition Video Generation with Diffusion Modelscited by 1,778
  6. 2023VideoPoet: A Large Language Model for Zero-Shot Video Generationcited by 492
  7. 2023TIFA: Accurate and Interpretable Text-to-Image Faithfulness Evaluation with Question Answeringcited by 428
  8. 2023Jailbreak in pieces: Compositional Adversarial Attacks on Multi-Modal Language Modelscited by 273
  9. 2023Can Sensitive Information Be Deleted From LLMs? Objectives for Defending Against Extraction Attackscited by 158
  10. 2023FLIRT: Feedback Loop In-context Red Teamingcited by 83
  11. 2024GuardT2I: Defending Text-to-Image Models from Adversarial Promptscited by 62
  12. 2024ART: Automatic Red-teaming for Text-to-Image Models to Protect Benign Userscited by 35
3 more
  1. 2024SafeSora: Towards Safety Alignment of Text2Video Generation via a Human Preference Datasetcited by 35
  2. 2024Automatic Jailbreaking of the Text-to-Image Generative AI Systemscited by 23
  3. 2024Groot: Adversarial Testing for Generative Text-to-Image Models with Tree-based Semantic Transformationcited by 14

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 5.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Safe Text-to-Image Generation: Simply Sanitize the Prompt Embedding
  2. 2025PromptGuard: Soft Prompt-Guided Unsafe Content Moderation for Text-to-Image Models
  3. 2025Responsible Diffusion Models via Constraining Text Embeddings within Safe Regions
  4. 2025Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models
  5. 2024Universal Prompt Optimizer for Safe Text-to-Image Generation
  6. 2026DTVI: Dual-Stage Textual and Visual Intervention for Safe Text-to-Image Generation
  7. 2025Detect-and-Guide: Self-regulation of Diffusion Models for Safe Text-to-Image Generation via Guideline Token Optimization
  8. 2025SafeGuider: Robust and Practical Content Safety Control for Text-to-Image Models