[2307.15043] Universal and Transferable Adversarial Attacks on Aligned Language Models
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 this http URL.
Universal and Transferable Adversarial Attacks on Aligned Language Models Andy Zou1,2 , Zifan Wang2 , Nicholas Carlini3 , Milad Nasr3 , J. Zico Kolter1,4 , Matt Fredrikson1 arXiv:2307.15043v2 [cs.CL] 20 Dec 2023 1 Carnegie Mellon University, 2 Center for AI Safety,…
related reading
- Universal and Transferable Attacks on Aligned Language Modelsllm-attacks.org
- Adversarial Attacks on Aligned Language Models | Gray Swan Researchgrayswan.ai
- Adversarial Attacks on LLMs | Lil'Loglilianweng.github.io
- 2306.15447.pdfarxiv.org
- [2502.17424] Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMsarxiv.org
- RigorLLM: Resilient Guardrails for Large Language Models against Undesired Contentarxiv.org
- [2203.02155] Training language models to follow instructions with human feedbackarxiv.org
- Narrow Misalignment is Hard, Emergent Misalignment is Easy — LessWronglesswrong.com
- 2408.12798arxiv.org
- [2304.11082] Fundamental Limitations of Alignment in Large Language Modelsarxiv.org
- Voices Across Registers: Corpus-Conditioned Vernacular Jailbreaks against Aligned LLMs via Fanfiction Subgenresarxiv.org
- [2602.04899] Phantom Transfer: Data-level Defences are Insufficient Against Data Poisoningarxiv.org