SneakyPrompt:越狱文本到图像生成模型
SneakyPrompt: Jailbreaking Text-to-image Generative Models
AI总结:
提出首个自动化攻击框架SneakyPrompt,利用强化学习扰动提示令牌,绕过安全过滤器,成功越狱DALL·E 2和Stable Diffusion生成NSFW图像,优于现有文本对抗攻击。
摘要:
文本到图像生成模型,如Stable Diffusion和DALL$\cdot$E 2,由于生成了有害图像(如不适合工作场所(NSFW)的图像)而引发了许多伦理问题。为了解决这些伦理问题,通常采用安全过滤器来防止NSFW图像的生成。在这项工作中,我们提出了SneakyPrompt,这是第一个自动化攻击框架,用于越狱文本到图像生成模型,使得即使采用了安全过滤器,它们也能生成NSFW图像。给定一个被安全过滤器阻止的提示,SneakyPrompt反复查询文本到图像生成模型,并根据查询结果策略性地扰动提示中的令牌,以绕过安全过滤器。具体来说,SneakyPrompt利用强化学习来指导令牌的扰动。我们的评估表明,SneakyPrompt成功越狱了带有闭箱安全过滤器的DALL$\cdot$E 2,以生成NSFW图像。此外,我们还在Stable Diffusion模型上部署了几个最先进的开源安全过滤器。我们的评估表明,SneakyPrompt不仅成功生成了NSFW图像,而且在扩展到越狱文本到图像生成模型时,在查询次数和生成的NSFW图像质量方面都优于现有的文本对抗攻击。SneakyPrompt是开源的,可在此仓库获取:\url{https://github.com/Yuchen413/text2image_safety}。
英文摘要:
Text-to-image generative models such as Stable Diffusion and DALL$\cdot$E raise many ethical concerns due to the generation of harmful images such as Not-Safe-for-Work (NSFW) ones. To address these ethical concerns, safety filters are often adopted to prevent the generation of NSFW images. In this work, we propose SneakyPrompt, the first automated attack framework, to jailbreak text-to-image generative models such that they generate NSFW images even if safety filters are adopted. Given a prompt that is blocked by a safety filter, SneakyPrompt repeatedly queries the text-to-image generative model and strategically perturbs tokens in the prompt based on the query results to bypass the safety filter. Specifically, SneakyPrompt utilizes reinforcement learning to guide the perturbation of tokens. Our evaluation shows that SneakyPrompt successfully jailbreaks DALL$\cdot$E 2 with closed-box safety filters to generate NSFW images. Moreover, we also deploy several state-of-the-art, open-source safety filters on a Stable Diffusion model. Our evaluation shows that SneakyPrompt not only successfully generates NSFW images, but also outperforms existing text adversarial attacks when extended to jailbreak text-to-image generative models, in terms of both the number of queries and qualities of the generated NSFW images. SneakyPrompt is open-source and available at this repository: \url{https://github.com/Yuchen413/text2image_safety}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。