Skip to main content
QUICK REVIEW

[Paper Review] Jailbreak Attacks and Defenses Against Large Language Models: A Survey

Sibo Yi, Yule Liu|arXiv (Cornell University)|Jul 5, 2024
Hate Speech and Cyberbullying DetectionComputer Science7 citations
TL;DR

A comprehensive taxonomy of jailbreak attack and defense methods for LLMs, detailing white-box/black-box attacks, prompt/model defenses, and evaluation approaches, with insights on attack-defense relationships and benchmarks.

ABSTRACT

Large Language Models (LLMs) have performed exceptionally in various text-generative tasks, including question answering, translation, code completion, etc. However, the over-assistance of LLMs has raised the challenge of "jailbreaking", which induces the model to generate malicious responses against the usage policy and society by designing adversarial prompts. With the emergence of jailbreak attack methods exploiting different vulnerabilities in LLMs, the corresponding safety alignment measures are also evolving. In this paper, we propose a comprehensive and detailed taxonomy of jailbreak attack and defense methods. For instance, the attack methods are divided into black-box and white-box attacks based on the transparency of the target model. Meanwhile, we classify defense methods into prompt-level and model-level defenses. Additionally, we further subdivide these attack and defense methods into distinct sub-classes and present a coherent diagram illustrating their relationships. We also conduct an investigation into the current evaluation methods and compare them from different perspectives. Our findings aim to inspire future research and practical implementations in safeguarding LLMs against adversarial attacks. Above all, although jailbreak remains a significant concern within the community, we believe that our work enhances the understanding of this domain and provides a foundation for developing more secure LLMs.

Motivation & Objective

  • Provide a systematic taxonomy of jailbreak attack methods (white-box and black-box) and defense methods (prompt-level and model-level).
  • Map relationships between attack and defense techniques and identify cross-applicability of defenses.
  • Summarize current evaluation metrics, benchmarks, and datasets used in jailbreak research.
  • Highlight vulnerabilities and future directions to improve LLM safety and security.

Proposed method

  • Classify attack methods into white-box (gradient-based, logits-based, fine-tuning-based) and black-box (template completion, prompt rewriting, LLM-based generation).
  • Classify defenses into prompt-level (detection, perturbation, system prompts) and model-level (supervised fine-tuning, RLHF, gradient/logit analysis, proxy defenses).
  • Provide a coherent diagram (Figure 1) of relationships and a taxonomy (Figure 2) of jailbreak attacks.
  • Survey various sub-classes with representative studies and outline their core ideas and outcomes.
  • Summarize evaluation methods, metrics, and benchmarks used in jailbreak research.
Figure 1 : The taxonomy and relationship of attack and defense methods.
Figure 1 : The taxonomy and relationship of attack and defense methods.

Experimental results

Research questions

  • RQ1What are the main categories and sub-categories of jailbreak attack methods against LLMs?
  • RQ2What defenses exist at the prompt level and model level, and how do they relate to specific attacks?
  • RQ3How do current evaluation approaches assess jailbreak effectiveness and safety robustness?
  • RQ4What are the key vulnerabilities across attack types and how can defenses generalize across attacks?
  • RQ5What future directions can strengthen LLM safety against jailbreaks?

Key findings

  • Jailbreak methods are effectively organized into white-box and black-box categories with multiple sub-classes across gradients, logits, fine-tuning, template completion, prompt rewriting, and LLM-driven generation.
  • Defenses operate at prompt-level (detection, perturbation, system prompts) and model-level (supervised fine-tuning, RLHF, gradient/logit analysis, proxy defenses) and show cross-attack effectiveness.
  • Newer attacks emphasize readable and efficient adversarial prompts (AutoDAN, ARCA) and exploit decoding, multilingual, and code-related vulnerabilities to bypass safeguards.
  • Fine-tuning-based attacks are highly effective at degrading safety alignment with relatively small amounts of malicious data, raising urgent defense needs.
  • Contextual and in-context jailbreaks (scenario nesting, in-context attacks) and code-injection approaches demonstrate evolving attack surfaces beyond direct prompt manipulation.
  • Cipher and other non-natural-language prompt formats (ASCII art, encryption-based prompts) reveal gaps in current safety alignments against non-English or encoded inputs.
Figure 3 : A schematic diagram of gradient-based attack.
Figure 3 : A schematic diagram of gradient-based 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.