Jailbreaking Black Box Large Language Models in Twenty Queries

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Chao, Patrick, Robey, Alexander, Dobriban, Edgar, Hassani, Hamed, Pappas, George J., Wong, Eric
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909261909458944
author Chao, Patrick
Robey, Alexander
Dobriban, Edgar
Hassani, Hamed
Pappas, George J.
Wong, Eric
author_facet Chao, Patrick
Robey, Alexander
Dobriban, Edgar
Hassani, Hamed
Pappas, George J.
Wong, Eric
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2310_08419
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Jailbreaking Black Box Large Language Models in Twenty Queries
Chao, Patrick
Robey, Alexander
Dobriban, Edgar
Hassani, Hamed
Pappas, George J.
Wong, Eric
Machine Learning
Artificial Intelligence
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.
title Jailbreaking Black Box Large Language Models in Twenty Queries
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2310.08419