arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2406.01288cs.CLcs.AIcs.CRcs.LG
收藏

改进的少样本越狱攻击可绕过对齐语言模型及其防御机制

Improved Few-Shot Jailbreaking Can Circumvent Aligned Language Models and Their Defenses

Singapore Management University(新加坡管理大学);Sea AI Lab

Xiaosen Zheng, Tianyu Pang, Chao Du, Qian Liu, Jing Jiang, Min Lin

AI总结:

针对少样本越狱效率低的问题,提出注入特殊系统令牌、从演示池做演示级随机搜索的改进方法,可高效绕过带防御的对齐大语言模型,攻击成功率接近100%。

摘要:

近期,Anil等人(2024)的研究表明,多达数百条的多样本演示可利用大语言模型(LLM)的长上下文能力,对当前最先进的LLM实施越狱攻击。但仅使用少样本演示,能否在有限上下文长度内高效实现LLM越狱?原生少样本越狱方法效率较低,为此我们提出了改进技术:注入[/INST]这类特殊系统令牌,同时从构建的演示池中开展演示级随机搜索。这些简单技术对对齐后的LLM(即便配备先进防御)实现了出人意料的越狱效果。例如,该方法在Llama-2-7B和Llama-3-8B上无需多次重启即可达到80%以上(多数超95%)的攻击成功率(ASR);即便模型搭载困惑度检测、SmoothLLM等强防御(这类防御对基于后缀的越狱攻击极具挑战性),效果依然显著。此外,我们针对其他对齐LLM和先进防御开展了全面精细的评估(确保使用正确的系统提示),方法始终取得近100%的ASR。代码已开源至https://github.com/sail-sg/I-FSJ。

英文摘要:

Recently, Anil et al. (2024) show that many-shot (up to hundreds of) demonstrations can jailbreak state-of-the-art LLMs by exploiting their long-context capability. Nevertheless, is it possible to use few-shot demonstrations to efficiently jailbreak LLMs within limited context sizes? While the vanilla few-shot jailbreaking may be inefficient, we propose improved techniques such as injecting special system tokens like [/INST] and employing demo-level random search from a collected demo pool. These simple techniques result in surprisingly effective jailbreaking against aligned LLMs (even with advanced defenses). For examples, our method achieves >80% (mostly >95%) ASRs on Llama-2-7B and Llama-3-8B without multiple restarts, even if the models are enhanced by strong defenses such as perplexity detection and/or SmoothLLM, which is challenging for suffix-based jailbreaking. In addition, we conduct comprehensive and elaborate (e.g., making sure to use correct system prompts) evaluations against other aligned LLMs and advanced defenses, where our method consistently achieves nearly 100% ASRs. Our code is available at https://github.com/sail-sg/I-FSJ.

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

↑