Jailbreaking › Visualization: The Geometry of Jailbreaks

Michael BrenndoerferJanuary 13, 20263 min read
Language AI HandbookAll chapters
Part 60 of 67Safety and Security
Chapter 459Jailbreaking › Visualization: The Geometry of Jailbreaks
Reading section 5 of 18 · Visualization: The Geometry of Jailbreaks · 3 minSection 5 of 18 · 3 min

Book contents

Section 5 of 18 · 3 min read

Jailbreaking › Visualization: The Geometry of JailbreaksOne section · Sections in this chapter5 / 18 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

To understand jailbreaking geometrically, it helps to think about what safety training does in representation space. A safety-trained model learns to map harmful inputs to a region of activation space associated with refusal responses. Jailbreaks move the activations away from this refusal region.

In[4]:
Code
import numpy as np

np.random.seed(42)
Out[5]:
Visualization
2D scatter plot showing harmful requests in a refusal zone and jailbreaks in an affirmative zone, connected by arrows.
Conceptual visualization of jailbreak geometry in a 2D projection of model representation space. Harmful requests (red X markers) fall in the refusal zone (light blue), while successful jailbreaks (orange circles) move the effective input representation into the affirmative response zone (light green). Arrows connect each harmful request to its jailbroken variant, showing how attacks shift the representation across the decision boundary (dashed gray line).

The diagram illustrates the conceptual mechanism: safety training partitions representation space into refusal and affirmative regions. Harmful requests fall in the refusal region by design. Jailbreaks, whether through prompt manipulation or adversarial suffixes, shift the effective representation to the affirmative region. Notice that the decision boundary is smooth and continuous, not a crisp wall. There is a transition region near the boundary where the model's behavior is unpredictable, which corresponds to ambiguous inputs that might be refused or answered depending on small contextual details. Many manual jailbreaks work by constructing inputs that land in or near this boundary region.