用自然语言生成恶意图像,暴露模型在真实场景下的脆弱性。
Natural Language Induced Adversarial Images
- 通过文本生成模型构造带误导语义的对抗图像。
- 发现'雾蒙蒙'等高频语义易引发分类错误,且可跨模型迁移。
- 无需梯度优化,适配商业文生图模型,适合安全测试与鲁棒性研究。
对抗攻击研究对AI安全至关重要,能揭示深度学习模型的脆弱性并推动更鲁棒模型的构建。图像对抗攻击主要分为基于噪声、图像编辑和潜在空间的方法,但这些方法生成的对抗样本语义信息不足,难以反映真实场景下的模型失效模式。为此,本文提出一种自然语言诱导的对抗图像攻击方法:利用文本到图像模型,根据恶意构造的提示词生成导致目标模型误分类的对抗图像。为适配商用文生图模型,提出无梯度的自适应遗传算法优化离散提示词,并设计自适应词空间缩减方法提升查询效率。同时使用CLIP保持生成图像的语义一致性。实验发现,'foggy'、'humid'、'stretching'等高频语义信息极易引发分类错误,此类对抗语义不仅存在于生成图像中,也存在于真实照片中。部分对抗语义具有跨任务迁移能力。攻击还可迁移至不同文生图模型(如Midjourney、DALL-E 3)和图像分类器。代码已开源。
原文摘要 · Abstract (English)
Research of adversarial attacks is important for AI security because it shows the vulnerability of deep learning models and helps to build more robust models. Adversarial attacks on images are most widely studied, which include noise-based attacks, image editing-based attacks, and latent space-based attacks. However, the adversarial examples crafted by these methods often lack sufficient semantic information, making it challenging for humans to understand the failure modes of deep learning models under natural conditions. To address this limitation, we propose a natural language induced adversarial image attack method. The core idea is to leverage a text-to-image model to generate adversarial images given input prompts, which are maliciously constructed to lead to misclassification for a target model. To adopt commercial text-to-image models for synthesizing more natural adversarial images, we propose an adaptive genetic algorithm (GA) for optimizing discrete adversarial prompts without requiring gradients and an adaptive word space reduction method for improving query efficiency. We further used CLIP to maintain the semantic consistency of the generated images. In our experiments, we found that some high-frequency semantic information such as "foggy", "humid", "stretching", etc. can easily cause classifier errors. This adversarial semantic information exists not only in generated images but also in photos captured in the real world. We also found that some adversarial semantic information can be transferred to unknown classification tasks. Furthermore, our attack method can transfer to different text-to-image models (e.g., Midjourney, DALL-E 3, etc.) and image classifiers. Our code is available at: https://github.com/zxp555/Natural-Language-Induced-Adversarial-Images.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。