When LLM Meets DRL: Advancing Jailbreaking Efficiency via DRL-guided Search
Xuan Chen, Yuzhou Nie, Wenbo Guo, Xiangyu Zhang
TL;DR
This work reframes jailbreaking as a guided search problem and introduces RLbreaker, a deep reinforcement learning framework that learns to mutate jailbreak prompts via a set of mutators to reliably elicit harmful answers from black-box LLMs. Through a customized reward and PPO-based training, RLbreaker shows superior attack effectiveness and transferability across six models, and resilience against multiple defenses, with extensive ablation validating design choices. The results highlight the potential of DRL-driven prompt engineering to reveal alignment blind spots and inform defense strategies, while also addressing ethical safeguards and limitations. Overall, the paper demonstrates that guided, learning-based prompt synthesis can outperform stochastic genetic methods and in-context approaches in black-box jailbreaking scenarios.
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.
