SafeAligner:通过响应差异引导实现针对越狱攻击的安全对齐
SafeAligner: Safety Alignment against Jailbreak Attacks via Response Disparity Guidance
AI总结:
针对LLM越狱攻击防御成本高且通用性受限的问题,提出解码阶段方法SafeAligner,利用哨兵模型与入侵者模型响应的安全差异区分有害与有益token,引导目标模型输出分布,实现低损耗的安全对齐。
摘要:
随着大型语言模型(LLMs)的快速发展,在不损害其实用性的情况下有效保障这些模型的安全已成为一个关键的研究领域。然而,当前针对越狱攻击(即试图绕过安全协议的行为)的防御策略通常面临适应性有限、通用能力受限以及成本高昂等问题。为了应对这些挑战,我们引入了SafeAligner,这是一种在解码阶段实施的方法,旨在加强对越狱攻击的防御。我们首先开发了两个专门的模型:旨在促进安全性的哨兵模型,以及旨在生成更具风险响应的入侵者模型。SafeAligner利用这两个模型响应之间安全水平的差异来区分有害和有益的token,通过改变目标模型的输出token分布,有效地引导安全对齐。大量实验表明,SafeAligner能够提高有益token出现的概率,同时减少有害token的出现,从而在通用性损失极小的情况下确保安全对齐。
英文摘要:
As the development of large language models (LLMs) rapidly advances, securing these models effectively without compromising their utility has become a pivotal area of research. However, current defense strategies against jailbreak attacks (i.e., efforts to bypass security protocols) often suffer from limited adaptability, restricted general capability, and high cost. To address these challenges, we introduce SafeAligner, a methodology implemented at the decoding stage to fortify defenses against jailbreak attacks. We begin by developing two specialized models: the Sentinel Model, which is trained to foster safety, and the Intruder Model, designed to generate riskier responses. SafeAligner leverages the disparity in security levels between the responses from these models to differentiate between harmful and beneficial tokens, effectively guiding the safety alignment by altering the output token distribution of the target model. Extensive experiments show that SafeAligner can increase the likelihood of beneficial tokens, while reducing the occurrence of harmful ones, thereby ensuring secure alignment with minimal loss to generality.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。