Skip to main content
QUICK REVIEW

[论文解读] Jailbreaking Black Box Large Language Models in Twenty Queries

Patrick Chao, Alexander Robey|arXiv (Cornell University)|Oct 12, 2023
Topic ModelingComputer Science被引用 45
一句话总结

PAIR 使用一个黑盒攻击者自动为目标 LLM 生成语义越狱提示,通常在 twenty queries 内发现越狱并转移到其他模型。

ABSTRACT

There is growing interest in ensuring that large language models (LLMs) align with human values. However, the alignment of such models is vulnerable to adversarial jailbreaks, which coax LLMs into overriding their safety guardrails. The identification of these vulnerabilities is therefore instrumental in understanding inherent weaknesses and preventing future misuse. To this end, we propose Prompt Automatic Iterative Refinement (PAIR), an algorithm that generates semantic jailbreaks with only black-box access to an LLM. PAIR -- which is inspired by social engineering attacks -- uses an attacker LLM to automatically generate jailbreaks for a separate targeted LLM without human intervention. In this way, the attacker LLM iteratively queries the target LLM to update and refine a candidate jailbreak. Empirically, PAIR often requires fewer than twenty queries to produce a jailbreak, which is orders of magnitude more efficient than existing algorithms. PAIR also achieves competitive jailbreaking success rates and transferability on open and closed-source LLMs, including GPT-3.5/4, Vicuna, and Gemini.

研究动机与目标

  • Motivate and enable rapid evaluation of LLM alignment by stress-testing with automated jailbreaks.
  • Develop a scalable, human-interpretable prompt-level jailbreak method that minimizes human input.
  • Enable black-box interaction between attacker and target LLMs to discover jailbreaks efficiently.
  • Assess transferability of prompts across multiple open- and closed-source LLMs.

提出的方法

  • Introduce PAIR, which pits an attacker LLM against a target LLM in a fully automated loop.
  • Use an attacker system prompt and chat history to iteratively refine candidate jailbreak prompts.
  • Evaluate candidate prompts with a JUDGE function powered by an LLM to score jailbreaks from 1 to 10.
  • Parallelize the search with multiple streams to balance breadth and depth of exploration.
  • Choose Vicuna-13B-v1.5 as the attacker for its balance of expressivity and safety alignment.
  • Operate entirely with black-box access, enabling use without model weights or GPUs.
Figure 1 : Schematic of PAIR. PAIR pits an attacker and target language model against one another, where the attacker model aims to generate adversarial prompts that jailbreak the target model. The generated prompt $P$ is input into the target model to generate response $R$ . The attacker model uses
Figure 1 : Schematic of PAIR. PAIR pits an attacker and target language model against one another, where the attacker model aims to generate adversarial prompts that jailbreak the target model. The generated prompt $P$ is input into the target model to generate response $R$ . The attacker model uses

实验结果

研究问题

  • RQ1Can PAIR discover semantic, prompt-level jailbreaks with black-box access to target LLMs?
  • RQ2How does PAIR perform in terms of jailbreak success rate and query efficiency across open- and closed-source models?
  • RQ3What is the transferability of PAIR-generated jailbreak prompts to other LLMs?
  • RQ4How do attacker choice and system prompts affect PAIR’s effectiveness?
  • RQ5What are the trade-offs in using parallel streams and iteration depth for jailbreak discovery?

主要发现

  • PAIR often finds jailbreaks in under twenty queries to the target LLM.
  • PAIR achieves high jailbreak rates on several models, including GPT-3.5/4, Vicuna, and PaLM-2.
  • PAIRS’ attacks transfer to other models more effectively when prompts are semantically grounded.
  • Compared to GCG, PAIR uses orders of magnitude fewer queries (up to five orders) and is faster.
  • Attacker model choice and system prompt design significantly impact jailbreak success and efficiency.
  • Transferability is strong for Vicuna prompts to GPT-4 and PaLM-2 but limited for Claude models.
Figure 2 : Example of a prompt-level jailbreak from PAIR and token-level jailbreak from GCG.
Figure 2 : Example of a prompt-level jailbreak from PAIR and token-level jailbreak from GCG.

阅读本论文

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

在 Nubint 中阅读本论文

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