Detect-and-Guide: Self-regulation of Diffusion Models for Safe Text-to-Image Generation via Guideline Token Optimization
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
- 2024Defensive Unlearning with Adversarial Training for Robust Concept Erasure in Diffusion Models24 May
- 2024MACE: Mass Concept Erasure in Diffusion Models10 Mar
- 2023One-Dimensional Adapter to Rule Them All: Concepts, Diffusion Models and Erasing Applications26 Dec
- 2023MMA-Diffusion: MultiModal Attack on Diffusion Models29 Nov
- 2023SalUn: Empowering Machine Unlearning via Gradient-based Weight Saliency in Both Image Classification and Generation19 Oct
- 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
- 2023Unified Concept Editing in Diffusion Models25 Aug
- 2023Towards Safe Self-Distillation of Internet-Scale Text-to-Image Diffusion Models12 Jul
- 2023Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Models23 May
- 2023Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models30 Mar
- 2023Ablating Concepts in Text-to-Image Diffusion Models23 Mar
- 2023Erasing Concepts from Diffusion Models13 Mar
2 more
Other references · 27
- 2017Attention Is All You Needcited by 60,361
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
- 2014Microsoft COCO: Common Objects in Contextcited by 17,608
- 2021Diffusion Models Beat GANs on Image Synthesiscited by 8,255
- 2022Hierarchical Text-Conditional Image Generation with CLIP Latentscited by 6,585
- 2022Classifier-Free Diffusion Guidancecited by 5,847
- 2017Neural Discrete Representation Learningcited by 4,712
- 2024Scaling Rectified Flow Transformers for High-Resolution Image Synthesiscited by 4,181
- 2022LAION-5B: An open large-scale dataset for training next generation image-text modelscited by 4,152
- 2023Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detectioncited by 3,332
- 2020Taming Transformers for High-Resolution Image Synthesiscited by 3,253
15 more
- 2022Prompt-to-Prompt Image Editing with Cross Attention Controlcited by 2,431
- 2024Evaluating Text-to-Visual Generation with Image-to-Text Generationcited by 474
- 2022Diffusion Models already have a Semantic Latent Spacecited by 328
- 2022What the DAAM: Interpreting Stable Diffusion Using Cross Attentioncited by 236
- 2023Selective Amnesia: A Continual Learning Approach to Forgetting in Deep Generative Modelscited by 177
- 2022Can Machines Help Us Answering Question 16 in Datasheets, and In Turn Reflecting on Inappropriate Content?cited by 155
- 2024Towards Understanding Cross and Self-Attention in Stable Diffusion for Text-Guided Image Editingcited by 135
- 2023Circumventing Concept Erasure Methods For Text-to-Image Generative Modelscited by 85
- 2023SODA: Bottleneck Diffusion Models for Representation Learningcited by 77
- 2023Dynamic Prompt Learning: Addressing Cross-Attention Leakage for Text-Based Image Editingcited by 76
- 2023Self-Discovering Interpretable Diffusion Latent Directions for Responsible Text-to-Image Generationcited by 69
- 2024CoMat: Aligning Text-to-Image Diffusion Model with Image-to-Text Concept Matchingcited by 61
- 2023Localizing and Editing Knowledge in Text-to-Image Generative Modelscited by 54
- 2024ART: Automatic Red-teaming for Text-to-Image Models to Protect Benign Userscited by 35
- 2024Open-Vocabulary Attention Maps with Token Optimization for Semantic Segmentation in Diffusion Modelscited by 29
Built on by
Citing papers per year: 2025: 5; 2026: 8.
13 papers.
Sort:
By area:
- 2025Set You Straight: Auto-Steering Denoising Trajectories to Sidestep Unwanted Conceptscited by 62
- 2025Erasing Concepts, Steering Generations: A Comprehensive Survey of Concept Suppressioncited by 10
- 2026Multimodal Unlearning Across Vision, Language, Video, and Audio: Survey of Methods, Datasets, and Benchmarkscited by 7
- 2025Iterative Prompt Refinement for Safer Text-to-Image Generationcited by 6
- 2025Generative Model Unlearning: A Survey through Target Events, Unlearning Operators, and Evaluation Protocolscited by 4
- 2026TP-Blend: Textual-Prompt Attention Pairing for Precise Object-Style Blending in Diffusion Modelscited by 4
- 2025GrOCE:Graph-Guided Online Concept Erasure for Text-to-Image Diffusion Modelscited by 2
- 2026FlowGuard: Towards Lightweight In-Generation Safety Detection for Diffusion Models via Linear Latent Decodingcited by 2
- 2026TrajShield: Trajectory-Level Safety Mediation for Defending Text-to-Video Models Against Jailbreak Attackscited by 1
- 2026Robust and Generalizable Safety Steering for Text-to-Image Diffusion Transformerscited by 0
- 2026Position: Preventing AI-Generated CSAM Necessitates New Approaches to AI Safetycited by 0
- 2026Motion Concept Unlearning in Video Diffusion Modelscited by 0
- 2026Keep It CALM: Analyzing the Limits of Global Unsafety in Text-to-Image Generation1 Oct 2026
- 2026Motion Concept Unlearning in Video Diffusion Models29 Sep 2026
- 2026Multimodal Unlearning Across Vision, Language, Video, and Audio: Survey of Methods, Datasets, and Benchmarks8 Jul 2026
- 2026Position: Preventing AI-Generated CSAM Necessitates New Approaches to AI Safety9 Jun 2026
- 2026Robust and Generalizable Safety Steering for Text-to-Image Diffusion Transformers28 May 2026
- 2026TrajShield: Trajectory-Level Safety Mediation for Defending Text-to-Video Models Against Jailbreak Attacks3 May 2026
- 2026FlowGuard: Towards Lightweight In-Generation Safety Detection for Diffusion Models via Linear Latent Decoding9 Apr 2026
- 2026TP-Blend: Textual-Prompt Attention Pairing for Precise Object-Style Blending in Diffusion Models12 Jan 2026
- 2025GrOCE:Graph-Guided Online Concept Erasure for Text-to-Image Diffusion Models17 Nov 2025
- 2025Iterative Prompt Refinement for Safer Text-to-Image Generation17 Sep 2025
- 2025Generative Model Unlearning: A Survey through Target Events, Unlearning Operators, and Evaluation Protocols26 Jul 2025
- 2025Erasing Concepts, Steering Generations: A Comprehensive Survey of Concept Suppression26 May 2025
1 more
- 2026TP-Blend: Textual-Prompt Attention Pairing for Precise Object-Style Blending in Diffusion Modelscited by 4
- 2025GrOCE:Graph-Guided Online Concept Erasure for Text-to-Image Diffusion Modelscited by 2
- 2026FlowGuard: Towards Lightweight In-Generation Safety Detection for Diffusion Models via Linear Latent Decodingcited by 2
- 2026Robust and Generalizable Safety Steering for Text-to-Image Diffusion Transformerscited by 0
- 2026Motion Concept Unlearning in Video Diffusion Modelscited by 0
- 2026Motion Concept Unlearning in Video Diffusion Models29 Sep 2026
- 2026Robust and Generalizable Safety Steering for Text-to-Image Diffusion Transformers28 May 2026
- 2026FlowGuard: Towards Lightweight In-Generation Safety Detection for Diffusion Models via Linear Latent Decoding9 Apr 2026
- 2026TP-Blend: Textual-Prompt Attention Pairing for Precise Object-Style Blending in Diffusion Models12 Jan 2026
- 2025GrOCE:Graph-Guided Online Concept Erasure for Text-to-Image Diffusion Models17 Nov 2025
- 2026Multimodal Unlearning Across Vision, Language, Video, and Audio: Survey of Methods, Datasets, and Benchmarkscited by 7
- 2025Generative Model Unlearning: A Survey through Target Events, Unlearning Operators, and Evaluation Protocolscited by 4
- 2026TrajShield: Trajectory-Level Safety Mediation for Defending Text-to-Video Models Against Jailbreak Attackscited by 1
- 2026Multimodal Unlearning Across Vision, Language, Video, and Audio: Survey of Methods, Datasets, and Benchmarks8 Jul 2026
- 2026TrajShield: Trajectory-Level Safety Mediation for Defending Text-to-Video Models Against Jailbreak Attacks3 May 2026
- 2025Generative Model Unlearning: A Survey through Target Events, Unlearning Operators, and Evaluation Protocols26 Jul 2025
- 2025Set You Straight: Auto-Steering Denoising Trajectories to Sidestep Unwanted Conceptscited by 62
- 2025Erasing Concepts, Steering Generations: A Comprehensive Survey of Concept Suppressioncited by 10
- 2026Position: Preventing AI-Generated CSAM Necessitates New Approaches to AI Safetycited by 0
- 2026Keep It CALM: Analyzing the Limits of Global Unsafety in Text-to-Image Generationcited by 0
- 2026Keep It CALM: Analyzing the Limits of Global Unsafety in Text-to-Image Generation1 Oct 2026
- 2026Position: Preventing AI-Generated CSAM Necessitates New Approaches to AI Safety9 Jun 2026
- 2025Erasing Concepts, Steering Generations: A Comprehensive Survey of Concept Suppression26 May 2025
- 2025Set You Straight: Auto-Steering Denoising Trajectories to Sidestep Unwanted Concepts17 Apr 2025
Similar, not cited
Close in wording, no citation either way
- 2024Safety Alignment Backfires: Preventing the Re-emergence of Suppressed Concepts in Fine-tuned Text-to-Image Diffusion Models
- 2025Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models
- 2026Test-Time Scaling for Safe Text-Guided Image Generation via Intermediate Clean Estimates
- 2024Growth Inhibitors for Suppressing Inappropriate Image Concepts in Diffusion Models
- 2025Responsible Diffusion Models via Constraining Text Embeddings within Safe Regions
- 2025Towards Resilient Safety-driven Unlearning for Diffusion Models against Downstream Fine-tuning
- 2026When Safety Collides: Resolving Multi-Category Harmful Conflicts in Text-to-Image Diffusion via Adaptive Safety Guidance
- 2026The Safety-Aware Denoiser for Text Diffusion Models