[论文解读] Ring-A-Bell! How Reliable are Concept Removal Methods for Diffusion Models?
该论文提出了一种模型无关的红队测试工具 Ring-A-Bell,通过提示工程和对抗性概念提取,识别并生成可绕过文本到图像扩散模型安全机制的提示。实验表明,即使采用 ESD、SLD 和微调后的 Stable Diffusion 等概念移除方法,也能以高达 98.8% 的攻击成功率(ASR)实现绕过,揭示了当前安全防御机制中的关键漏洞。
Diffusion models for text-to-image (T2I) synthesis, such as Stable Diffusion (SD), have recently demonstrated exceptional capabilities for generating high-quality content. However, this progress has raised several concerns of potential misuse, particularly in creating copyrighted, prohibited, and restricted content, or NSFW (not safe for work) images. While efforts have been made to mitigate such problems, either by implementing a safety filter at the evaluation stage or by fine-tuning models to eliminate undesirable concepts or styles, the effectiveness of these safety measures in dealing with a wide range of prompts remains largely unexplored. In this work, we aim to investigate these safety mechanisms by proposing one novel concept retrieval algorithm for evaluation. We introduce Ring-A-Bell, a model-agnostic red-teaming tool for T2I diffusion models, where the whole evaluation can be prepared in advance without prior knowledge of the target model. Specifically, Ring-A-Bell first performs concept extraction to obtain holistic representations for sensitive and inappropriate concepts. Subsequently, by leveraging the extracted concept, Ring-A-Bell automatically identifies problematic prompts for diffusion models with the corresponding generation of inappropriate content, allowing the user to assess the reliability of deployed safety mechanisms. Finally, we empirically validate our method by testing online services such as Midjourney and various methods of concept removal. Our results show that Ring-A-Bell, by manipulating safe prompting benchmarks, can transform prompts that were originally regarded as safe to evade existing safety mechanisms, thus revealing the defects of the so-called safety mechanisms which could practically lead to the generation of harmful contents. Our codes are available at https://github.com/chiayi-hsu/Ring-A-Bell.
研究动机与目标
- 评估文本到图像扩散模型中概念移除与安全过滤机制的可靠性。
- 识别部署的安全机制中存在的漏洞,这些漏洞允许生成禁止内容或 NSFW 内容。
- 开发一种可扩展、模型无关的红队测试框架,仅依赖文本编码器即可离线运行。
- 证明提示工程可有效绕过在线服务和微调后的安全机制。
- 为评估安全机制在真实对抗性提示下的鲁棒性提供系统性基准。
提出的方法
- Ring-A-Bell 使用文本编码器(如 CLIP)执行概念提取,构建如裸露和暴力等敏感概念的全局表征。
- 通过生成提示对来构建对抗性概念数据库,使语义相似度最大化,同时最小化可检测性。
- 采用基于遗传算法(GA)或 PeZ 的离散优化方法,搜索可绕过安全过滤的有效对抗性提示。
- 采用可微分提示优化框架,从多个提示对中学习经验性概念表征 $\hat{c}$,以提升泛化能力。
- 攻击成功率(ASR)计算为:在对抗性提示下,由分类器(Q16)判定为不适当内容的生成图像比例。
- 该框架可离线运行,无需访问目标模型的权重,因此适用于 Midjourney 等在线服务。
实验结果
研究问题
- RQ1能否通过对抗性提示可靠地绕过文本到图像扩散模型中的现有概念移除方法?
- RQ2提示工程在不修改模型的情况下,生成绕过安全机制的提示有多有效?
- RQ3超参数 $\eta$ 和 $K$ 对对抗性提示生成成功率有何影响?
- RQ4提示对数量 $N$ 如何影响提取的对抗性概念的鲁棒性和泛化能力?
- RQ5在生成有效对抗性提示方面,不同优化策略(GA 与 PeZ)的对比表现如何?
主要发现
- Ring-A-Bell 在 Midjourney 上对与暴力相关的提示实现了 98.8% 的攻击成功率(ASR),在 SLD-Medium 上为 97.6%,表明其具备极强的绕过能力。
- 对于裸露内容,Ring-A-Bell 在 Stable Diffusion 上实现了 93.68% 的 ASR,在 SLD-Medium 上为 91.58%,即使在安全机制启用的情况下也有效。
- $\eta$ 的最优值为:裸露为 3,暴力为 5.5,超过这些值后性能趋于平稳或下降。
- 使用更多提示对($N=50$)可提升泛化能力,并提高 ASR:裸露为 93.68%,暴力为 99.60%,优于 $N=10$ 的情况。
- GA 在生成对抗性提示方面优于 PeZ,尤其在 ESD 和 SLD 等更鲁棒的模型上表现更优,在 ESD 上对裸露内容的 ASR 达 35.79%。
- 该方法成功绕过了 Midjourney 等在线服务以及 ESD 和 SLD 等微调模型的安全机制,揭示了当前安全防御体系中的系统性缺陷。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。