arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.17458cs.CRcs.CLcs.LG
收藏

RED QUEEN:保护大型语言模型免受隐蔽多轮越狱攻击

RED QUEEN: Safeguarding Large Language Models against Concealed Multi-Turn Jailbreaking

Hippocratic AI(希波克拉底AI);Information Sciences Institute, University of Southern California(信息科学研究所,南加州大学)

Yifan Jiang, Kriti Aggarwal, Tanmay Laud, Kashif Munir, Jay Pujara, Subhabrata Mukherjee

AI总结:

本文提出隐蔽多轮越狱方法 RED QUEEN ATTACK 及56k攻击数据集,揭示主流LLM的安全脆弱性,并通过 RED QUEEN GUARD 将攻击成功率降至1%以下。

摘要:

大型语言模型(LLM)的快速进步为各类领域和应用带来了新机遇;但同时也带来了与潜在滥用相关的挑战。为降低此类风险,红队测试已被用作一种主动安全措施,通过越狱攻击探查语言模型是否会产生有害输出。然而,当前的越狱攻击方法多为单轮攻击,并带有明确的恶意查询,无法充分反映现实交互的复杂性。在现实中,用户可以与基于 LLM 的聊天助手进行多轮交互,从而以更隐蔽的方式隐藏其真实意图。为弥补这一差距,我们首先提出一种新的越狱方法 RED QUEEN ATTACK。该方法构建多轮场景,以预防伤害为幌子隐藏恶意意图。我们设计了40个轮次各异的场景,并选取14个有害类别,生成了56k条多轮攻击数据。我们在四个具有代表性、规模各异的 LLM 系列上对 RED QUEEN ATTACK 进行了全面实验。实验表明,所有 LLM 都易受 RED QUEEN ATTACK 攻击,在 GPT-4o 上攻击成功率达到87.62%,在 Llama3-70B 上达到75.4%。进一步分析显示,较大的模型更容易受到 RED QUEEN ATTACK 影响,而多轮结构和隐蔽策略促成了攻击成功。为将安全性置于优先位置,我们引入一种简单直接的缓解策略 RED QUEEN GUARD,该策略通过对齐 LLM,使其有效抵御对抗攻击。该方法将攻击成功率降至1%以下,同时保持模型在标准基准测试上的性能。完整实现和数据集可在 https://github.com/kriti-hippo/red_queen 公开获取。

英文摘要:

The rapid progress of Large Language Models (LLMs) has opened up new opportunities across various domains and applications; yet it also presents challenges related to potential misuse. To mitigate such risks, red teaming has been employed as a proactive security measure to probe language models for harmful outputs via jailbreak attacks. However, current jailbreak attack approaches are single-turn with explicit malicious queries that do not fully capture the complexity of real-world interactions. In reality, users can engage in multi-turn interactions with LLM-based chat assistants, allowing them to conceal their true intentions in a more covert manner. To bridge this gap, we, first, propose a new jailbreak approach, RED QUEEN ATTACK. This method constructs a multi-turn scenario, concealing the malicious intent under the guise of preventing harm. We craft 40 scenarios that vary in turns and select 14 harmful categories to generate 56k multi-turn attack data points. We conduct comprehensive experiments on the RED QUEEN ATTACK with four representative LLM families of different sizes. Our experiments reveal that all LLMs are vulnerable to RED QUEEN ATTACK, reaching 87.62% attack success rate on GPT-4o and 75.4% on Llama3-70B. Further analysis reveals that larger models are more susceptible to the RED QUEEN ATTACK, with multi-turn structures and concealment strategies contributing to its success. To prioritize safety, we introduce a straightforward mitigation strategy called RED QUEEN GUARD, which aligns LLMs to effectively counter adversarial attacks. This approach reduces the attack success rate to below 1% while maintaining the model's performance across standard benchmarks. Full implementation and dataset are publicly accessible at https://github.com/kriti-hippo/red_queen.

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

↑