NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Understanding Jailbreak Success: A Study of Latent Space Dynamics in Large Language Models

Sarah Ball, Frauke Kreuter, Nina Rimsky

Abstract

Conversational large language models are trained to refuse to answer harmful questions. However, emergent jailbreaking techniques can still elicit unsafe outputs, presenting an ongoing challenge for model alignment. To better understand how different jailbreak types circumvent safeguards, this paper analyses model activations on different jailbreak inputs. We find that it is possible to extract a jailbreak vector from a single class of jailbreaks that works to mitigate jailbreak effectiveness from other semantically-dissimilar classes. This may indicate that different kinds of effective jailbreaks operate via a similar internal mechanism. We investigate a potential common mechanism of harmfulness feature suppression, and find evidence that effective jailbreaks noticeably reduce a model's perception of prompt harmfulness. These findings offer actionable insights for developing more robust jailbreak countermeasures and lay the groundwork for a deeper, mechanistic understanding of jailbreak dynamics in language models.

Introduction

Despite rigorous safety alignment using techniques like Reinforcement Learning from Human Feedback (RLHF), Large Language Models (LLMs) remain vulnerable to "jailbreaks." These are carefully crafted prompts designed to bypass safety filters. Jailbreaks are remarkably diverse, ranging from simple role-playing scenarios to complex adversarial suffixes like GCG. This research investigates whether these diverse attacks exploit a unified "master key" within the model's latent space or if they function through disparate mechanisms.

Methodology

The study employs Activation Steering and Contrastive Analysis to probe the internal dynamics of models including Vicuna (7B and 13B), Qwen1.5 (14B), and MPT (7B).

  1. Vector Extraction: A "jailbreak vector" is derived by calculating the mean difference in activations between a jailbroken prompt and its harmless counterpart.
  2. Activation Steering: During inference, this vector is subtracted from the model's residual stream (typically at middle layers) to attempt to restore safety guardrails.
  3. Harmfulness Analysis: A "harmfulness vector" is defined by contrasting harmful and harmless questions. The researchers then measure the cosine similarity between model activations and this vector to determine if jailbreaks effectively "hide" the prompt's harmful intent.

Key Insights: Suppressing the "Alarm Bell"

A core finding is that harmful and harmless prompts are linearly separable in the model's latent space. This allows for the identification of a specific "direction" for harmfulness that the model uses to trigger safety refusals.

PCA plot showing the linear separability of harmful and harmless prompts in the latent space.

The authors found that effective jailbreaks consistently reduce the model's internal perception of harmfulness. Essentially, the jailbreak dampens the model's "alarm bell" (the harmfulness feature), making the prompt appear benign to the model's internal safety checks.

Key Results: Mitigation and Transferability

The most striking result is that jailbreak vectors are transferable. A vector extracted from one type of attack (e.g., prefix injection) can successfully mitigate a completely different type (e.g., GCG adversarial suffixes).

Cosine similarity heatmaps of jailbreak vectors, illustrating their high degree of similarity across different attack types and models.

This transferability is supported by high cosine similarity scores (typically 0.4 to 0.6) between different jailbreak types. Quantitatively, steering with the style_injection_short vector reduced the Attack Success Rate (ASR) to 0.00% for Vicuna 7B and Qwen 14B. Conversely, adding the jailbreak vector to standard harmful requests successfully induced jailbreaks, achieving a 92.86% ASR for GCG on Qwen 14B.

Limitations and Conclusion

While these findings provide strong evidence for a common mechanism of harmfulness suppression, the authors note that other factors, such as "instruction-following dominance," may also play a role. Additionally, steering can occasionally impact answer quality or lead to over-refusal of harmless content. Future research will explore whether these dynamics extend to multi-turn "Many-Shot" jailbreaking techniques. Overall, this work provides a foundational mechanistic understanding of jailbreak dynamics, offering a path toward more robust LLM safety alignment.

Summary updated

BibTeX
@misc{ball2024understanding,
  author = {Sarah Ball and Frauke Kreuter and Nina Rimsky},
  title = {{Understanding Jailbreak Success: A Study of Latent Space Dynamics in Large Language Models}},
  year = {2024},
  eprint = {2406.09289},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09289},
}
Figure