arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.15435cs.LGcs.AIcs.CL
收藏

大语言模型中越狱输入的单次前向传播检测

Single-pass Detection of Jailbreaking Input in Large Language Models

École Polytechnique Fédérale de Lausanne(洛桑联邦理工学院);University of Wisconsin-Madison(威斯康星大学麦迪逊分校)

Leyla Naz Candogan, Yongtao Wu, Elias Abad Rocamora, Grigorios G. Chrysos, Volkan Cevher

AI总结:

针对现有大语言模型越狱攻击防护方法计算成本高的问题,提出单次传播检测方法SPD,利用logits信息经单次前向传播即可检测越狱输入,在开源模型及logit访问受限的GPT-3.5、GPT-4上均有效,为高效防护LLM对抗攻击提供新方案。

摘要:

保护经过对齐的大语言模型(LLM)免受越狱攻击是一项具有挑战性的问题,现有方法需要多次请求甚至向辅助LLM发起查询,计算成本高昂。我们转而聚焦于通过单次前向传播检测越狱输入。我们提出的方法名为Single Pass Detection(单次传播检测,SPD),利用logits(对数概率)携带的信息预测输出语句是否有害,仅需一次前向传播即可实现防护。SPD不仅能在开源模型上有效检测攻击,还能将无害输入的误分类率降至最低。此外,我们证明即使在无法完整获取GPT-3.5和GPT-4的logit的情况下,SPD依然有效。我们认为该方法为高效防护LLM对抗对抗性攻击提供了一种有前景的思路。

英文摘要:

Defending aligned Large Language Models (LLMs) against jailbreaking attacks is a challenging problem, with existing approaches requiring multiple requests or even queries to auxiliary LLMs, making them computationally heavy. Instead, we focus on detecting jailbreaking input in a single forward pass. Our method, called Single Pass Detection SPD, leverages the information carried by the logits to predict whether the output sentence will be harmful. This allows us to defend in just one forward pass. SPD can not only detect attacks effectively on open-source models, but also minimizes the misclassification of harmless inputs. Furthermore, we show that SPD remains effective even without complete logit access in GPT-3.5 and GPT-4. We believe that our proposed method offers a promising approach to efficiently safeguard LLMs against adversarial attacks.

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

↑