PromptGuard: Soft-prompt-guided unsafe content moderation for text-to-image modelsPromptGuard: Soft Prompt-Guided Unsafe Content Moderation for Text-to-Image Models
The researchers propose PromptGuard, a content moderation method for text-to-image (T2I) models that draws on the system prompt mechanism of large language models, optimizes a universal safety soft prompt in the T2I model's text embedding space, and directly modulates NSFW inputs to generate safe and realistic images without affecting inference efficiency and without requiring a proxy model. The method further uses a divide-and-conquer strategy to optimize category-specific soft prompts and merge them into a unified safety guidance. Experiments on five datasets show that PromptGuard is 3.8 times faster than existing content moderation methods and outperforms eight state-of-the-art defense methods; evaluated with a multi-head safety classifier and a VLM-based guardrail, the average unsafe ratios are 5.84% and 6.18%, respectively. Code and datasets are released at https://t2i-promptguard.github.io/。
Related events and news
1 events · 1 news mentions
News that mentions this paper
Adversa AI:编码智能体安全需自建与采购分层
- Adversa AInames the paperAdversa AI 作者建议:编码智能体安全自建组织特有管道,采购跨厂商统一视图
On benign prompts that contain trigger words, PromptGuard scored 0.88% accuracy.