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

针对对齐:提取对齐LLM的安全分类器

Targeting Alignment: Extracting Safety Classifiers of Aligned LLMs

2 Department of Computer Science Virginia Tech Blacksburg, VA, USA

Jean-Charles Noirot Ferrand, Yohan Beugin, Eric Pauley, Ryan Sheatsley, Patrick McDaniel

AI总结:

本文提出了一种提取对齐LLM安全分类器的方法,通过构建候选分类器并评估其在对抗性攻击中的有效性,展示了替代分类器在提高攻击成功率方面的优势。

摘要:

在大型语言模型(LLM)中,对齐用于强制执行诸如安全性的指南。然而,对齐在面对劫持攻击时会失败,因为这些攻击会修改输入以导致不安全的输出。在本文中,我们介绍并评估了一种新的劫持攻击技术。我们观察到,对齐在LLM中嵌入了一个安全分类器,负责在拒绝和服从之间做出决定,并试图提取该分类器的近似值:一个替代分类器。为此,我们从LLM的子集构建候选分类器。我们首先评估候选分类器在良性和对抗性设置中近似LLM安全分类器的程度。然后,我们攻击这些候选者,并测量由此产生的对抗性输入转移到LLM的效果。我们的评估显示,最好的候选者在使用模型架构的20%时就能实现准确的一致性(F1分数超过80%)。此外,我们发现对替代分类器发起的攻击可以有效地转移到LLM上。例如,一个仅使用Llama 2模型50%的替代分类器在一半的内存占用和运行时间下实现了70%的攻击成功率(ASR),这比直接攻击LLM的22% ASR有显著提升。这些结果表明,提取替代分类器是建模(从而解决)对齐模型对劫持攻击脆弱性的有效且高效的方法。代码可在https://github.com/jcnf0/targeting-alignment上获得。

英文摘要:

Alignment in large language models (LLMs) is used to enforce guidelines such as safety. Yet, alignment fails in the face of jailbreak attacks that modify inputs to induce unsafe outputs. In this paper, we introduce and evaluate a new technique for jailbreak attacks. We observe that alignment embeds a safety classifier in the LLM responsible for deciding between refusal and compliance, and seek to extract an approximation of this classifier: a surrogate classifier. To this end, we build candidate classifiers from subsets of the LLM. We first evaluate the degree to which candidate classifiers approximate the LLM's safety classifier in benign and adversarial settings. Then, we attack the candidates and measure how well the resulting adversarial inputs transfer to the LLM. Our evaluation shows that the best candidates achieve accurate agreement (an F1 score above 80%) using as little as 20% of the model architecture. Further, we find that attacks mounted on the surrogate classifiers can be transferred to the LLM with high success. For example, a surrogate using only 50% of the Llama 2 model achieved an attack success rate (ASR) of 70% with half the memory footprint and runtime -- a substantial improvement over attacking the LLM directly, where we only observed a 22% ASR. These results show that extracting surrogate classifiers is an effective and efficient means for modeling (and therein addressing) the vulnerability of aligned models to jailbreaking attacks. The code is available at https://github.com/jcnf0/targeting-alignment.

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

↑