BSPA:探索针对图像生成器的黑盒隐蔽提示攻击
BSPA: Exploring Black-box Stealthy Prompt Attacks against Image Generators
AI总结:
本文提出黑盒隐蔽提示攻击方法 BSPA,利用检索器模拟 API 用户并借助过滤器分数调整敏感词检索空间,无需访问模型内部即可生成隐蔽攻击提示,并构建 NSFWeval 数据集验证其对主流图像生成器的攻击效果与防御建议。
摘要:
超大规模图像生成器在众多领域展现出巨大的变革潜力,用户可以通过某些黑盒 API 设计特定提示来生成逼真图像。然而,一些研究表明,图像生成器极易受到攻击,攻击者通过人工设计的有害文本即可生成不适宜工作场所(NSFW)的内容,且这些文本对人类观察者几乎不可察觉。我们迫切需要大量通用且可迁移的提示来提高图像生成器的安全性,尤其是针对黑盒发布的 API。但现有方法受限于劳动密集型的设计流程,并严重依赖所给指令的质量。为此,我们提出了一种黑盒隐蔽提示攻击方法(BSPA),该方法采用检索器来模拟 API 用户的攻击行为。BSPA 能够有效利用过滤器分数来调整敏感词的检索空间,以匹配输入提示,从而为图像生成器量身定制隐蔽提示。重要的是,该方法与模型无关,无需访问模型内部特征,确保其适用于广泛的图像生成器。基于 BSPA,我们构建了一个自动化提示工具和一个全面的提示攻击数据集(NSFWeval)。大量实验表明,BSPA 能有效挖掘多种最先进可用黑盒模型的安全漏洞,包括 Stable Diffusion XL、Midjourney 和 DALL-E 2/3。此外,我们还开发了一种具有韧性的文本过滤器,并提出了针对性建议,以保障图像生成器在未来抵御提示攻击的安全性。
英文摘要:
Extremely large image generators offer significant transformative potential across diverse sectors. It allows users to design specific prompts to generate realistic images through some black-box APIs. However, some studies reveal that image generators are notably susceptible to attacks and generate Not Suitable For Work (NSFW) contents by manually designed toxin texts, especially imperceptible to human observers. We urgently need a multitude of universal and transferable prompts to improve the safety of image generators, especially black-box-released APIs. Nevertheless, they are constrained by labor-intensive design processes and heavily reliant on the quality of the given instructions. To achieve this, we introduce a black-box stealthy prompt attack (BSPA) that adopts a retriever to simulate attacks from API users. It can effectively harness filter scores to tune the retrieval space of sensitive words for matching the input prompts, thereby crafting stealthy prompts tailored for image generators. Significantly, this approach is model-agnostic and requires no internal access to the model's features, ensuring its applicability to a wide range of image generators. Building on BSPA, we have constructed an automated prompt tool and a comprehensive prompt attack dataset (NSFWeval). Extensive experiments demonstrate that BSPA effectively explores the security vulnerabilities in a variety of state-of-the-art available black-box models, including Stable Diffusion XL, Midjourney, and DALL-E 2/3. Furthermore, we develop a resilient text filter and offer targeted recommendations to ensure the security of image generators against prompt attacks in the future.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。