arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.22851cs.CVcs.AI
收藏

语义手术:扩散模型中的零样本概念擦除

Semantic Surgery: Zero-Shot Concept Erasure in Diffusion Models

National University of Singapore(国立新加坡大学);Sichuan University(四川大学)

Lexiang Xiong, Chengyu Liu, Jingwen Ye, Yan Liu, Yuecong Xu

AI总结:

提出语义手术框架,通过动态校准文本嵌入向量减法实现零样本概念擦除,兼顾完整性与局部性,在多项任务上超越现有方法并保持图像质量。

摘要:

在文本到图像扩散模型中,概念擦除对于减轻有害内容至关重要,然而现有方法常常损害生成质量。我们引入了语义手术(Semantic Surgery),一种新颖的无需训练、零样本的概念擦除框架,它直接在扩散过程之前的文本嵌入上操作。该框架动态估计提示中目标概念的存在,并执行校准的向量减法以在源头中和其影响,从而增强擦除的完整性和局部性。该框架包括一个共现编码(Co-Occurrence Encoding)模块,用于稳健的多概念擦除,以及一个视觉反馈循环,以解决潜在概念的持续性问题。作为一种无需训练的方法,语义手术能够动态适应每个提示,确保精确干预。在物体、露骨内容、艺术风格和多名人擦除任务上的大量实验表明,我们的方法显著优于最先进的方法。我们在保持局部性和图像质量的同时,实现了卓越的完整性和稳健性(例如,物体擦除中H分数为93.58,将露骨内容减少到仅1个实例,风格擦除中H_a为8.09且无质量下降)。这种稳健性还使我们的框架能够充当内置的威胁检测系统,为更安全的文本到图像生成提供实用解决方案。

英文摘要:

Concept erasure in text-to-image diffusion models is crucial for mitigating harmful content, yet existing methods often compromise generative quality. We introduce Semantic Surgery, a novel training-free, zero-shot framework for concept erasure that operates directly on text embeddings before the diffusion process. It dynamically estimates the presence of target concepts in a prompt and performs a calibrated vector subtraction to neutralize their influence at the source, enhancing both erasure completeness and locality. The framework includes a Co-Occurrence Encoding module for robust multi-concept erasure and a visual feedback loop to address latent concept persistence. As a training-free method, Semantic Surgery adapts dynamically to each prompt, ensuring precise interventions. Extensive experiments on object, explicit content, artistic style, and multi-celebrity erasure tasks show our method significantly outperforms state-of-the-art approaches. We achieve superior completeness and robustness while preserving locality and image quality (e.g., 93.58 H-score in object erasure, reducing explicit content to just 1 instance, and 8.09 H_a in style erasure with no quality degradation). This robustness also allows our framework to function as a built-in threat detection system, offering a practical solution for safer text-to-image generation.

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

↑