[论文解读] Stable Diffusion is Unstable
该论文提出了一种针对文本到图像模型的自动攻击方法(ATM),这是一种基于梯度的可微方法,通过在词替换或扩展上学习Gumbel Softmax分布来生成对抗性文本提示,从而实现对Stable Diffusion的高效白盒攻击。ATM在短文本攻击中达到91.1%的成功率,在长文本攻击中达到81.2%,同时保持与原始提示的高语义相似度,揭示了文本到图像模型中的四种关键脆弱性模式。
Recently, text-to-image models have been thriving. Despite their powerful generative capacity, our research has uncovered a lack of robustness in this generation process. Specifically, the introduction of small perturbations to the text prompts can result in the blending of primary subjects with other categories or their complete disappearance in the generated images. In this paper, we propose Auto-attack on Text-to-image Models (ATM), a gradient-based approach, to effectively and efficiently generate such perturbations. By learning a Gumbel Softmax distribution, we can make the discrete process of word replacement or extension continuous, thus ensuring the differentiability of the perturbation generation. Once the distribution is learned, ATM can sample multiple attack samples simultaneously. These attack samples can prevent the generative model from generating the desired subjects without compromising image quality. ATM has achieved a 91.1% success rate in short-text attacks and an 81.2% success rate in long-text attacks. Further empirical analysis revealed four attack patterns based on: 1) the variability in generation speed, 2) the similarity of coarse-grained characteristics, 3) the polysemy of words, and 4) the positioning of words.
研究动机与目标
- 为解决文本到图像生成中的鲁棒性不足问题,即微小的提示扰动会导致主体消失或错误生成。
- 克服传统手工、定性提示设计在漏洞发现中的局限性,实现自动化、数据驱动的攻击生成。
- 开发一种可学习、可微的方法,生成高相似度、高效的对抗性提示,以探测模型的不稳定性。
- 通过对抗性行为的实证分析,识别并表征文本到图像模型中的系统性失败模式。
提出的方法
- ATM使用温度衰减的Gumbel Softmax,对离散的词替换或扩展进行可微松弛,从而实现对提示扰动的基于梯度的优化。
- 通过二值掩码保留目标名词,同时允许对其他词语进行修改,确保目标主体在语义上保持锚定。
- 通过CLIP分类器和边缘损失优化提示嵌入,以最大化生成图像的误分类。
- 通过自回归语言建模和基于BERTScore的正则化,施加流畅性和语义相似性约束,以保持提示的质量与连贯性。
- 攻击在Stable Diffusion上以白盒设置进行训练,支持向其他模型(如DALL·E 2和Midjourney)的迁移。
- 训练完成后,同时采样多个攻击提示,实现对对抗性扰动空间的高效探索。
实验结果
研究问题
- RQ1当文本到图像模型受到微小、有针对性的提示扰动时,其关键失败模式是什么?
- RQ2如何使对抗性提示生成过程可微且高效,以实现对文本到图像模型的白盒攻击?
- RQ3为某一模型(如Stable Diffusion)生成的攻击提示,在多大程度上可迁移至其他模型(如DALL·E 2或Midjourney)?
- RQ4流畅性和语义相似性约束如何影响对抗性提示的成功率与质量?
- RQ5注意力机制或提示处理中的哪些底层漏洞会导致主体忽略或错误生成?
主要发现
- ATM在短文本提示攻击中实现了91.1%的成功率,在长文本提示攻击中达到81.2%,表现出高度有效性。
- 引入流畅性和语义相似性约束后,文本相似度(TS)提升至0.84,同时保持81.2%的高攻击成功率。
- 该方法成功实现黑盒迁移,生成了高质量、语义连贯的提示,对DALL·E 2和Midjourney实现了有效攻击。
- 消融实验表明,同时结合流畅性和语义约束在相似度与成功率之间实现了最佳权衡,优于单独使用任一约束。
- 识别出四种不同的攻击模式:生成速度的变异性、粗粒度特征的相似性、词语的多义性,以及词语位置的敏感性。
- 该方法在不同采样器间表现出良好的可迁移性,在DDIM上实现81.2%的成功率,在更强的DPM-Solver采样器上达到76.5%。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。