mlsanityData to 14 Oct 2026

Detect-and-Guide: Self-regulation of Diffusion Models for Safe Text-to-Image Generation via Guideline Token Optimization

arXiv 2503.15197 ↗First posted 19 Mar 2025cs.CVcited by 13

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

also in 1 more
Abstract (arXiv)

Text-to-image diffusion models have achieved state-of-the-art results in synthesis tasks; however, there is a growing concern about their potential misuse in creating harmful content. To mitigate these risks, post-hoc model intervention techniques, such as concept unlearning and safety guidance, have been developed. However, fine-tuning model weights or adapting the hidden states of the diffusion model operates in an uninterpretable way, making it unclear which part of the intermediate variables is responsible for unsafe generation. These interventions severely affect the sampling trajectory when erasing harmful concepts from complex, multi-concept prompts, thus hindering their practical use in real-world settings. In this work, we propose the safe generation framework Detect-and-Guide (DAG), leveraging the internal knowledge of diffusion models to perform self-diagnosis and fine-grained self-regulation during the sampling process. DAG first detects harmful concepts from noisy latents using refined cross-attention maps of optimized tokens, then applies safety guidance with adaptive strength and editing regions to negate unsafe generation. The optimization only requires a small annotated dataset and can provide precise detection maps with generalizability and concept specificity. Moreover, DAG does not require fine-tuning of diffusion models, and therefore introduces no loss to their generation diversity. Experiments on erasing sexual content show that DAG achieves state-of-the-art safe generation performance, balancing harmfulness mitigation and text-following performance on multi-concept real-world prompts.

Key facts. Cited by 13 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 41 of its 49 references that are in the map. First posted on arXiv 19 Mar 2025.

Builds on

41 of 49 references.

Closest ancestors · 14

Same direction, newest first

  1. 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models24 May
  2. 2024MACE: Mass Concept Erasure in Diffusion Models10 Mar
  3. 2023One-Dimensional Adapter to Rule Them All: Concepts, Diffusion Models and Erasing Applications26 Dec
  4. 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov
  5. 2023SalUn: Empowering Machine Unlearning via Gradient-based Weight Saliency in Both Image Classification and Generation19 Oct
  6. 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
  7. 2023Unified Concept Editing in Diffusion Models25 Aug
  8. 2023Towards Safe Self-Distillation of Internet-Scale Text-to-Image Diffusion Models12 Jul
  9. 2023Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models23 May
  10. 2023Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models30 Mar
  11. 2023Ablating Concepts in Text-to-Image Diffusion Models23 Mar
  12. 2023Erasing Concepts from Diffusion Models13 Mar
2 more
  1. 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Models9 Nov
  2. 2022Red-Teaming the Stable Diffusion Safety Filter3 Oct

Other references · 27

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  4. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  5. 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,255
  6. 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,585
  7. 2022Classifier-Free Diffusion Guidancecited by 5,847
  8. 2017Neural Discrete Representation Learningcited by 4,712
  9. 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,181
  10. 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,152
  11. 2023Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detectioncited by 3,332
  12. 2020Taming Transformers for High-Resolution Image Synthesiscited by 3,253
15 more
  1. 2022Prompt-to-Prompt Image Editing with Cross Attention Controlcited by 2,431
  2. 2024Evaluating Text-to-Visual Generation with Image-to-Text Generationcited by 474
  3. 2022Diffusion Models already have a Semantic Latent Spacecited by 328
  4. 2022What the DAAM: Interpreting Stable Diffusion Using Cross Attentioncited by 236
  5. 2023Selective Amnesia: A Continual Learning Approach to Forgetting in Deep Generative Modelscited by 177
  6. 2022Can Machines Help Us Answering Question 16 in Datasheets, and In Turn Reflecting on Inappropriate Content?cited by 155
  7. 2024Towards Understanding Cross and Self-Attention in Stable Diffusion for Text-Guided Image Editingcited by 135
  8. 2023Circumventing Concept Erasure Methods For Text-to-Image Generative Modelscited by 85
  9. 2023SODA: Bottleneck Diffusion Models for Representation Learningcited by 77
  10. 2023Dynamic Prompt Learning: Addressing Cross-Attention Leakage for Text-Based Image Editingcited by 76
  11. 2023Self-Discovering Interpretable Diffusion Latent Directions for Responsible Text-to-Image Generationcited by 69
  12. 2024CoMat: Aligning Text-to-Image Diffusion Model with Image-to-Text Concept Matchingcited by 61
  13. 2023Localizing and Editing Knowledge in Text-to-Image Generative Modelscited by 54
  14. 2024ART: Automatic Red-teaming for Text-to-Image Models to Protect Benign Userscited by 35
  15. 2024Open-Vocabulary Attention Maps with Token Optimization for Semantic Segmentation in Diffusion Modelscited by 29

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 5; 2026: 8.

13 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Models
  2. 2025Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models
  3. 2026Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates
  4. 2024Growth Inhibitors for Suppressing Inappropriate Image Concepts in Diffusion Models
  5. 2025Responsible Diffusion Models via Constraining Text Embeddings within Safe Regions
  6. 2025Towards Resilient Safety-driven Unlearning for Diffusion Models against Downstream Fine-tuning
  7. 2026When Safety Collides: Resolving Multi-Category Harmful Conflicts in Text-to-Image Diffusion via Adaptive Safety Guidance
  8. 2026The Safety-Aware Denoiser for Text Diffusion Models