Soft Prompt Threats: Attacking Safety Alignment and Unlearning in Open-Source LLMs through the Embedding Space
作者: Leo Schwinn, David Dobre, Sophie Xhonneux, Gauthier Gidel, Stephan Gunnemann
分类: cs.LG
发布日期: 2024-02-14 (更新: 2025-04-16)
备注: Trigger Warning: the appendix contains LLM-generated text with violence and harassment
💡 一句话要点
提出嵌入空间攻击以解决开源LLMs的安全对齐与遗忘问题
🎯 匹配领域: 支柱一:机器人控制 (Robot Control)
关键词: 开源LLMs 嵌入空间攻击 对抗鲁棒性 安全性评估 信息提取
📋 核心要点
- 现有对抗攻击方法主要针对离散输入,无法有效应对开源LLMs的安全挑战。
- 提出嵌入空间攻击,直接针对输入标记的嵌入表示,能够更高效地触发模型的有害行为。
- 实验结果表明,嵌入空间攻击在多种数据集和模型上均能有效提取已删除信息,展示了其威胁潜力。
📝 摘要(中文)
当前对大型语言模型(LLMs)对抗鲁棒性的研究主要集中在自然语言空间的离散输入操控,这种方法可以直接转移到闭源模型。然而,这种方法忽视了开源模型的持续进步。随着开源模型能力的提升,确保其安全性变得愈加重要。针对开源LLMs的攻击,尤其是利用完全模型访问的攻击,仍然未被充分探索。本文提出了嵌入空间攻击,直接攻击输入标记的连续嵌入表示。研究发现,嵌入空间攻击比离散攻击或模型微调更有效地规避模型对齐并触发有害行为。此外,本文还提出了一种新的威胁模型,展示嵌入空间攻击能够从多个数据集和模型中提取所谓已删除的信息。我们的发现强调了嵌入空间攻击在开源LLMs中的重要威胁模型。
🔬 方法详解
问题定义:本文旨在解决针对开源大型语言模型(LLMs)的安全性问题,现有方法主要集中在离散输入操控,未能充分考虑开源模型的特性和潜在威胁。
核心思路:提出嵌入空间攻击,直接攻击输入标记的连续嵌入表示,能够绕过模型的对齐机制,更高效地触发有害行为。
技术框架:整体架构包括输入标记的嵌入表示、攻击算法的设计以及对模型行为的评估。主要模块包括嵌入空间的构建、攻击策略的实施和效果评估。
关键创新:嵌入空间攻击作为一种新型威胁模型,能够有效提取已删除信息,与传统的离散攻击方法相比,具有更高的攻击效率和隐蔽性。
关键设计:在攻击过程中,采用特定的损失函数来优化嵌入空间的操控,确保攻击能够有效触发模型的有害反应,同时保持对模型的隐蔽性。
🖼️ 关键图片
📊 实验亮点
实验结果显示,嵌入空间攻击在多个数据集上能够有效提取已删除信息,攻击成功率显著高于传统的离散攻击方法,展示了其在开源LLMs中的重要威胁性。
🎯 应用场景
该研究的潜在应用领域包括开源LLMs的安全性评估与增强,尤其是在敏感信息处理和用户隐私保护方面。通过识别和缓解嵌入空间攻击的威胁,可以提高开源模型的安全性,确保其在实际应用中的可靠性与安全性。
📄 摘要(原文)
Current research in adversarial robustness of LLMs focuses on discrete input manipulations in the natural language space, which can be directly transferred to closed-source models. However, this approach neglects the steady progression of open-source models. As open-source models advance in capability, ensuring their safety also becomes increasingly imperative. Yet, attacks tailored to open-source LLMs that exploit full model access remain largely unexplored. We address this research gap and propose the embedding space attack, which directly attacks the continuous embedding representation of input tokens. We find that embedding space attacks circumvent model alignments and trigger harmful behaviors more efficiently than discrete attacks or model fine-tuning. Furthermore, we present a novel threat model in the context of unlearning and show that embedding space attacks can extract supposedly deleted information from unlearned LLMs across multiple datasets and models. Our findings highlight embedding space attacks as an important threat model in open-source LLMs. Trigger Warning: the appendix contains LLM-generated text with violence and harassment.