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

披着羊皮的狼:广义嵌套越狱提示可轻易欺骗大型语言模型

A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily

National Key Laboratory for Novel Software Technology, Nanjing University(南京大学计算机软件新技术国家重点实验室);Meituan Inc.(美团公司)

Peng Ding, Jun Kuang, Dan Ma, Xuezhi Cao, Yunsen Xian, Jiajun Chen, Shujian Huang

AI总结:

本文提出自动化框架 ReNeLLM,通过提示改写与场景嵌套生成越狱提示,在更低时间成本下显著提升攻击成功率,并据此分析防御失效原因与改进策略。

摘要:

诸如 ChatGPT 和 GPT-4 等大型语言模型(LLM)旨在提供有用且安全的回答。然而,被称为“越狱”的对抗性提示能够绕过安全防护措施,导致 LLM 生成可能有害的内容。探索越狱提示有助于更好地揭示 LLM 的弱点,并进一步指导我们增强其安全性。遗憾的是,现有越狱方法要么依赖复杂的人工设计,要么需要在其他白盒模型上进行优化,从而损害了泛化能力或效率。本文将越狱提示攻击概括为两个方面:(1)提示改写和(2)场景嵌套。在此基础上,我们提出 ReNeLLM,这是一个利用 LLM 自身生成有效越狱提示的自动化框架。大量实验表明,与现有基线相比,ReNeLLM 显著提高了攻击成功率,同时大幅降低了时间成本。我们的研究还揭示了当前防御方法在保护 LLM 方面的不足。最后,我们从提示执行优先级的角度分析了 LLM 防御失败的原因,并提出相应的防御策略。我们希望本研究能够推动学术界和 LLM 开发者提供更安全、更受规范的 LLM。代码可在 https://github.com/NJUNLP/ReNeLLM 获取。

英文摘要:

Large Language Models (LLMs), such as ChatGPT and GPT-4, are designed to provide useful and safe responses. However, adversarial prompts known as 'jailbreaks' can circumvent safeguards, leading LLMs to generate potentially harmful content. Exploring jailbreak prompts can help to better reveal the weaknesses of LLMs and further steer us to secure them. Unfortunately, existing jailbreak methods either suffer from intricate manual design or require optimization on other white-box models, which compromises either generalization or efficiency. In this paper, we generalize jailbreak prompt attacks into two aspects: (1) Prompt Rewriting and (2) Scenario Nesting. Based on this, we propose ReNeLLM, an automatic framework that leverages LLMs themselves to generate effective jailbreak prompts. Extensive experiments demonstrate that ReNeLLM significantly improves the attack success rate while greatly reducing the time cost compared to existing baselines. Our study also reveals the inadequacy of current defense methods in safeguarding LLMs. Finally, we analyze the failure of LLMs defense from the perspective of prompt execution priority, and propose corresponding defense strategies. We hope that our research can catalyze both the academic community and LLMs developers towards the provision of safer and more regulated LLMs. The code is available at https://github.com/NJUNLP/ReNeLLM.

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

↑