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

防御性提示补丁:一种针对越狱攻击的鲁棒且可解释的大语言模型防御方法

Defensive Prompt Patch: A Robust and Interpretable Defense of LLMs against Jailbreak Attacks

Chen Xiong, Xiangyu Qi, Pin-Yu Chen, Tsung-Yi Ho

AI总结:

本文提出防御性提示补丁(DPP),通过策略设计的可解释后缀提示抵御越狱攻击,在LLAMA-2-7B-Chat和Mistral-7B-Instruct-v0.2上显著降低攻击成功率且几乎不影响模型实用性。

摘要:

安全性、保障性和合规性是对齐大语言模型(LLMs)时的基本要求。然而,许多看似已对齐的LLMs很快就被证明容易受到越狱攻击。这些攻击旨在通过在恶意查询中引入越狱提示来绕过模型的安全护栏和安全机制。为应对这些挑战,本文提出了防御性提示补丁(Defensive Prompt Patch,DPP),这是一种新颖的基于提示的防御机制,专门用于保护LLMs免受此类复杂越狱策略的攻击。与以往为了安全性而常常牺牲模型实用性的方法不同,DPP旨在实现最低的攻击成功率(Attack Success Rate,ASR),同时保持LLMs的高实用性。我们的方法使用经过策略设计的可解释后缀提示,能够有效挫败各种标准和自适应越狱技术。在LLAMA-2-7B-Chat和Mistral-7B-Instruct-v0.2模型上进行的实验结果表明,DPP具有鲁棒性和适应性,在显著降低ASR的同时对实用性的影响可以忽略不计。我们的方法不仅在平衡安全性与功能性方面优于现有防御策略,还提供了一种可扩展且可解释的解决方案,适用于各种LLM平台。

英文摘要:

Safety, security, and compliance are essential requirements when aligning large language models (LLMs). However, many seemingly aligned LLMs are soon shown to be susceptible to jailbreak attacks. These attacks aim to circumvent the models' safety guardrails and security mechanisms by introducing jailbreak prompts into malicious queries. In response to these challenges, this paper introduces Defensive Prompt Patch (DPP), a novel prompt-based defense mechanism specifically designed to protect LLMs against such sophisticated jailbreak strategies. Unlike previous approaches, which have often compromised the utility of the model for the sake of safety, DPP is designed to achieve a minimal Attack Success Rate (ASR) while preserving the high utility of LLMs. Our method uses strategically designed interpretable suffix prompts that effectively thwart a wide range of standard and adaptive jailbreak techniques. Empirical results conducted on LLAMA-2-7B-Chat and Mistral-7B-Instruct-v0.2 models demonstrate the robustness and adaptability of DPP, showing significant reductions in ASR with negligible impact on utility. Our approach not only outperforms existing defense strategies in balancing safety and functionality, but also provides a scalable and interpretable solution applicable to various LLM platforms.

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

↑