Skip to main content
QUICK REVIEW

[论文解读] Black Box Adversarial Prompting for Foundation Models

Natalie Maus, Patrick Chao|arXiv (Cornell University)|Feb 8, 2023
Generative Adversarial Networks and Image SynthesisComputer Science被引用 13
一句话总结

本文提出一个黑盒框架,通过 Token Space Projection 将连续嵌入映射到离散标记,发现用于视觉和语言基础模型的对抗提示,并使用 Square Attack 和贝叶斯优化来优化提示。

ABSTRACT

Prompting interfaces allow users to quickly adjust the output of generative models in both vision and language. However, small changes and design choices in the prompt can lead to significant differences in the output. In this work, we develop a black-box framework for generating adversarial prompts for unstructured image and text generation. These prompts, which can be standalone or prepended to benign prompts, induce specific behaviors into the generative process, such as generating images of a particular object or generating high perplexity text.

研究动机与目标

  • 在黑盒设置下激励对通用视觉与语言任务的对抗性提示研究。
  • 引入 Token Space Projection 技术,将连续嵌入与离散语言标记连接起来。
  • 开发并评估在不同威胁模型下搜索对抗性提示的优化方法。
  • 证明小的提示增强就能将模型输出引导到特定类别或行为。

提出的方法

  • 定义对抗性提示并对生成的响应提出基于损失的目标函数。
  • 引入 Token Space Projection,通过最近标记投影将连续嵌入映射到离散提示。
  • 在嵌入空间使用黑盒优化器(Square Attack 和 TuRBO)并结合 EMR 松弛进行优化。
  • 在分类器和特征损失目标下评估两种提示类别(独立提示和前置提示)。
  • 应用受限的提示设置以避免高相似度标记,并研究对前置提示应用于预定义种子。
(a) Images generated by Stable Diffusion v1.5 [ 59 ] using the prompts (Left) ‘ a picture of a mountain ’ and (Right) ‘ turbo lhaff✓a picture of a mountain ’, found by our method. The prepended text causes the model to consistently generate dogs rather than mountains.
(a) Images generated by Stable Diffusion v1.5 [ 59 ] using the prompts (Left) ‘ a picture of a mountain ’ and (Right) ‘ turbo lhaff✓a picture of a mountain ’, found by our method. The prepended text causes the model to consistently generate dogs rather than mountains.

实验结果

研究问题

  • RQ1在黑盒设置下是否能找到用于图像和文本生成任务的对抗性提示?
  • RQ2Token Space Projection 在实现对离散提示空间的黑盒优化中的有效程度?
  • RQ3哪些威胁模型与损失函数能实现对视觉与语言模型的可靠对抗性提示?
  • RQ4与基线方法相比,黑盒优化器在高维提示空间中的表现如何?

主要发现

  • 在黑盒设置下可找到用于文本转图像和文本生成任务的对抗性提示。
  • Token Space Projection 使得能在离散标记空间中使用连续嵌入进行有效优化。
  • 两种黑盒优化器(Square Attack 和 TuRBO)在不同任务与威胁模型下取得成功。
  • 对抗性提示可以将图像生成引导到目标类别,并生成不连贯或高困惑度的文本。
  • 通过排除高相似度标记来限制提示会增加任务难度但仍然可行。
(a) Task 2 generated images with the class lizard .
(a) Task 2 generated images with the class lizard .

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。