arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.09446cs.CVcs.AIcs.CR
收藏

稀疏自编码器作为文本到图像扩散模型中概念擦除的零样本分类器

Sparse Autoencoder as a Zero-Shot Classifier for Concept Erasing in Text-to-Image Diffusion Models

Zhejiang University(浙江大学);National University of Singapore(新加坡国立大学);Peking University(北京大学)

Zhihua Tian, Sirun Nan, Ming Xu, Shengfang Zhai, Wenjie Qu, Jian Liu, Ruoxi Jia, Jiaheng Zhang

AI总结:

提出ItD框架,利用稀疏自编码器作为零样本分类器,通过停用目标概念相关特征实现精确概念擦除,同时保持正常生成性能,并支持多概念擦除和对抗性鲁棒性。

摘要:

文本到图像(T2I)扩散模型在生成高质量图像方面取得了显著进展,但也引发了人们对生成有害或误导性内容的担忧。尽管已有大量方法被提出用于擦除不需要的概念而无需从头重新训练,但它们不可避免地会降低正常生成任务的性能。在这项工作中,我们提出了“先解释后停用”(Interpret then Deactivate, ItD)这一新颖框架,能够在保持整体性能的同时实现T2I扩散模型中精确的概念移除。ItD首先使用稀疏自编码器(SAE)将每个概念解释为多个特征的组合。通过永久停用与目标概念相关的特定特征,我们将SAE重新用作一个零样本分类器,用于识别输入提示是否包含目标概念,从而允许在扩散模型中进行选择性概念擦除。此外,我们证明ItD可以轻松扩展以擦除多个概念,而无需进一步训练。跨名人身份、艺术风格和露骨内容的综合实验表明,ItD在消除目标概念的同时不会干扰正常概念的生成。此外,ItD对旨在规避内容过滤器的对抗性提示也具有鲁棒性。代码可在以下网址获取:https://github.com/NANSirun/Interpret-then-deactivate。

英文摘要:

Text-to-image (T2I) diffusion models have achieved remarkable progress in generating high-quality images but also raise people's concerns about generating harmful or misleading content. While extensive approaches have been proposed to erase unwanted concepts without requiring retraining from scratch, they inadvertently degrade performance on normal generation tasks. In this work, we propose Interpret then Deactivate (ItD), a novel framework to enable precise concept removal in T2I diffusion models while preserving overall performance. ItD first employs a sparse autoencoder (SAE) to interpret each concept as a combination of multiple features. By permanently deactivating the specific features associated with target concepts, we repurpose SAE as a zero-shot classifier that identifies whether the input prompt includes target concepts, allowing selective concept erasure in diffusion models. Moreover, we demonstrate that ItD can be easily extended to erase multiple concepts without requiring further training. Comprehensive experiments across celebrity identities, artistic styles, and explicit content demonstrate ItD's effectiveness in eliminating targeted concepts without interfering with normal concept generation. Additionally, ItD is also robust against adversarial prompts designed to circumvent content filters. Code is available at: https://github.com/NANSirun/Interpret-then-deactivate.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑