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

PathSeeker: Exploring LLM Security Vulnerabilities with a Reinforcement Learning-Based Jailbreak Approach

Zhihao Lin, Wei Ma, Mingyi Zhou, Yanjie Zhao, Haoyu Wang, Yang Liu, Jun Wang, Li LiarXiv 2024 · DOI

Abstract

As Large Language Models (LLMs) achieve widespread deployment, ensuring their safety against adversarial "jailbreaking" remains a paramount concern. This paper introduces PathSeeker, a state-of-the-art black-box jailbreak framework that conceptualizes the bypass of safety guardrails as a reinforcement learning navigation problem. By utilizing a multi-agent actor-critic architecture and a novel "Information Quantization" reward signal based on linguistic complexity, PathSeeker achieves a 98.9% average Attack Success Rate (ASR) across 13 leading models. Notably, it compromises the highly aligned Claude-3.5-Sonnet with an 82% ASR while requiring only 9% of the queries used by previous state-of-the-art methods.

Introduction

The integration of Large Language Models (LLMs) into critical infrastructure and daily workflows has heightened the stakes for AI safety. "Jailbreaking"—the art of crafting prompts that deceive a model into violating its safety alignment—represents a significant security vulnerability. While white-box attacks benefit from internal model access, they are often impractical for proprietary commercial APIs. Conversely, existing black-box methods frequently rely on proxy models, failing when the target model's safety boundaries are uniquely rigorous.

PathSeeker addresses these limitations by treating the jailbreak process as a "rat in a maze" navigation task. Rather than requiring a pre-defined "exit" or harmful reference answer, the system learns to navigate the target model's safety landscape through iterative feedback and linguistic cues.

Methodology

The "Rat in a Maze" Analogy

The core philosophy of PathSeeker is that an attacker can find a path to a harmful response by observing how a model's refusal behavior changes. As a model's safety constraints begin to "relax" under adversarial pressure, its responses typically become more verbose and linguistically complex before a full jailbreak occurs. PathSeeker uses this "vocabulary richness" as a warm reward signal to guide its search.

The PathSeeker framework conceptualizes jailbreaking as a navigation problem where linguistic richness guides the 'rat' toward the escape route.

System Architecture

PathSeeker employs a Multi-Agent Deep Deterministic Policy Gradient (MADDPG) approach, featuring two specialized agents:

  1. Question Mutator: Focuses on altering the core harmful query using actions such as "Euphemize" (softening the tone) or "Split" (decomposing a complex request into benign-looking sub-tasks).
  2. Template Mutator: Modifies the jailbreak "wrapper" or context surrounding the query to distract the model's safety filters.
Overview of the PathSeeker architecture, featuring multi-agent reinforcement learning and an information quantization feedback loop.

Information Quantization (IQ) Reward

The most significant technical contribution is the Information Quantization (IQ) metric. Unlike binary success/failure rewards, IQ provides a continuous feedback signal by counting the number of nouns, verbs, adjectives, and adverbs in the target model's response. This allows the RL agents to recognize when they are getting "closer" to a jailbreak, even if the model is still partially refusing. A "Judgement Model" (GPT-4o-mini) provides the final safety score to determine if the attack has fully succeeded.

Experimental Evaluation

The framework was evaluated against a diverse suite of 13 LLMs, including commercial models like GPT-4o-mini and Claude-3.5-Sonnet, and open-source leaders like Llama-3.1-405B, DeepSeek-V2, and Qwen2. The attack utilized a dataset of 100 harmful questions and 77 initial jailbreak templates sourced from the GPTFuzzer dataset.

Results and Discussion

PathSeeker demonstrated unprecedented effectiveness and efficiency across all test cases:

  • Superior Success Rates: The system achieved a near-perfect average Top1-ASR of 98.9%.
  • Breaking Strong Alignment: Claude-3.5-Sonnet, which typically resists over 90% of baseline attacks, was compromised with an 82% success rate.
  • Efficiency Gains: PathSeeker reached its success threshold using approximately 4,500 requests, compared to the 50,000 requests required by the previous state-of-the-art, GPTFuzzer—a 91% reduction in query overhead.
  • Transferability: Agents trained on one model showed a high degree of success when transferred to others, suggesting that PathSeeker identifies fundamental linguistic vulnerabilities common across different alignment strategies. Results were cross-validated using Llama Guard 3, showing high consistency with automated judges.

Conclusion

PathSeeker represents a paradigm shift in black-box jailbreaking by replacing brute-force search with guided reinforcement learning. The discovery that vocabulary richness serves as a proxy for safety relaxation provides a new lens for both attacking and defending LLMs. Future research will focus on reducing the dependency on initial human-crafted templates and exploring defensive strategies, such as monitoring for the specific mutation patterns identified by the PathSeeker agents.

Summary updated

BibTeX
@misc{lin2024pathseeker,
  author = {Zhihao Lin and Wei Ma and Mingyi Zhou and Yanjie Zhao and Haoyu Wang and Yang Liu and Jun Wang and Li Li},
  title = {{PathSeeker: Exploring LLM Security Vulnerabilities with a Reinforcement Learning-Based Jailbreak Approach}},
  year = {2024},
  eprint = {2409.14177},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.14177},
}
Figure