When LLM Meets DRL: Advancing Jailbreaking Efficiency via DRL-guided Search

Xuan Chen, Yuzhou Nie, Wenbo Guo, Xiangyu Zhang
2/3/2026

No official code found. Best implementation: XuanChen-xc/RLbreaker (18 stars, MIT, last commit 2024-10-22). 1 more below.

Abstract

Recent studies developed jailbreaking attacks, which construct jailbreaking prompts to fool LLMs into responding to harmful questions. Early-stage jailbreaking attacks require access to model internals or significant human efforts. More advanced attacks utilize genetic algorithms for automatic and black-box attacks. However, the random nature of genetic algorithms significantly limits the effectiveness of these attacks. In this paper, we propose RLbreaker, a black-box jailbreaking attack driven by deep reinforcement learning (DRL). We model jailbreaking as a search problem and design an RL agent to guide the search, which is more effective and has less randomness than stochastic search, such as genetic algorithms. Specifically, we design a customized DRL system for the jailbreaking problem, including a novel reward function and a customized proximal policy optimization (PPO) algorithm. Through extensive experiments, we demonstrate that RLbreaker is much more effective than existing jailbreaking attacks against six state-of-the-art (SOTA) LLMs. We also show that RLbreaker is robust against three SOTA defenses and its trained agents can transfer across different LLMs. We further validate the key design choices of RLbreaker via a comprehensive ablation study.

View on arXivView PDF

Code Implementations(2)

MIT
42PythonDec 18, 20241 years agoMIT
MIT

Code for "When LLM Meets DRL: Advancing Jailbreaking Efficiency via DRL-guided Search" (NeurIPS 2024)

182PythonOct 15, 20241 years agoMIT

Similar Papers

Cite this paper

@article{chen2026when,
  title  = {When LLM Meets DRL: Advancing Jailbreaking Efficiency via DRL-guided Search},
  author = {Xuan Chen and Yuzhou Nie and Wenbo Guo and Xiangyu Zhang},
  year   = {2026},
  eprint = {2406.08705},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.08705},
  url    = {https://arxiv.org/abs/2406.08705},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.08705.svg)](https://codeofpaper.com/paper/2406.08705)

Discussion