arXiv:2409.17458cs.CRcs.CL2024-09中稿 · ACL

提出隐蔽多轮越狱攻击,揭示大模型安全漏洞并给出有效防御方案。

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

  • 设计多轮伪装攻击,以防止危害为名隐藏恶意意图。
  • 在56000条数据上测试,GPT-4o成功率高达87.62%。
  • 提出防御机制,使攻击成功率降至1%以下且不影响性能。

大型语言模型(LLMs)快速发展带来了广泛应用,但也伴随滥用风险。当前越狱攻击多为单轮显式恶意查询,无法反映真实交互复杂性。为此,我们提出新型多轮隐蔽越狱攻击——RED QUEEN ATTACK,构建40种多轮场景,覆盖14类有害目标,生成56,000条攻击数据。在四种不同规模的主流LLM家族上实验发现,所有模型均易受攻击,其中GPT-4o成功率达87.62%,Llama3-70B达75.4%。分析表明,模型越大越脆弱,多轮结构与伪装策略是关键。为提升安全性,我们提出简化防御策略RED QUEEN GUARD,可将攻击成功率压至1%以下,同时保持基准评测性能。完整代码与数据集公开于https://github.com/kriti-hippo/red_queen。

原文摘要 · Abstract (English)

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.

越狱攻击大模型安全多轮对抗防御机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。