Tree of Attacks: Jailbreaking Black-Box LLMs Automatically

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Mehrotra, Anay, Zampetakis, Manolis, Kassianik, Paul, Nelson, Blaine, Anderson, Hyrum, Singer, Yaron, Karbasi, Amin
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912097514815488
author Mehrotra, Anay
Zampetakis, Manolis
Kassianik, Paul
Nelson, Blaine
Anderson, Hyrum
Singer, Yaron
Karbasi, Amin
author_facet Mehrotra, Anay
Zampetakis, Manolis
Kassianik, Paul
Nelson, Blaine
Anderson, Hyrum
Singer, Yaron
Karbasi, Amin
contents While Large Language Models (LLMs) display versatile functionality, they continue to generate harmful, biased, and toxic content, as demonstrated by the prevalence of human-designed jailbreaks. In this work, we present Tree of Attacks with Pruning (TAP), an automated method for generating jailbreaks that only requires black-box access to the target LLM. TAP utilizes an attacker LLM to iteratively refine candidate (attack) prompts until one of the refined prompts jailbreaks the target. In addition, before sending prompts to the target, TAP assesses them and prunes the ones unlikely to result in jailbreaks, reducing the number of queries sent to the target LLM. In empirical evaluations, we observe that TAP generates prompts that jailbreak state-of-the-art LLMs (including GPT4-Turbo and GPT4o) for more than 80% of the prompts. This significantly improves upon the previous state-of-the-art black-box methods for generating jailbreaks while using a smaller number of queries than them. Furthermore, TAP is also capable of jailbreaking LLMs protected by state-of-the-art guardrails, e.g., LlamaGuard.
format Preprint
id arxiv_https___arxiv_org_abs_2312_02119
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
Mehrotra, Anay
Zampetakis, Manolis
Kassianik, Paul
Nelson, Blaine
Anderson, Hyrum
Singer, Yaron
Karbasi, Amin
Machine Learning
Artificial Intelligence
Computation and Language
Cryptography and Security
While Large Language Models (LLMs) display versatile functionality, they continue to generate harmful, biased, and toxic content, as demonstrated by the prevalence of human-designed jailbreaks. In this work, we present Tree of Attacks with Pruning (TAP), an automated method for generating jailbreaks that only requires black-box access to the target LLM. TAP utilizes an attacker LLM to iteratively refine candidate (attack) prompts until one of the refined prompts jailbreaks the target. In addition, before sending prompts to the target, TAP assesses them and prunes the ones unlikely to result in jailbreaks, reducing the number of queries sent to the target LLM. In empirical evaluations, we observe that TAP generates prompts that jailbreak state-of-the-art LLMs (including GPT4-Turbo and GPT4o) for more than 80% of the prompts. This significantly improves upon the previous state-of-the-art black-box methods for generating jailbreaks while using a smaller number of queries than them. Furthermore, TAP is also capable of jailbreaking LLMs protected by state-of-the-art guardrails, e.g., LlamaGuard.
title Tree of Attacks: Jailbreaking Black-Box LLMs Automatically
topic Machine Learning
Artificial Intelligence
Computation and Language
Cryptography and Security
url https://arxiv.org/abs/2312.02119