用强化学习模拟老鼠寻路,自动发现大模型安全漏洞。
PathSeeker: Exploring LLM Security Vulnerabilities with a Reinforcement Learning-Based Jailbreak Approach
- 借鉴老鼠逃出迷宫的思路,用多智能体强化学习探索攻击路径。
- 在13个主流模型上成功率超5种前沿攻击方法,对强安全模型也有效。
- 通过分析输出词汇丰富度变化设计奖励机制,适合安全研究人员参考。
近年来,大型语言模型(LLMs)广泛应用,引发对其安全性的关注。传统越狱攻击常依赖模型内部信息,或在探索目标模型的不安全行为时受限,降低其通用性。本文提出PathSeeker,一种受老鼠逃出迷宫启发的新型黑盒越狱方法。我们认为每个LLM都有独特的“安全迷宫”,攻击者通过接收反馈和积累经验,逐步寻找突破路径。该方法采用多智能体强化学习,由小型模型协作引导主模型执行变异操作以达成攻击目标。通过根据模型反馈逐步修改输入,系统诱导出更丰富、有害的响应。人工测试中观察到,目标模型响应的词汇量逐渐扩大,最终产生有害内容。基于此,我们引入一种奖励机制,利用响应词汇丰富度的扩展来削弱安全约束。在13个商业及开源模型上的测试表明,该方法优于五种先进攻击技术,尤其在强对齐的商业模型如GPT-4o-mini、Claude-3.5和GLM-4-air上表现优异。本研究旨在深化对LLM安全漏洞的理解,助力构建更鲁棒的防御体系。
原文摘要 · Abstract (English)
In recent years, Large Language Models (LLMs) have gained widespread use, raising concerns about their security. Traditional jailbreak attacks, which often rely on the model internal information or have limitations when exploring the unsafe behavior of the victim model, limiting their reducing their general applicability. In this paper, we introduce PathSeeker, a novel black-box jailbreak method, which is inspired by the game of rats escaping a maze. We think that each LLM has its unique "security maze", and attackers attempt to find the exit learning from the received feedback and their accumulated experience to compromise the target LLM's security defences. Our approach leverages multi-agent reinforcement learning, where smaller models collaborate to guide the main LLM in performing mutation operations to achieve the attack objectives. By progressively modifying inputs based on the model's feedback, our system induces richer, harmful responses. During our manual attempts to perform jailbreak attacks, we found that the vocabulary of the response of the target model gradually became richer and eventually produced harmful responses. Based on the observation, we also introduce a reward mechanism that exploits the expansion of vocabulary richness in LLM responses to weaken security constraints. Our method outperforms five state-of-the-art attack techniques when tested across 13 commercial and open-source LLMs, achieving high attack success rates, especially in strongly aligned commercial models like GPT-4o-mini, Claude-3.5, and GLM-4-air with strong safety alignment. This study aims to improve the understanding of LLM security vulnerabilities and we hope that this sturdy can contribute to the development of more robust defenses.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。