arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.10639cs.CRcs.CL
收藏

基于后感知校准的潜在空间对抗训练:防御大语言模型免受越狱攻击

Latent-space adversarial training with post-aware calibration for defending large language models against jailbreak attacks

Lab of Artificial Intelligence for Education, East China Normal University, Shanghai 200062, China(教育人工智能实验室,东华大学,上海200062,中国);Shanghai Institute of Artificial Intelligence for Education, East China Normal University, Shanghai 200062, China(教育人工智能研究所,东华大学,上海200062,中国);School of Computer Science and Technology, East China Normal University, Shanghai 200062, China(计算机科学与技术学院,东华大学,上海200062,中国)

Xin Yi, Yue Li, Dongsheng Shi, Linlin Wang, Xiaoling Wang, Liang He

AI总结:

本文提出LATPC框架,通过潜在空间对抗训练动态识别安全关键维度以防御伪装型越狱攻击,并利用嵌入级校准机制在推理时最小化过度防御行为,在安全性与实用性间取得更优平衡。

摘要:

确保安全对齐是大语言模型(LLMs)的一项关键要求,特别是考虑到它们在现实应用中的部署日益增加。尽管取得了相当大的进展,LLMs仍然容易受到越狱攻击,这些攻击利用系统漏洞绕过安全措施并引出有害或不当的输出。此外,虽然基于对抗训练的防御方法已显示出前景,但一个普遍问题是意外的过度防御行为,即模型过度拒绝良性查询,显著削弱了其实用性。为了解决这些限制,我们引入了LATPC,一个基于后感知校准的潜在空间对抗训练框架。LATPC通过对比有害和良性输入,动态识别安全关键的潜在维度,从而能够自适应地构建有针对性的拒绝特征移除攻击。这一机制使对抗训练能够集中于将有害查询伪装为良性查询的现实世界越狱策略。在推理过程中,LATPC采用一种高效的嵌入级校准机制,以可忽略的计算开销最小化过度防御行为。在五种伪装型越狱攻击上的实验结果表明,与现有防御框架相比,LATPC在安全性和实用性之间实现了更优的平衡。进一步的分析证明了利用安全关键维度在开发针对越狱攻击的鲁棒防御方法中的有效性。

英文摘要:

Ensuring safety alignment is a critical requirement for large language models (LLMs), particularly given increasing deployment in real-world applications. Despite considerable advancements, LLMs remain susceptible to jailbreak attacks, which exploit system vulnerabilities to circumvent safety measures and elicit harmful or inappropriate outputs. Furthermore, while adversarial training-based defense methods have shown promise, a prevalent issue is the unintended over-defense behavior, wherein models excessively reject benign queries, significantly undermining their practical utility. To address these limitations, we introduce LATPC, a Latent-space Adversarial Training with Post-aware Calibration framework. LATPC dynamically identifies safety-critical latent dimensions by contrasting harmful and benign inputs, enabling the adaptive construction of targeted refusal feature removal attacks. This mechanism allows adversarial training to concentrate on real-world jailbreak tactics that disguise harmful queries as benign ones. During inference, LATPC employs an efficient embedding-level calibration mechanism to minimize over-defense behaviors with negligible computational overhead. Experimental results across five types of disguise-based jailbreak attacks demonstrate that LATPC achieves a superior balance between safety and utility compared to existing defense frameworks. Further analysis demonstrates the effectiveness of leveraging safety-critical dimensions in developing robust defense methods against jailbreak attacks.

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

↑