paper-with-me

홈 › Papers

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

2025-10-05 · Peigui Qi, Kunsheng Tang, Wenbo Zhou, Weiming Zhang, Nenghai Yu, Tianwei Zhang, Qing Guo, Jie Zhang 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.

📄 PDF Abstract BibTeX arXiv:2510.05173

Code (0)

등록된 구현이 없습니다.

Tasks

Image Generation

Similar Papers 제목 키워드 기반

Not All Latent Spaces Are Flat: Hyperbolic Concept Control

2026-03-14 · Maria Rosaria Briglia, Simone Facchiano, Paolo Cursi, Alessio Sampieri 외 arxiv

As modern text-to-image (T2I) models draw closer to synthesizing highly realistic content, the threat of unsafe content generation grows, and it becomes paramount to exercise control. Existing approaches steer these mode…

Controllable Safety Alignment: Inference-Time Adaptation to Diverse Safety Requirements

2024-10-11 · Jingyu Zhang, Ahmed Elgohary, Ahmed Magooda, Daniel Khashabi 외

The current paradigm for safety alignment of large language models (LLMs) follows a one-size-fits-all approach: the model refuses to interact with any content deemed unsafe by the model provider. This approach lacks flex…

Safety Alignment

Constructing Highly Inductive Contexts for Dialogue Safety through Controllable Reverse Generation

2022-12-04 · Zhexin Zhang, Jiale Cheng, Hao Sun, Jiawen Deng 외

Large pretrained language models can easily produce toxic or biased content, which is prohibitive for practical use. In order to detect such toxic generations, existing methods rely on templates, real-world data extracti…

Response Generation

SafeSteer: Interpretable Safety Steering with Refusal-Evasion in LLMs

2025-06-01 · Shaona Ghosh, Amrita Bhattacharjee, Yftah Ziser, Christopher Parisien

Fine-tuning large language models (LLMs) to adapt to evolving safety policies is costly and impractical. Mechanistic interpretability enables inference-time control through latent activation steering, yet its potential f…

SafeCtrl: Region-Aware Safety Control for Text-to-Image Diffusion via Detect-Then-Suppress

2026-04-05 · Lingyun Zhang, Yu Xie, Zhongli Fang, Yu Liu 외 arxiv

The widespread deployment of text-to-image diffusion models is significantly challenged by the generation of visually harmful content, such as sexually explicit content, violence, and horror imagery. Common safety interv…