arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.08725cs.CR
收藏

RL-JACK:面向大语言模型的、由强化学习驱动的黑盒越狱攻击

RL-JACK: Reinforcement Learning-powered Black-box Jailbreaking Attack against LLMs

Xuan Chen, Yuzhou Nie, Lu Yan, Yunshu Mao, Wenbo Guo, Xiangyu Zhang

AI总结:

本文提出 RL-JACK,将越狱提示生成建模为搜索问题,并用深度强化学习、LLM 辅助动作空间与稠密奖励实现高效黑盒攻击,显著提升攻击成功率、防御韧性、可迁移性和超参数稳定性。

摘要:

现代大语言模型(LLM)开发者通常会进行安全对齐,以防止 LLM 生成不道德或有害内容。近期研究发现,LLM 的安全对齐可被越狱提示绕过。这类提示被设计为构建特定对话场景,并在其中嵌入有害问题。使用此类提示查询 LLM,会误导模型回答该有害问题。现有遗传方法所具有的随机性质,在很大程度上限制了最先进(SOTA)越狱攻击的有效性与效率。本文提出 RL-JACK,这是一种由深度强化学习(DRL)驱动的新型黑盒越狱攻击。我们将越狱提示的生成形式化为一个搜索问题,并设计了一种新型强化学习方法来求解。该方法包含一系列定制化设计,以提升强化学习智能体在越狱情境中的学习效率。值得注意的是,我们设计了由 LLM 辅助的动作空间,可在约束整体搜索空间的同时实现多样化的动作变化。我们还提出了一种新型奖励函数,为智能体成功实现越狱提供有意义的稠密奖励。通过大量评估,我们证明在针对六个 SOTA LLM(包括大型开源模型和商业模型)时,RL-JACK 总体上比现有越狱攻击有效得多。我们还展示了 RL-JACK 对三种 SOTA 防御的韧性,以及其在不同模型之间的可迁移性。最后,我们验证了 RL-JACK 对关键超参数变化不敏感。

英文摘要:

Modern large language model (LLM) developers typically conduct a safety alignment to prevent an LLM from generating unethical or harmful content. Recent studies have discovered that the safety alignment of LLMs can be bypassed by jailbreaking prompts. These prompts are designed to create specific conversation scenarios with a harmful question embedded. Querying an LLM with such prompts can mislead the model into responding to the harmful question. The stochastic and random nature of existing genetic methods largely limits the effectiveness and efficiency of state-of-the-art (SOTA) jailbreaking attacks. In this paper, we propose RL-JACK, a novel black-box jailbreaking attack powered by deep reinforcement learning (DRL). We formulate the generation of jailbreaking prompts as a search problem and design a novel RL approach to solve it. Our method includes a series of customized designs to enhance the RL agent's learning efficiency in the jailbreaking context. Notably, we devise an LLM-facilitated action space that enables diverse action variations while constraining the overall search space. We propose a novel reward function that provides meaningful dense rewards for the agent toward achieving successful jailbreaking. Through extensive evaluations, we demonstrate that RL-JACK is overall much more effective than existing jailbreaking attacks against six SOTA LLMs, including large open-source models and commercial models. We also show the RL-JACK's resiliency against three SOTA defenses and its transferability across different models. Finally, we validate the insensitivity of RL-JACK to the variations in key hyper-parameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑