提出X-Boundary精准划分安全与危险特征,防御多轮越狱攻击同时不降低模型可用性。
X-Boundary: Establishing Exact Safety Boundary to Shield LLMs from Multi-Turn Jailbreaks without Compromising Usability
- 通过构建精确的边界区分安全与有害特征表示,避免误伤正常功能。
- 在抵御多轮越狱攻击上达顶尖水平,过拒率降低约20%,通用能力几乎不受损。
- 适用于需高安全性又不能牺牲用户体验的大型语言模型部署场景。
尽管大语言模型(LLM)的安全对齐技术迅速发展,但抵御多轮越狱攻击仍具挑战。本文通过全面对比发现,现有防御方法虽能提升鲁棒性,却常以牺牲可用性为代价,如削弱泛化能力或引发过拒问题。从机制可解释性角度分析,这些方法未能建立精确区分安全与有害特征表示的边界,导致靠近边界的安全部分被误扰,进而影响可用性。为此,我们提出X-Boundary,将有害表示推向远离安全边界的位置,实现精确分离。该方法可精准清除有害表示而不干扰安全表示。实验表明,X-Boundary在多轮越狱攻击防御上达到当前最优性能,过拒率降低约20%,并保持近完全的通用能力。此外,我们理论证明并实证验证了其可加速训练收敛过程。
原文摘要 · Abstract (English)
Despite the rapid development of safety alignment techniques for LLMs, defending against multi-turn jailbreaks is still a challenging task. In this paper, we conduct a comprehensive comparison, revealing that some existing defense methods can improve the robustness of LLMs against multi-turn jailbreaks but compromise usability, i.e., reducing general capabilities or causing the over-refusal problem. From the perspective of mechanism interpretability of LLMs, we discover that these methods fail to establish a boundary that exactly distinguishes safe and harmful feature representations. Therefore, boundary-safe representations close to harmful representations are inevitably disrupted, leading to a decline in usability. To address this issue, we propose X-Boundary to push harmful representations away from boundary-safe representations and obtain an exact distinction boundary. In this way, harmful representations can be precisely erased without disrupting safe ones. Experimental results show that X-Boundary achieves state-of-the-art defense performance against multi-turn jailbreaks, while reducing the over-refusal rate by about 20% and maintaining nearly complete general capability. Furthermore, we theoretically prove and empirically verify that X-Boundary can accelerate the convergence process during training. Please see our code at: https://github.com/AI45Lab/X-Boundary.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。