纪律性扩散:对抗生成不适宜内容的文本到图像扩散模型
Disciplined Diffusion: Text-to-Image Diffusion Model against NSFW Generation
AI总结:
本文提出Disciplined Diffusion,通过语义检索和局部编辑技术,有效识别并抑制生成图像中的恶意内容,提升文本到图像扩散模型的安全性与生成质量。
摘要:
文本到图像(T2I)扩散模型能够根据文本提示生成高质量图像,但其存在安全风险,因可能生成冒犯或令人不安的图像。现有安全过滤器通常依赖基于文本的分类器或基于图像的检查器,一旦检测到威胁就完全阻止输出,向用户发出明确的允许/阻止反馈信号。这种二元策略使模型容易受到对抗攻击,通过改变关键词来绕过检测,并导致高误报率,影响良性用户的体验。为了解决这些漏洞,我们提出了Disciplined Diffusion(DDiffusion),一种新的稳健文本到图像扩散模型,通过揭示提示嵌入中的隐含恶意语义来对抗不适宜内容生成。DDiffusion利用语义检索机制评估提示相对于概念分布,而不是依赖脆弱的成对相似性。此外,它在扩散过程中采用定位方法,仅选择性地编辑生成图像中的有害区域。通过返回局部净化的图像而不是应用统一阻止,DDiffusion在抑制恶意内容的同时,保持对良性提示的生成保真度,并避免现有探测攻击所依赖的二元允许-禁止信号。
英文摘要:
Text-to-image (T2I) diffusion models have the ability to build high-quality pictures from text prompts, but they pose safety concerns because they can generate offensive or disturbing imagery when provided with harmful inputs. Existing safety filters typically rely on text-based classifiers or image-based checkers that completely block the output upon detecting a threat, issuing an explicit allow/block feedback signal to the user. This binary strategy leaves models vulnerable to adversarial attacks that alter keywords to bypass detection, and it causes high false-alarm rates that degrade the experience for benign users. To address such vulnerabilities, we propose Disciplined Diffusion (DDiffusion), a novel robust text-to-image diffusion that counters Not Safe For Work (NSFW) generation by uncovering implicit malicious semantics in prompt embeddings. DDiffusion leverages a semantic retrieval mechanism to evaluate prompts against concept distributions rather than relying on brittle pairwise similarity. Furthermore, it employs a localization method during the diffusion process to selectively edit only the harmful regions of the generated image. By returning locally sanitized images instead of applying uniform blocking, DDiffusion suppresses malicious content while preserving generation fidelity for benign prompts and avoiding the binary allow-deny signal on which existing probing attacks rely.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。