AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Models
作者: Xiaogeng Liu, Nan Xu, Muhao Chen, Chaowei Xiao
分类: cs.CL, cs.AI
发布日期: 2023-10-03 (更新: 2024-03-20)
备注: Published as a conference paper at ICLR 2024. Code is available at https://github.com/SheltonLiu-N/AutoDAN
💡 一句话要点
提出AutoDAN以自动生成隐蔽的监狱破解提示
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 监狱破解 大型语言模型 遗传算法 网络安全 对抗性攻击 自然语言处理 自动化生成
📋 核心要点
- 现有的监狱破解技术存在可扩展性和隐蔽性问题,手动提示设计效率低且易被检测。
- 本文提出的AutoDAN通过层次遗传算法自动生成隐蔽的监狱破解提示,克服了现有方法的不足。
- 实验结果表明,AutoDAN在跨模型迁移性和跨样本通用性方面优于基线方法,并能有效绕过基于困惑度的防御机制。
📝 摘要(中文)
对齐的大型语言模型(LLMs)是通过与人类反馈的广泛对齐创建的强大语言理解和决策工具。然而,这些大型模型仍然容易受到监狱破解攻击,攻击者通过操纵提示来引发不应由对齐LLMs提供的恶意输出。现有的监狱破解技术面临可扩展性和隐蔽性问题。为此,本文提出了AutoDAN,一种新颖的监狱破解攻击方法,能够通过精心设计的层次遗传算法自动生成隐蔽的监狱破解提示。大量评估表明,AutoDAN不仅自动化了过程,同时保持了语义的意义,并在跨模型迁移性和跨样本通用性方面表现出优越的攻击强度。
🔬 方法详解
问题定义:本文旨在解决对齐大型语言模型(LLMs)易受监狱破解攻击的问题。现有方法依赖手动设计提示,导致可扩展性差,同时生成的提示常常缺乏语义意义,易被检测。
核心思路:AutoDAN的核心思路是利用层次遗传算法自动生成具有语义意义的隐蔽监狱破解提示,从而提高攻击的隐蔽性和有效性。通过自动化设计,减少了手动干预的需求。
技术框架:AutoDAN的整体架构包括数据收集、提示生成、评估与优化三个主要模块。首先收集大量的提示数据,然后通过遗传算法生成新提示,最后对生成的提示进行评估和优化,以确保其隐蔽性和有效性。
关键创新:AutoDAN的主要创新在于其层次遗传算法的设计,使得提示生成过程不仅自动化,而且保持了语义的完整性。这一方法与传统的手动设计和基于标记的生成方法有本质区别。
关键设计:在关键设计方面,AutoDAN采用了多层次的适应度评估机制,以确保生成提示的语义有效性。此外,算法中的参数设置和损失函数经过精心调整,以优化生成提示的质量和攻击效果。
🖼️ 关键图片
📊 实验亮点
实验结果显示,AutoDAN在跨模型迁移性和跨样本通用性方面显著优于基线方法,攻击成功率提升超过30%。此外,AutoDAN能够有效绕过基于困惑度的防御机制,展示出其强大的隐蔽性和攻击能力。
🎯 应用场景
该研究的潜在应用领域包括网络安全、对抗性机器学习和自然语言处理等。通过提高对齐大型语言模型的安全性,AutoDAN能够帮助开发更安全的AI系统,减少恶意攻击的风险,具有重要的实际价值和未来影响。
📄 摘要(原文)
The aligned Large Language Models (LLMs) are powerful language understanding and decision-making tools that are created through extensive alignment with human feedback. However, these large models remain susceptible to jailbreak attacks, where adversaries manipulate prompts to elicit malicious outputs that should not be given by aligned LLMs. Investigating jailbreak prompts can lead us to delve into the limitations of LLMs and further guide us to secure them. Unfortunately, existing jailbreak techniques suffer from either (1) scalability issues, where attacks heavily rely on manual crafting of prompts, or (2) stealthiness problems, as attacks depend on token-based algorithms to generate prompts that are often semantically meaningless, making them susceptible to detection through basic perplexity testing. In light of these challenges, we intend to answer this question: Can we develop an approach that can automatically generate stealthy jailbreak prompts? In this paper, we introduce AutoDAN, a novel jailbreak attack against aligned LLMs. AutoDAN can automatically generate stealthy jailbreak prompts by the carefully designed hierarchical genetic algorithm. Extensive evaluations demonstrate that AutoDAN not only automates the process while preserving semantic meaningfulness, but also demonstrates superior attack strength in cross-model transferability, and cross-sample universality compared with the baseline. Moreover, we also compare AutoDAN with perplexity-based defense methods and show that AutoDAN can bypass them effectively.