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

SteerDiff:引导文本到图像扩散模型走向安全

SteerDiff: Steering towards Safe Text-to-Image Diffusion Models

University of California, Davis(加州大学戴维斯分校)

Hongxiang Zhang, Yifeng He, Hao Chen

AI总结:

针对现有文本到图像扩散模型安全防护易被绕过、灵活性不足的问题,提出轻量级适配器模块SteerDiff,通过操控文本嵌入空间的不当概念引导模型安全生成,经多任务与红队测试验证其有效性与鲁棒性,还可用于概念遗忘任务。

摘要:

文本到图像(T2I)扩散模型凭借生成与文本精准对齐的高质量图像的能力备受关注,但这类模型也可能被滥用来生成不当内容。现有安全措施通常依赖文本分类器或类ControlNet的方法,往往效果不足。传统文本分类器依赖大规模标注数据集,且很容易通过改写表述绕过。随着扩散模型规模持续扩大,微调这些安全防护机制的难度越来越高,且缺乏灵活性。近期的红队攻击研究进一步凸显了需要一种新范式来阻止不当内容生成。本文提出SteerDiff,这是一种轻量级适配器模块,作为用户输入与扩散模型之间的中介,确保生成的图像符合伦理与安全标准,同时对可用性的影响极小甚至没有。SteerDiff会识别并操控文本嵌入空间中的不当概念,引导模型避免生成有害输出。我们在多种概念遗忘任务上开展了大量实验以评估该方法的有效性,还针对多种红队攻击策略对SteerDiff进行基准测试以评估其鲁棒性。最后,我们探索了SteerDiff在概念遗忘任务中的潜力,证明了其在文本条件图像生成任务中的通用性。

英文摘要:

Text-to-image (T2I) diffusion models have drawn attention for their ability to generate high-quality images with precise text alignment. However, these models can also be misused to produce inappropriate content. Existing safety measures, which typically rely on text classifiers or ControlNet-like approaches, are often insufficient. Traditional text classifiers rely on large-scale labeled datasets and can be easily bypassed by rephrasing. As diffusion models continue to scale, fine-tuning these safeguards becomes increasingly challenging and lacks flexibility. Recent red-teaming attack researches further underscore the need for a new paradigm to prevent the generation of inappropriate content. In this paper, we introduce SteerDiff, a lightweight adaptor module designed to act as an intermediary between user input and the diffusion model, ensuring that generated images adhere to ethical and safety standards with little to no impact on usability. SteerDiff identifies and manipulates inappropriate concepts within the text embedding space to guide the model away from harmful outputs. We conduct extensive experiments across various concept unlearning tasks to evaluate the effectiveness of our approach. Furthermore, we benchmark SteerDiff against multiple red-teaming strategies to assess its robustness. Finally, we explore the potential of SteerDiff for concept forgetting tasks, demonstrating its versatility in text-conditioned image generation.

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

↑