Skip to main content
QUICK REVIEW

[Paper Review] Tricking LLMs into Disobedience: Formalizing, Analyzing, and Detecting Jailbreaks

Abhinav Rao, Sachin Vashistha|arXiv (Cornell University)|May 24, 2023
Digital and Cyber ForensicsComputer Science15 citations
TL;DR

The paper formalizes jailbreaks (prompt-injection) for LLMs, proposes a taxonomy and formal setup, surveys attack effectiveness across models, and discusses lightweight guardrails and detection strategies.

ABSTRACT

Recent explorations with commercial Large Language Models (LLMs) have shown that non-expert users can jailbreak LLMs by simply manipulating their prompts; resulting in degenerate output behavior, privacy and security breaches, offensive outputs, and violations of content regulator policies. Limited studies have been conducted to formalize and analyze these attacks and their mitigations. We bridge this gap by proposing a formalism and a taxonomy of known (and possible) jailbreaks. We survey existing jailbreak methods and their effectiveness on open-source and commercial LLMs (such as GPT-based models, OPT, BLOOM, and FLAN-T5-XXL). We further discuss the challenges of jailbreak detection in terms of their effectiveness against known attacks. For further analysis, we release a dataset of model outputs across 3700 jailbreak prompts over 4 tasks.

Motivation & Objective

  • Formalize the jailbreak problem as prompt-injection with a multi-actor setup.
  • Develop a taxonomy of jailbreak types, intents, and attack manners.
  • Empirically evaluate attack effectiveness across multiple models and tasks.
  • Propose and assess limited prompt-guard strategies for mitigation.
  • Discuss challenges in detection and defense against jailbreaks.

Proposed method

  • Define a formal prompt framework with prompters, end users, and a misalignment/attack concept.
  • Classify jailbreaks by linguistic transformation, attacker intent, and manner of attack.
  • Design and execute property tests to measure task divergence under attacks across tasks (translation, classification, code generation, summarization) and models (OPT, BLOOM, GPT-3.5, FLAN-T5-xxl).
  • Use base prompts and 49 manually crafted attack prompts to evaluate attack success across tasks and models.
  • Analyze qualitative model behavior to explain performance differences and identify guardrail effectiveness (prompt formatting and checksums).
  • Discuss limited mitigation strategies (batch prompt guard, checksum guard) and their observed effects.
Figure 1: A jailbreaking pipeline. (Attack borrowed from a social media post 2 2 2 shorturl.at/hjkmX )
Figure 1: A jailbreaking pipeline. (Attack borrowed from a social media post 2 2 2 shorturl.at/hjkmX )

Experimental results

Research questions

  • RQ1How can jailbreaks in LLMs be formalized and categorized across transformation types, intents, and attack manners?
  • RQ2How effective are various jailbreaks across different models and tasks?
  • RQ3What lightweight defenses (prompt guards) can mitigate jailbreaks, and how effective are they?
  • RQ4What factors (model size, training, architecture) influence robustness to jailbreaks?

Key findings

  • Cognitive hacking is the most successful attack type among those tested and is also the most common in real-world jailbreaks.
  • Classification tasks showed no successful jailbreaks under the tested conditions, while other tasks were more vulnerable.
  • FLAN-T5-XXL generally performed poorly relative to OPT and BLOOM across most axes, with notably low attack success in summarization.
  • GPT-3.5 text-davinci-003 appeared more robust to many attacks, suggesting stronger alignment or robustness from its training.
  • Prompt guards (notably for text-davinci-003) can be effective against Direct Instruction attacks, indicating potential practical mitigations.
  • The work highlights the need for sanitization, preprocessing, and acknowledging the trade-off between model functionality and security in defense design.
Figure 2: Setup describing the attack process and manner of attack
Figure 2: Setup describing the attack process and manner of attack

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.