让扩散模型学会彻底删除不安全概念,避免生成违规内容。
SAGE: Exploring the Boundaries of Unsafe Concept Domain with Semantic-Augment Erasing
- 用语义增强擦除机制,将单词级擦除升级为概念域擦除。
- 在不依赖额外数据的情况下,有效清除不安全概念边界表示。
- 适合需要高安全性文本生成的AI应用开发者使用。
扩散模型(DMs)在文本到图像生成方面取得显著进展,但预训练过程中不可避免地包含敏感信息,带来生成不安全内容和版权侵权等安全风险。概念擦除通过微调权重来消除不良概念,成为一种有前景的解决方案。然而,现有方法将不安全概念视为固定词汇并重复擦除,导致模型陷入‘词汇概念深渊’,难以实现泛化概念擦除。为此,我们提出语义增强擦除,通过循环自检与自擦除机制,将词汇擦除转化为概念域擦除,利用原始模型与训练模型间的语义空间关系,高效探索并消除概念域边界表征,无需额外预处理数据。同时,为缓解擦除不安全概念时对无关概念的保留退化问题,进一步提出全局-局部协同保留机制,结合全局语义关系对齐与局部预测噪声保持,有效扩展无关概念的保留感受野。我们称该方法为SAGE。大量实验表明,SAGE在扩散模型的安全生成方面全面优于其他方法。代码与权重将在https://github.com/KevinLight831/SAGE公开。
原文摘要 · Abstract (English)
Diffusion models (DMs) have achieved significant progress in text-to-image generation. However, the inevitable inclusion of sensitive information during pre-training poses safety risks, such as unsafe content generation and copyright infringement. Concept erasing finetunes weights to unlearn undesirable concepts, and has emerged as a promising solution. However, existing methods treat unsafe concept as a fixed word and repeatedly erase it, trapping DMs in ``word concept abyss'', which prevents generalized concept-related erasing. To escape this abyss, we introduce semantic-augment erasing which transforms concept word erasure into concept domain erasure by the cyclic self-check and self-erasure. It efficiently explores and unlearns the boundary representation of concept domain through semantic spatial relationships between original and training DMs, without requiring additional preprocessed data. Meanwhile, to mitigate the retention degradation of irrelevant concepts while erasing unsafe concepts, we further propose the global-local collaborative retention mechanism that combines global semantic relationship alignment with local predicted noise preservation, effectively expanding the retentive receptive field for irrelevant concepts. We name our method SAGE, and extensive experiments demonstrate the comprehensive superiority of SAGE compared with other methods in the safe generation of DMs. The code and weights will be open-sourced at https://github.com/KevinLight831/SAGE.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。