[论文解读] Open Sesame! Universal Black Box Jailbreaking of Large Language Models
本论文提出一种通用的黑箱越狱攻击,利用遗传算法构建一个通用对抗性提示,将其附加到用户查询后即可诱导模型输出有害内容,而无需访问模型内部。
Large language models (LLMs), designed to provide helpful and safe responses, often rely on alignment techniques to align with user intent and social guidelines. Unfortunately, this alignment can be exploited by malicious actors seeking to manipulate an LLM's outputs for unintended purposes. In this paper we introduce a novel approach that employs a genetic algorithm (GA) to manipulate LLMs when model architecture and parameters are inaccessible. The GA attack works by optimizing a universal adversarial prompt that -- when combined with a user's query -- disrupts the attacked model's alignment, resulting in unintended and potentially harmful outputs. Our novel approach systematically reveals a model's limitations and vulnerabilities by uncovering instances where its responses deviate from expected behavior. Through extensive experiments we demonstrate the efficacy of our technique, thus contributing to the ongoing discussion on responsible AI development by providing a diagnostic tool for evaluating and enhancing alignment of LLMs with human intent. To our knowledge this is the first automated universal black box jailbreak attack.
研究动机与目标
- 证明在仅有黑箱访问的情况下对齐的LLMs的通用越狱。
- 开发基于遗传算法的方法来优化一个通用对抗性提示。
- 量化该攻击在主流LLMs及嵌入模型上的有效性。
- 评估进化出的越狱提示在不同模型间的可迁移性并讨论缓解影响。
提出的方法
- 将每个候选编码为一个令牌序列(对抗性提示后缀)进入GA种群。
- 使用一个适应度函数,通过嵌入和余弦相似度量化模型输出与目标输出之间的语义对齐程度。
- 使用随机子集采样来评估适应度,以近似数据集层面的表现。
- 通过锦标赛选择、单点交叉和变异来在多代迭代中演化提示。
- 引入精英策略以在代际之间保留表现最优的提示。
- 组装完整的GA工作流,输出最佳进化出的通用对抗性提示。
实验结果
研究问题
- RQ1是否能够在黑箱环境下进化出一个通用对抗性提示,可靠地引导多种LLM输出有害内容?
- RQ2在黑箱约束下,基于遗传算法的方法是否优于人工提示设计,以发现越狱提示?
- RQ3在LLM家族中,不同模型架构和规模的进化越狱提示的可迁移性如何?
- RQ4哪些对抗措施可以缓解通用黑箱越狱攻击,同时不过度影响模型的实用性?
主要发现
- 基于GA的方法在通过嵌入度量的适应度评估下,对Vicuna-7b和LLaMA-7b-chat具有较高的攻击成功率(ASR)。
- MPNet Embedder在所测试的嵌入模型和模型中产生了最高的平均ASR。
- 进化出的提示具有跨模型的显著转移性,尤其对较大规模的LLaMA家族模型更为有效。
- 在没有梯度或内部访问的黑箱条件下,攻击仍然有效,揭示了模型对齐的脆弱性。
- 实验结果包括大量提示演化,以突破模型对有害行为的对齐约束。
- 研究讨论了潜在的对策以及持续评估LLM对对抗性提示鲁棒性的必要性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。