Jailbroken: How Does LLM Safety Training Fail?

Alexander Wei, Nika Haghtalab, Jacob Steinhardt
7/5/2023
cs.LGcs.CR

Official code: cassidylaidlaw/hidden-context (36 stars, last commit 2023-12-14).

Abstract

Large language models trained for safety and harmlessness remain susceptible to adversarial misuse, as evidenced by the prevalence of "jailbreak" attacks on early releases of ChatGPT that elicit undesired behavior. Going beyond recognition of the issue, we investigate why such attacks succeed and how they can be created. We hypothesize two failure modes of safety training: competing objectives and mismatched generalization. Competing objectives arise when a model's capabilities and safety goals conflict, while mismatched generalization occurs when safety training fails to generalize to a domain for which capabilities exist. We use these failure modes to guide jailbreak design and then evaluate state-of-the-art models, including OpenAI's GPT-4 and Anthropic's Claude v1.3, against both existing and newly designed attacks. We find that vulnerabilities persist despite the extensive red-teaming and safety-training efforts behind these models. Notably, new attacks utilizing our failure modes succeed on every prompt in a collection of unsafe requests from the models' red-teaming evaluation sets and outperform existing ad hoc jailbreaks. Our analysis emphasizes the need for safety-capability parity -- that safety mechanisms should be as sophisticated as the underlying model -- and argues against the idea that scaling alone can resolve these safety failure modes.

View on arXivView PDF

Code Implementations(1)

Code and data for the paper "Understanding Hidden Context in Preference Learning: Consequences for RLHF"

369Shell, PythonNov 7, 20232 years ago

Similar Papers

Cite this paper

@article{wei2023jailbroken,
  title  = {Jailbroken: How Does LLM Safety Training Fail?},
  author = {Alexander Wei and Nika Haghtalab and Jacob Steinhardt},
  year   = {2023},
  eprint = {2307.02483},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.02483v1},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.02483.svg)](https://codeofpaper.com/paper/2307.02483)

Discussion