自我欺骗:反向穿透大语言模型的语义防火墙
Self-Deception: Reverse Penetrating the Semantic Firewall of Large Language Models
AI总结:
该研究提出语义防火墙概念与“自我欺骗”自动越狱攻击方法,通过诱导大语言模型生成越狱提示绕过语义防御,在多语言多场景下对GPT-3.5-Turbo和GPT-4实现高攻击成功率,并开源相关数据代码。
摘要:
诸如ChatGPT之类的大语言模型(LLMs)已展现出接近通用人工智能的惊人能力。在为各类社会需求提供便利的同时,LLMs也降低了生成有害内容的成本。因此,LLM开发人员部署了语义级防御机制,以识别并拒绝可能生成不当内容的提示。遗憾的是,这些防御并非万无一失,一些攻击者设计出了“越狱”提示,能暂时诱导LLM遗忘内容防御规则,回答任何不当问题。截至目前,工业界和学术界都未对这些语义级攻击与防御背后的原理给出清晰解释。\n本文研究了LLM越狱问题,并首次提出了一种自动越狱方法。我们提出了语义防火墙的概念,并给出了三种技术实现路径。受通过反向隧道穿透传统防火墙的攻击启发,我们提出了一种“自我欺骗”攻击,该攻击可通过诱导LLM生成有助于越狱的提示来绕过语义防火墙。我们在7个虚拟场景中生成了共计2520个攻击载荷,覆盖6种语言(英语、俄语、法语、西班牙语、中文和阿拉伯语),针对三类最常见的违规内容:暴力、仇恨和色情。实验在GPT-3.5-Turbo和GPT-4两个模型上开展,两个模型上的攻击成功率分别为86.2%和67%,失败率分别为4.7%和2.2%,这凸显了所提攻击方法的有效性。所有实验代码和原始数据都将开源发布,以启发未来研究。我们认为,通过精心设计的提示操纵AI行为将成为未来的重要研究方向。
英文摘要:
Large language models (LLMs), such as ChatGPT, have emerged with astonishing capabilities approaching artificial general intelligence. While providing convenience for various societal needs, LLMs have also lowered the cost of generating harmful content. Consequently, LLM developers have deployed semantic-level defenses to recognize and reject prompts that may lead to inappropriate content. Unfortunately, these defenses are not foolproof, and some attackers have crafted "jailbreak" prompts that temporarily hypnotize the LLM into forgetting content defense rules and answering any improper questions. To date, there is no clear explanation of the principles behind these semantic-level attacks and defenses in both industry and academia. This paper investigates the LLM jailbreak problem and proposes an automatic jailbreak method for the first time. We propose the concept of a semantic firewall and provide three technical implementation approaches. Inspired by the attack that penetrates traditional firewalls through reverse tunnels, we introduce a "self-deception" attack that can bypass the semantic firewall by inducing LLM to generate prompts that facilitate jailbreak. We generated a total of 2,520 attack payloads in six languages (English, Russian, French, Spanish, Chinese, and Arabic) across seven virtual scenarios, targeting the three most common types of violations: violence, hate, and pornography. The experiment was conducted on two models, namely the GPT-3.5-Turbo and GPT-4. The success rates on the two models were 86.2% and 67%, while the failure rates were 4.7% and 2.2%, respectively. This highlighted the effectiveness of the proposed attack method. All experimental code and raw data will be released as open-source to inspire future research. We believe that manipulating AI behavior through carefully crafted prompts will become an important research direction in the future.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。