mlsanityData to 14 Oct 2026

SafeGuider: Robust and Practical Content Safety Control for Text-to-Image Models

arXiv 2510.05173 ↗First posted 5 Oct 2025cs.CR cs.AI cs.CVcited by 6

On the map: LLM safety and security → Vision-language and text-to-image safety

Abstract (arXiv)

Text-to-image models have shown remarkable capabilities in generating high-quality images from natural language descriptions. However, these models are highly vulnerable to adversarial prompts, which can bypass safety measures and produce harmful content. Despite various defensive strategies, achieving robustness against attacks while maintaining practical utility in real-world applications remains a significant challenge. To address this issue, we first conduct an empirical study of the text encoder in the Stable Diffusion (SD) model, which is a widely used and representative text-to-image model. Our findings reveal that the [EOS] token acts as a semantic aggregator, exhibiting distinct distributional patterns between benign and adversarial prompts in its embedding space. Building on this insight, we introduce SafeGuider, a two-step framework designed for robust safety control without compromising generation quality. SafeGuider combines an embedding-level recognition model with a safety-aware feature erasure beam search algorithm. This integration enables the framework to maintain high-quality image generation for benign prompts while ensuring robust defense against both in-domain and out-of-domain attacks. SafeGuider demonstrates exceptional effectiveness in minimizing attack success rates, achieving a maximum rate of only 5.48% across various attack scenarios. Moreover, instead of refusing to generate or producing black images for unsafe prompts, SafeGuider generates safe and meaningful images, enhancing its practical utility. In addition, SafeGuider is not limited to the SD model and can be effectively applied to other text-to-image models, such as the Flux model, demonstrating its versatility and adaptability across different architectures. We hope that SafeGuider can shed some light on the practical deployment of secure text-to-image systems.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Vision-language and text-to-image safety, one of 12 directions in LLM safety and security. Builds on 27 of its 48 references that are in the map. First posted on arXiv 5 Oct 2025.

Builds on

27 of 48 references.

Closest ancestors · 7

Same direction, newest first

  1. 2024ART: Automatic Red-teaming for Text-to-Image Models to Protect Benign Users24 May
  2. 2024SafeGen: Mitigating Sexually Explicit Content Generation in Text-to-Image Models10 Apr
  3. 2024GuardT2I: Defending Text-to-Image Models from Adversarial Prompts3 Mar
  4. 2023Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?16 Oct
  5. 2023Prompting4Debugging: Red-Teaming Text-to-Image Diffusion Models by Finding Problematic Prompts12 Sep
  6. 2023SneakyPrompt: Jailbreaking Text-to-image Generative Models20 May
  7. 2022Red-Teaming the Stable Diffusion Safety Filter3 Oct

Other references · 20

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2014Microsoft COCO: Common Objects in Contextcited by 17,608
  4. 2018The Unreasonable Effectiveness of Deep Features as a Perceptual Metriccited by 11,177
  5. 2020Denoising Diffusion Implicit Modelscited by 9,781
  6. 2022Safe Latent Diffusion: Mitigating Inappropriate Degeneration in Diffusion Modelscited by 513
  7. 2023Directly Fine-Tuning Diffusion Models on Differentiable Rewardscited by 448
  8. 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 236
  9. 2023Stable Bias: Analyzing Societal Representations in Diffusion Modelscited by 226
  10. 2023Glaze: Protecting Artists from Style Mimicry by Text-to-Image Modelscited by 205
  11. 2023Unsafe Diffusion: On the Generation of Unsafe Images and Hateful Memes From Text-To-Image Modelscited by 175
  12. 2022Can Machines Help Us Answering Question 16 in Datasheets, and In Turn Reflecting on Inappropriate Content?cited by 155
8 more
  1. 2023Prompt Stealing Attacks Against Text-to-Image Generation Modelscited by 51
  2. 2023SurrogatePrompt: Bypassing the Safety Filter of Text-to-Image Models via Substitutioncited by 34
  3. 2021Exploring the Role of BERT Token Representations to Explain Sentence Probing Resultscited by 29
  4. 2024Moderator: Moderating Text-to-Image Diffusion Models through Fine-grained Context-based Policiescited by 15
  5. 2020Influence Patterns for Explaining Information Flow in BERTcited by 14
  6. 2024GenderCARE: A Comprehensive Framework for Assessing and Reducing Gender Bias in Large Language Modelscited by 9
  7. 2024Image-Perfect Imperfections: Safety, Bias, and Authenticity in the Shadow of Text-To-Image Model Evolutioncited by 7
  8. 2024Understanding Implosion in Text-to-Image Generative Modelscited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Safe Text-to-Image Generation: Simply Sanitize the Prompt Embedding
  2. 2025SafeText: Safe Text-to-image Models via Aligning the Text Encoder
  3. 2025Training-Free Safe Text Embedding Guidance for Text-to-Image Diffusion Models
  4. 2026SafeCtrl: Region-Aware Safety Control for Text-to-Image Diffusion via Detect-Then-Suppress
  5. 2025Patronus: Safeguarding Text-to-Image Models against White-Box Adversaries
  6. 2026DTVI: Dual-Stage Textual and Visual Intervention for Safe Text-to-Image Generation
  7. 2025PromptGuard: Soft Prompt-Guided Unsafe Content Moderation for Text-to-Image Models
  8. 2025Beyond the Safety Tax: Mitigating Unsafe Text-to-Image Generation via External Safety Rectification