ArtPrompt: ASCII Art-based Jailbreak Attacks against Aligned LLMs

📄 arXiv: 2402.11753v4 📥 PDF

作者: Fengqing Jiang, Zhangchen Xu, Luyao Niu, Zhen Xiang, Bhaskar Ramasubramanian, Bo Li, Radha Poovendran

分类: cs.CL, cs.AI

发布日期: 2024-02-19 (更新: 2024-06-07)

备注: To appear in ACL 2024

🔗 代码/项目: GITHUB


💡 一句话要点

提出ArtPrompt以解决大语言模型安全性问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 越狱攻击 ASCII艺术 安全性对齐 大型语言模型 对抗性攻击 模型脆弱性 多模态输入

📋 核心要点

  1. 现有的安全对齐技术假设LLMs的语料库仅通过语义进行解释,导致在实际应用中存在严重漏洞。
  2. 本文提出ArtPrompt越狱攻击,利用LLMs在识别ASCII艺术方面的弱点,绕过安全措施并引发不当行为。
  3. 实验结果表明,ArtPrompt能够有效诱导五种最先进的LLMs产生不当行为,显示出其攻击的有效性和实用性。

📝 摘要(中文)

安全性是大型语言模型(LLMs)使用中的关键问题。现有技术如数据过滤和监督微调假设用于安全对齐的语料库仅通过语义进行解释,但这一假设在实际应用中并不成立,导致LLMs存在严重漏洞。用户在论坛中常用ASCII艺术传达图像信息。本文提出了一种新颖的基于ASCII艺术的越狱攻击,并引入了综合基准Vision-in-Text Challenge(ViTC),以评估LLMs在识别无法仅通过语义解释的提示方面的能力。我们发现五种最先进的LLMs(GPT-3.5、GPT-4、Gemini、Claude和Llama2)在识别ASCII艺术提示时表现不佳。基于这一观察,我们开发了ArtPrompt越狱攻击,利用LLMs在识别ASCII艺术方面的弱点,绕过安全措施并引发不当行为。ArtPrompt仅需黑箱访问受害LLMs,具有实用性。我们在五种最先进的LLMs上评估了ArtPrompt,结果显示其能有效诱导不当行为。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在安全性对齐中的脆弱性,现有方法未能考虑ASCII艺术等非语义信息的影响,导致LLMs在实际应用中易受攻击。

核心思路:论文提出的ArtPrompt越狱攻击利用了LLMs在识别ASCII艺术时的低效表现,通过这种方式绕过安全机制,诱导模型产生不当行为。

技术框架:整体架构包括数据收集、攻击生成和效果评估三个主要模块。首先收集ASCII艺术数据,然后设计攻击提示,最后评估不同LLMs的响应。

关键创新:ArtPrompt的主要创新在于首次将ASCII艺术作为攻击媒介,揭示了LLMs在处理非传统文本输入时的脆弱性,与传统的基于语义的攻击方法本质上不同。

关键设计:在设计中,ArtPrompt仅需黑箱访问受害模型,且攻击提示的生成依赖于ASCII艺术的特征,确保了攻击的隐蔽性和有效性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,ArtPrompt能够有效诱导五种最先进的LLMs产生不当行为,且在ASCII艺术提示的识别上表现出显著的性能差距。这一发现强调了现有安全对齐技术的不足,为未来的研究提供了新的方向。

🎯 应用场景

该研究的潜在应用领域包括网络安全、AI模型的安全性评估以及对抗性攻击的研究。通过识别和利用LLMs的脆弱性,能够帮助开发更安全的AI系统,提升其在实际应用中的可靠性和安全性。未来,相关技术可能会被广泛应用于保护用户数据和防止恶意攻击。

📄 摘要(原文)

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.