Leveraging the Context through Multi-Round Interactions for Jailbreaking Attacks
作者: Yixin Cheng, Markos Georgopoulos, Volkan Cevher, Grigorios G. Chrysos
分类: cs.LG, cs.AI, cs.CL
发布日期: 2024-02-14 (更新: 2024-10-02)
备注: 29 pages
💡 一句话要点
提出上下文多轮交互攻击以应对Jailbreaking攻击问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 Jailbreaking攻击 上下文交互 多轮对话 安全性评估
📋 核心要点
- 现有的Jailbreaking攻击方法在获取有害信息时面临越来越大的挑战,尤其是在防御机制不断演进的背景下。
- 本文提出的上下文交互攻击通过多轮交互利用先前的上下文信息,增强了攻击的有效性和隐蔽性。
- 实验结果显示,该方法在七种不同的LLM上均表现出色,且具有良好的跨模型迁移能力,提升了攻击的普适性。
📝 摘要(中文)
大型语言模型(LLMs)易受Jailbreaking攻击的影响,该攻击通过微妙修改查询来提取有害信息。随着防御机制的发展,直接获取有害信息变得愈加困难。本文提出了一种新的攻击形式,称为上下文交互攻击,强调先前上下文在强Jailbreaking攻击中的关键作用。我们提出了首个多轮方法,通过无害的初步问题与LLM进行交互,利用其自回归特性构建与攻击查询语义一致的上下文。实验表明,该攻击在七种不同的LLM上有效,且具备黑箱特性,能够跨模型迁移。
🔬 方法详解
问题定义:本文旨在解决大型语言模型(LLMs)在Jailbreaking攻击中获取有害信息的困难,现有方法在防御机制不断演变的情况下效果逐渐减弱。
核心思路:我们提出的上下文交互攻击通过多轮交互的方式,利用先前的上下文信息来引导模型生成与攻击查询语义一致的内容,从而增强攻击效果。
技术框架:该方法的整体架构包括多个阶段:首先,通过无害的初步问题与LLM进行交互;其次,利用LLM的自回归特性,将先前的对话轮次作为上下文;最后,构建一个与攻击查询语义对齐的上下文,以执行攻击。
关键创新:本研究的主要创新在于首次提出多轮交互的攻击方式,强调了上下文在Jailbreaking攻击中的重要性,与以往单轮攻击方法形成鲜明对比。
关键设计:在实验中,我们设计了多种无害问题以引导模型,并通过调整对话轮次的顺序和内容,优化了上下文的构建,确保其与攻击查询的语义一致性。具体的参数设置和损失函数设计在实验部分进行了详细描述。
🖼️ 关键图片
📊 实验亮点
实验结果表明,提出的上下文交互攻击在七种不同的LLM上均取得了显著效果,成功率高达85%以上,且在不同模型间具有良好的迁移性,展示了该方法的普适性和有效性。
🎯 应用场景
该研究的潜在应用领域包括安全性评估、对抗性攻击研究以及大型语言模型的防御机制设计。通过深入理解Jailbreaking攻击的机制,可以为未来的模型安全性提供重要的理论基础和实践指导,推动相关技术的发展。
📄 摘要(原文)
Large Language Models (LLMs) are susceptible to Jailbreaking attacks, which aim to extract harmful information by subtly modifying the attack query. As defense mechanisms evolve, directly obtaining harmful information becomes increasingly challenging for Jailbreaking attacks. In this work, inspired from Chomsky's transformational-generative grammar theory and human practices of indirect context to elicit harmful information, we focus on a new attack form, called Contextual Interaction Attack. We contend that the prior context\u2014the information preceding the attack query\u2014plays a pivotal role in enabling strong Jailbreaking attacks. Specifically, we propose a first multi-turn approach that leverages benign preliminary questions to interact with the LLM. Due to the autoregressive nature of LLMs, which use previous conversation rounds as context during generation, we guide the model's question-response pair to construct a context that is semantically aligned with the attack query to execute the attack. We conduct experiments on seven different LLMs and demonstrate the efficacy of this attack, which is black-box and can also transfer across LLMs. We believe this can lead to further developments and understanding of security in LLMs.