Safety

Universal Adversarial LLM Attacks

First page
Universal Adversarial LLM Attacks
Paper summary

Finds universal and transferable adversarial attacks that cause aligned models like ChatGPT and Bard to generate objectionable behaviors.

Ask this paper

Key points
01

Automatic suffix generation: Uses a combination of greedy and gradient-based search to automatically produce adversarial suffixes that bypass alignment safeguards.

02

Universal transferability: A single adversarial suffix found on open models transfers to proprietary models like GPT-4, Claude, and Bard, revealing a systemic weakness.

03

Jailbreaking industrialized: Demonstrated that automated attacks could produce unlimited variants, forcing a rethink of alignment robustness beyond manual red-teaming.

04

Foundational safety paper: Became one of the most-cited adversarial robustness papers of 2023 and a reference point for later work on refusal training and representation-level defenses.

Abstract

Because "out-of-the-box" large language models are capable of generating a great deal of objectionable content, recent work has focused on aligning these models in an attempt to prevent undesirable generation. While there has been some success at circumventing these measures -- so-called "jailbreaks" against LLMs -- these attacks have required significant human ingenuity and are brittle in practice. In this paper, we propose a simple and effective attack method that causes aligned language models to generate objectionable behaviors. Specifically, our approach finds a suffix that, when attached to a wide range of queries for an LLM to produce objectionable content, aims to maximize the probability that the model produces an affirmative response (rather than refusing to answer). However, instead of relying on manual engineering, our approach automatically produces these adversarial suffixes by a combination of greedy and gradient-based search techniques, and also improves over past automatic prompt generation methods. Surprisingly, we find that the adversarial prompts generated by our approach are quite transferable, including to black-box, publicly released LLMs. Specifically, we train an adversarial attack suffix on multiple prompts (i.e., queries asking for many different types of objectionable content), as well as multiple models (in our case, Vicuna-7B and 13B). When doing so, the resulting attack suffix is able to induce objectionable content in the public interfaces to ChatGPT, Bard, and Claude, as well as open source LLMs such as LLaMA-2-Chat, Pythia, Falcon, and others. In total, this work significantly advances the state-of-the-art in adversarial attacks against aligned language models, raising important questions about how such systems can be prevented from producing objectionable information. Code is available at github.com/llm-attacks/llm-attacks.

Every Monday
Get next week’s papers.
Subscribe on Substack