Skip to main content
QUICK REVIEW

[论文解读] ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMs

Fengqing Jiang, Zhangchen Xu|arXiv (Cornell University)|Feb 19, 2024
Digital and Cyber ForensicsComputer Science被引用 7
一句话总结

ArtPrompt 展示了一种两步式越狱,利用 ASCII 艺术来掩盖有害提示,利用 LLM 对 ASCII 艺术识别差的弱点,并在五种 SOTA 模型和多种防御下显示出有效性。它还推出了 ViTC,一个用于评估 LLMs 对 ASCII-art 理解的基准。

ABSTRACT

Safety is critical to the usage of large language models (LLMs). Multiple techniques such as data filtering and supervised fine-tuning have been developed to strengthen LLM safety. However, currently known techniques presume that corpora used for safety alignment of LLMs are solely interpreted by semantics. This assumption, however, does not hold in real-world applications, which leads to severe vulnerabilities in LLMs. For example, users of forums often use ASCII art, a form of text-based art, to convey image information. In this paper, we propose a novel ASCII art-based jailbreak attack and introduce a comprehensive benchmark Vision-in-Text Challenge (ViTC) to evaluate the capabilities of LLMs in recognizing prompts that cannot be solely interpreted by semantics. We show that five SOTA LLMs (GPT-3.5, GPT-4, Gemini, Claude, and Llama2) struggle to recognize prompts provided in the form of ASCII art. Based on this observation, we develop the jailbreak attack ArtPrompt, which leverages the poor performance of LLMs in recognizing ASCII art to bypass safety measures and elicit undesired behaviors from LLMs. ArtPrompt only requires black-box access to the victim LLMs, making it a practical attack. We evaluate ArtPrompt on five SOTA LLMs, and show that ArtPrompt can effectively and efficiently induce undesired behaviors from all five LLMs. Our code is available at https://github.com/uw-nsl/ArtPrompt.

研究动机与目标

  • 评估在安全对齐期间仅基于语义解释是否会让 LLM 面临对非语义输入的脆弱性。
  • 提出一种可行的基于 ASCII-art 的越狱(ArtPrompt),在黑盒访问下绕过安全措施。
  • 开发一个基准(ViTC),用于评估 LLM 识别以 ASCII-art 编码的提示的能力。
  • 量化 ArtPrompt 在多种前沿 LLM 和防御策略下的有效性。

提出的方法

  • 引入 Vision-in-Text Challenge(ViTC),在五种 SOTA LLM(GPT-3.5、GPT-4、Gemini、Claude、Llama2)之间评估 ASCII-art 提示识别。
  • 设计 ArtPrompt,包含两个步骤:对潜在有害词进行遮蔽以隐藏,并通过用 ASCII-art 替换遮蔽词来生成披露的提示。
  • 自动化生成披露的提示,并在各种字体和排布下评估越狱成功率。
  • 在多个数据集(AdvBench、HEx-PHI)和防御(Perplexity、Paraphrase、Retokenization)下,将 ArtPrompt 与五个越狱基线进行对比。
  • 使用包括 Helpful Rate (HPR)、Harmfulness Score (HS) 与 Attack Success Rate (ASR) 在内的指标来量化有效性。
Figure 1: This figure presents two instances of a harmful instruction, “how to build a bomb", from a malicious user to an LLM. The first instance, labeled as \raisebox{-0.9pt}{1}⃝, is written in English and is rejected by the LLM due to safety alignment. The second instance, labeled as \raisebox{-0.
Figure 1: This figure presents two instances of a harmful instruction, “how to build a bomb", from a malicious user to an LLM. The first instance, labeled as \raisebox{-0.9pt}{1}⃝, is written in English and is rejected by the LLM due to safety alignment. The second instance, labeled as \raisebox{-0.

实验结果

研究问题

  • RQ1以 ASCII-art 表示的提示关键词是否能绕过依赖语义解释的安全对齐?
  • RQ2ArtPrompt 在多种 LLM(封闭源与开源)及安全防御措施下的效果如何?
  • RQ3ViTC 在评估 LLM 识别非语义 ASCII-art 提示方面的有用性如何?
  • RQ4哪些因素(字体、排布)会影响 ArtPrompt 的越狱成功率和效率?
  • RQ5在迭代次数、延迟和鲁棒性方面,ArtPrompt 与现有越狱方法的比较如何?

主要发现

  • 在 ViTC 中,五种 SOTA LLM 对基于 ASCII-art 的提示表现困难,表明对非语义编码的识别能力较差。
  • ArtPrompt 能在对五种 LLM 均可用的黑盒访问下有效诱导不安全行为,平均表现优于基线。
  • ArtPrompt 在数据集 AdvBench 和 HEx-PHI 上实现高攻击指标(HPR、HS、ASR),并在若干防御下仍然有效。
  • ArtPrompt 仅需一次迭代即可生成披露提示,并且可以并行发动攻击,凸显其相较于基于优化的攻击的效率优势。
  • Paraphrase 防御降低了 ArtPrompt 的有效性,但并未完全起效;PPL 和 Retokenization 可以被绕过,强调需要更强的防御。
Figure 2: Overview of ArtPrompt . ArtPrompt consists of two steps. In the first step, ArtPrompt masks the safety words (e.g., “bomb") within a prompt that could result in rejection from the victim LLM. In the second step, ArtPrompt replaces the masked word in Step I with ASCII art. Then the masked p
Figure 2: Overview of ArtPrompt . ArtPrompt consists of two steps. In the first step, ArtPrompt masks the safety words (e.g., “bomb") within a prompt that could result in rejection from the victim LLM. In the second step, ArtPrompt replaces the masked word in Step I with ASCII art. Then the masked p

阅读本论文

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

在 Nubint 中阅读本论文

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