arXiv:2502.08011cs.AI2025-02NeurIPS被引 19

不重训模型,直接修改采样路径避免生成不安全内容。

Training-Free Safe Denoisers for Safe Use of Diffusion Models

  • 通过负例集直接干预采样轨迹,避开不安全数据区域。
  • 无需微调或重训练,在三类生成场景中均有效规避指定区域。
  • 适合需要快速部署安全控制的图像生成应用。

扩散模型(DMs)的安全性引发广泛关注,因其常被用于生成不当、不适合工作场合(NSFW)的内容,或侵犯版权及个人隐私信息。现有方法多依赖文本负向提示或大量重训练来消除特定特征。本文提出一种全新思路:直接通过负例集(如不安全图像、受版权保护数据或需排除的数据点)修改采样轨迹,无需重训练或微调即可避开目标数据分布区域。我们形式化推导了安全与非安全去噪样本间的关联,提出“安全去噪器”,确保最终生成样本远离被否定区域。基于该理论,我们设计了一种实用算法,在文本条件、类别条件和无条件图像生成场景中均能生成高质量且安全的样本。结果表明,该训练自由安全去噪器在保障扩散模型安全使用方面具有巨大潜力。

原文摘要 · Abstract (English)

There is growing concern over the safety of powerful diffusion models (DMs), as they are often misused to produce inappropriate, not-safe-for-work (NSFW) content or generate copyrighted material or data of individuals who wish to be forgotten. Many existing methods tackle these issues by heavily relying on text-based negative prompts or extensively retraining DMs to eliminate certain features or samples. In this paper, we take a radically different approach, directly modifying the sampling trajectory by leveraging a negation set (e.g., unsafe images, copyrighted data, or datapoints needed to be excluded) to avoid specific regions of data distribution, without needing to retrain or fine-tune DMs. We formally derive the relationship between the expected denoised samples that are safe and those that are not safe, leading to our $\textit{safe}$ denoiser which ensures its final samples are away from the area to be negated. Inspired by the derivation, we develop a practical algorithm that successfully produces high-quality samples while avoiding negation areas of the data distribution in text-conditional, class-conditional, and unconditional image generation scenarios. These results hint at the great potential of our training-free safe denoiser for using DMs more safely.

扩散模型安全生成去噪器零训练

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。