arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.20089cs.LGcs.CLcs.CR
收藏

通过拒绝特征对抗训练实现鲁棒的大语言模型安全防护

Robust LLM safeguarding via refusal feature adversarial training

University of Toronto(多伦多大学);Meta FAIR;University College London(伦敦大学学院)

Lei Yu, Virginie Do, Karen Hambardzumyan, Nicola Cancedda

AI总结:

针对大语言模型易受对抗攻击且防御成本高的问题,研究发现攻击通过消融拒绝特征规避防护,据此提出ReFAT算法,以更低计算开销提升了三种主流LLM的攻击鲁棒性。

摘要:

大语言模型(LLM)易受对抗攻击影响,这类攻击可诱导模型生成有害回复。由于越狱机制不透明,且鲁棒训练LLM的计算成本高昂,防御此类攻击仍颇具挑战。我们证明,对抗攻击规避LLM安全防护存在一种通用机制,即通过消融残差流嵌入空间中一个被称为拒绝特征的维度来实现。我们进一步表明,拒绝特征消融(RFA)操作近似于抵消模型安全性的最坏情况扰动。基于这些发现,我们提出拒绝特征对抗训练(ReFAT),这是一种新型算法,它通过RFA模拟输入层面攻击的效果,可高效开展LLM对抗训练。实验结果显示,ReFAT显著提升了三种主流LLM对各类对抗攻击的鲁棒性,且与现有对抗训练方法相比,计算开销大幅降低。

英文摘要:

Large language models (LLMs) are vulnerable to adversarial attacks that can elicit harmful responses. Defending against such attacks remains challenging due to the opacity of jailbreaking mechanisms and the high computational cost of training LLMs robustly. We demonstrate that adversarial attacks share a universal mechanism for circumventing LLM safeguards that works by ablating a dimension in the residual stream embedding space called the refusal feature. We further show that the operation of refusal feature ablation (RFA) approximates the worst-case perturbation of offsetting model safety. Based on these findings, we propose Refusal Feature Adversarial Training (ReFAT), a novel algorithm that efficiently performs LLM adversarial training by simulating the effect of input-level attacks via RFA. Experiment results show that ReFAT significantly improves the robustness of three popular LLMs against a wide range of adversarial attacks, with considerably less computational overhead compared to existing adversarial training methods.

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

↑