Skip to main content
QUICK REVIEW

[论文解读] A Cross-Language Investigation into Jailbreak Attacks in Large Language Models

Jie Li, Yi Liu|arXiv (Cornell University)|Jan 30, 2024
Hate Speech and Cyberbullying DetectionComputer Science被引用 7
一句话总结

这篇论文构建了一个语义保留的多语种越狱数据集,并在开源和商业大型语言模型上评估多语言越狱防御,揭示微调带来的强显著缓解效果(攻击降低 96.2%)。

ABSTRACT

Large Language Models (LLMs) have become increasingly popular for their advanced text generation capabilities across various domains. However, like any software, they face security challenges, including the risk of 'jailbreak' attacks that manipulate LLMs to produce prohibited content. A particularly underexplored area is the Multilingual Jailbreak attack, where malicious questions are translated into various languages to evade safety filters. Currently, there is a lack of comprehensive empirical studies addressing this specific threat. To address this research gap, we conducted an extensive empirical study on Multilingual Jailbreak attacks. We developed a novel semantic-preserving algorithm to create a multilingual jailbreak dataset and conducted an exhaustive evaluation on both widely-used open-source and commercial LLMs, including GPT-4 and LLaMa. Additionally, we performed interpretability analysis to uncover patterns in Multilingual Jailbreak attacks and implemented a fine-tuning mitigation method. Our findings reveal that our mitigation strategy significantly enhances model defense, reducing the attack success rate by 96.2%. This study provides valuable insights into understanding and mitigating Multilingual Jailbreak attacks.

研究动机与目标

  • 解决缺乏多语种越狱基准测试与在多样化 LLMs 上评估的问题。
  • 开发一个自动化的语义保留的九语言越狱提示数据集。
  • 分析多语言越狱响应的可解释性模式。
  • 提出并评估一项缓解策略以防御 LLMs 遭受多语言越狱攻击。

提出的方法

  • 开发一种新颖的语义保留算法,自动生成九种语言的多语言越狱数据。
  • 使用 Microsoft Translate 将英文恶意问题翻译,并用基于相似性的算法筛选翻译结果。
  • 使用七个模板和八个禁忌场景,在多种 LLMs 和语言中评估越狱成功率。
  • 应用可解释性技术,包括注意力可视化和表示分析,以理解多语言越狱行为。
  • 在 Vicuna-7B-v1.5 上实现安全微调缓解(LoRA),并衡量攻击率降低。
Figure 1. Example of jailbreak prompt with jailbreak template and malicious question and Jailbreak prompt with malicious question only. These Jailbreak prompts are adopted in our experiments.
Figure 1. Example of jailbreak prompt with jailbreak template and malicious question and Jailbreak prompt with malicious question only. These Jailbreak prompts are adopted in our experiments.

实验结果

研究问题

  • RQ1RQ1:在不同的 LLM 和语言中,多语言 LLM 越狱的效果有多大?
  • RQ2RQ2:在不同语言下,LLMs 的防御机制存在哪些差异?
  • RQ3RQ3:哪些策略可以缓解多语言 LLM 越狱?

主要发现

  • 该多语言数据集在九种语言中包含 365 个有效的多语言问题组合。
  • 高参数的 LLaMA 变体在有意与无意场景下都显示出更强的逃避防御能力。
  • GPT-4 在有意逃避方面优于 GPT-3.5,但在无意情况下的防御改进并不那么显著。
  • 在 Vicuna-7B-v1.5 上的微调方法(LoRA)在不损害模型性能的前提下,将攻击成功率显著降低 96.2%。
Figure 2. Example of multilingual LLM jailbreak. The original prompt in English can be identified by LLM but bypasses its safety mechanism when translated into Spanish.
Figure 2. Example of multilingual LLM jailbreak. The original prompt in English can be identified by LLM but bypasses its safety mechanism when translated into Spanish.

阅读本论文

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

在 Nubint 中阅读本论文

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