arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.00867cs.CRcs.AIcs.CLcs.LG
收藏

梯度袖口:通过探索拒绝损失景观检测大型语言模型上的越狱攻击

Gradient Cuff: Detecting Jailbreak Attacks on Large Language Models by Exploring Refusal Loss Landscapes

The Chinese University of Hong Kong(香港中文大学);IBM Research(IBM研究院)

Xiaomeng Hu, Pin-Yu Chen, Tsung-Yi Ho

AI总结:

本文提出梯度袖口方法,利用拒绝损失景观的特性检测LLM越狱攻击,在多个模型和攻击类型上提升拒绝能力且不影响正常性能。

摘要:

大型语言模型(LLM)正成为一种突出的生成式人工智能工具,用户输入查询,LLM生成答案。为了减少伤害和滥用,人们努力使用先进训练技术(如基于人类反馈的强化学习(RLHF))使这些LLM与人类价值观对齐。然而,近期研究强调了LLM易受对抗性越狱尝试攻击的脆弱性,这些尝试旨在破坏内嵌的安全护栏。为解决这一挑战,本文定义并研究了LLM的拒绝损失(Refusal Loss),然后提出了一种名为梯度袖口(Gradient Cuff)的方法来检测越狱尝试。梯度袖口利用在拒绝损失景观中观察到的独特性质,包括函数值及其平滑性,设计了一种有效的两步检测策略。在两个对齐的LLM(LLaMA-2-7B-Chat和Vicuna-7B-V1.5)和六种越狱攻击(GCG、AutoDAN、PAIR、TAP、Base64和LRL)上的实验结果表明,梯度袖口能显著提高LLM对恶意越狱查询的拒绝能力,同时通过调整检测阈值保持模型对良性用户查询的性能。

英文摘要:

Large Language Models (LLMs) are becoming a prominent generative AI tool, where the user enters a query and the LLM generates an answer. To reduce harm and misuse, efforts have been made to align these LLMs to human values using advanced training techniques such as Reinforcement Learning from Human Feedback (RLHF). However, recent studies have highlighted the vulnerability of LLMs to adversarial jailbreak attempts aiming at subverting the embedded safety guardrails. To address this challenge, this paper defines and investigates the Refusal Loss of LLMs and then proposes a method called Gradient Cuff to detect jailbreak attempts. Gradient Cuff exploits the unique properties observed in the refusal loss landscape, including functional values and its smoothness, to design an effective two-step detection strategy. Experimental results on two aligned LLMs (LLaMA-2-7B-Chat and Vicuna-7B-V1.5) and six types of jailbreak attacks (GCG, AutoDAN, PAIR, TAP, Base64, and LRL) show that Gradient Cuff can significantly improve the LLM's rejection capability for malicious jailbreak queries, while maintaining the model's performance for benign user queries by adjusting the detection threshold.

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

↑