JailbreakLens: Visual Analysis of Jailbreak Attacks Against Large Language Models

Yingchaojie Feng, Zhizhang Chen, Zhining Kang, Sijia Wang, Haoyu Tian, Wei Zhang, Minfeng Zhu, Wei Chen · DOI

TL;DR

JailbreakLens is a visual analytics system designed to help security researchers systematically evaluate and understand "jailbreak" attacks on Large Language Models (LLMs). By decomposing complex attack prompts into functional components and providing interactive "what-if" perturbation tools, it allows practitioners to pinpoint exactly why an attack succeeds and where a model's defensive armor is thin.

What Problem Does This Paper Address?

As LLMs become integrated into everything from education to decision-making, their security is paramount. "Jailbreaking"—crafting clever prompts to bypass safety filters (like the infamous "Grandma Trick" where a user asks an AI to act like a grandmother telling a story about how to build a bomb)—remains a persistent threat.

Currently, analyzing these attacks is a manual, grueling process. Researchers struggle with two main issues:

  1. Ambiguous Evaluation: It’s often hard to tell if a model has been "jailbroken." A model might provide harmful info while simultaneously lecturing the user on ethics, leading to inconsistent success metrics.
  2. Complexity of Prompts: Jailbreak prompts are often long, convoluted paragraphs filled with psychological tricks. Understanding which specific part of the prompt—the persona, the formatting constraints, or the scenario—actually caused the failure is incredibly difficult without the right tools.

Methods

The authors propose an LLM-assisted framework that moves beyond simple success rates to a multi-level analysis:

  • Fine-Grained Assessment: Instead of a binary "success/fail," they use an LLM to categorize responses into four levels: Full Refusal, Partial Refusal, Partial Compliance, and Full Compliance. They use a "self-consistency" approach, having the evaluator LLM vote five times on each response to ensure reliability.
  • Component Decomposition: They developed a taxonomy of eight functional prompt components (e.g., Scene Introduction, Subject Characteristic, Task Operation). The system automatically segments long prompts into these categories.
  • Interactive Perturbation: To test the importance of different parts of an attack, the system allows users to Delete, Rephrase, or Switch specific components and immediately see how the model's safety performance changes.
  • Visual Analytics Interface: The JailbreakLens interface (shown in Figure 1) provides a matrix view of performance across different questions and templates, a semantic scatterplot of model responses, and a keyword exploration tool.
Fig. 1. The system overview. (A) The system allows users to configure jailbreak questions and templates for analysis. (B) Then, the system analyzes the jailbreak prompts by evaluating their performance and identifying prompt components and keywords. (C) Finally, the system visualizes the analysis results to support multi-level exploration of jailbreak prompts.

Datasets

The study primarily utilizes the JailbreakChat corpus, a collection of real-world, human-crafted jailbreak prompts. For their technical evaluations, they collaborated with experts to build:

  • An Assessment Dataset: 400 model responses triggered by common jailbreak prompts, manually labeled by experts to test the system's evaluation accuracy.
  • A Classification Dataset: 841 prompt sentences categorized into the eight component types to validate the automatic segmentation tool.

Key Insights and Ideas

  • The Power of Persona: The "Subject Characteristic" (SC) component—where the prompt describes the AI's personality (e.g., "You are an amoral assistant")—was found to be the most critical factor in jailbreak success. Deleting or switching this component often caused the attack to fail entirely.
  • Template Trumps Question: Jailbreak success depends much more on the template (the wrapper) than the specific question (the harmful intent). A strong template will work across many different types of prohibited content.
  • Evolving Keywords: Well-known attack keywords like "DAN" (Do Anything Now) are becoming less effective as model developers specifically train against them. However, more subtle keywords like "disregards" or "controversial" remain highly effective at nudging models toward compliance.
  • Visual Debugging: The use of a square coordinate system for keywords (Figure 4) allows researchers to see at a glance which words are associated with "Full Compliance" (successful attacks) versus "Full Refusal."
Fig. 3. The visual design of (A) prompt components and (B) three types of component perturbation strategies.

Key Results

  • High Accuracy: The automated assessment reached 92.25% accuracy when combined with human refinement, significantly outperforming default LLM evaluations (83%).
  • Efficiency Gains: In expert interviews, researchers were able to refine assessment criteria and identify model weaknesses in nearly half the time (123s vs 229s) compared to using traditional tabular tools like Excel.
  • Model Vulnerability: A case study on GPT-3.5 revealed that more than half of the tested jailbreak attacks were successful, highlighting the ongoing need for tools like JailbreakLens to identify and patch these holes.

Limitations and Future Work

While JailbreakLens is a powerful "black-box" analysis tool, the authors note it does not yet look at the internal mechanisms of the LLMs (like neuron activations). Future work aims to bridge this gap by integrating white-box visualization techniques.

Additionally, the current system focuses on text-based attacks. As Multi-modal LLMs (which process images and text) become common, the authors plan to expand the framework to handle visual jailbreak triggers. Finally, they acknowledge that while the component taxonomy is robust, it still involves a degree of human subjectivity that they hope to mitigate through larger-scale data labeling.

Summary updated

Abstract

The proliferation of large language models (LLMs) has underscored concerns regarding their security vulnerabilities, notably against jailbreak attacks, where adversaries design jailbreak prompts to circumvent safety mechanisms for potential misuse. Addressing these concerns necessitates a comprehensive analysis of jailbreak prompts to evaluate LLMs' defensive capabilities and identify potential weaknesses. However, the complexity of evaluating jailbreak performance and understanding prompt characteristics makes this analysis laborious. We collaborate with domain experts to characterize problems and propose an LLM-assisted framework to streamline the analysis process. It provides automatic jailbreak assessment to facilitate performance evaluation and support analysis of components and keywords in prompts. Based on the framework, we design JailbreakLens, a visual analysis system that enables users to explore the jailbreak performance against the target model, conduct multi-level analysis of prompt characteristics, and refine prompt instances to verify findings. Through a case study, technical evaluations, and expert interviews, we demonstrate our system's effectiveness in helping users evaluate model security and identify model weaknesses.
BibTeX
@article{feng2025jailbreaklens,
  author = {Yingchaojie Feng and Zhizhang Chen and Zhining Kang and Sijia Wang and Haoyu Tian and Wei Zhang and Minfeng Zhu and Wei Chen},
  title = {{JailbreakLens: Visual Analysis of Jailbreak Attacks Against Large Language Models}},
  journal = {IEEE Trans. Vis. Comput. Graph.},
  year = {2025},
  url = {https://openreview.net/forum?id=QWpcWY55PD},
}
Figure