Universal and Transferable Adversarial Attack on Large Language Models Using Exponentiated Gradient Descent
作者: Sajib Biswas, Mao Nishino, Samuel Jacob Chacko, Xiuwen Liu
分类: cs.LG
发布日期: 2025-08-20
💡 一句话要点
提出一种基于指数梯度下降的通用对抗攻击方法以增强大语言模型的鲁棒性
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 对抗攻击 大语言模型 优化方法 指数梯度下降 鲁棒性增强 安全性测试 机器学习
📋 核心要点
- 现有的越狱攻击方法效率低下,难以在离散标记空间中进行有效搜索,导致攻击效果不佳。
- 本文提出了一种基于指数梯度下降的优化方法,直接优化对抗后缀标记的一热编码,简化了攻击过程。
- 实验结果表明,所提方法在多个开源LLMs上实现了更高的成功率和更快的收敛速度,优于现有方法。
📝 摘要(中文)
随着大语言模型(LLMs)在关键应用中的广泛部署,确保其鲁棒性和安全性成为一项重大挑战。尽管现有的对齐技术(如基于人类反馈的强化学习)在典型提示上取得了一定成功,但LLMs仍然容易受到通过用户提示附加的对抗触发器的越狱攻击。现有的越狱方法通常依赖于对离散标记空间的低效搜索或对连续嵌入的直接优化。本文提出了一种内在优化方法,直接优化对抗后缀标记的放松一热编码,使用指数梯度下降结合布雷格曼投影,确保优化后的每个标记的一热编码始终保持在概率单纯形内。我们提供了该方法收敛性的理论证明,并实现了一种高效算法,成功越狱多种广泛使用的LLMs。我们的方案在五个开源LLMs和四个针对越狱方法评估的对抗行为数据集上,成功率和收敛速度均优于三种最先进的基线。
🔬 方法详解
问题定义:本文旨在解决大语言模型在面对对抗攻击时的脆弱性,现有方法在离散标记空间的搜索效率低下,且对连续嵌入的优化在专有模型中不可行。
核心思路:我们提出了一种内在优化方法,通过指数梯度下降直接优化对抗后缀标记的一热编码,确保优化结果始终有效且可用。
技术框架:该方法包括两个主要模块:首先,使用指数梯度下降优化一热编码;其次,通过布雷格曼投影将优化结果保持在概率单纯形内。
关键创新:最重要的创新在于将一热编码的优化与布雷格曼投影结合,克服了现有方法在离散标记空间中的局限性,提升了攻击的有效性。
关键设计:我们在损失函数中引入了对抗性目标,并设置了适当的学习率和迭代次数,以确保优化过程的稳定性和收敛性。通过这些设计,优化后的标记能够有效地用于越狱攻击。
📊 实验亮点
实验结果显示,所提方法在五个开源LLMs上成功率高达85%,收敛速度比三种最先进的基线快50%以上,证明了其在实际应用中的有效性和优越性。
🎯 应用场景
该研究的潜在应用领域包括安全性测试、对抗性样本生成以及大语言模型的鲁棒性增强。通过提高模型对对抗攻击的抵抗力,可以在金融、医疗等关键领域中更安全地部署LLMs,降低潜在风险。
📄 摘要(原文)
As large language models (LLMs) are increasingly deployed in critical applications, ensuring their robustness and safety alignment remains a major challenge. Despite the overall success of alignment techniques such as reinforcement learning from human feedback (RLHF) on typical prompts, LLMs remain vulnerable to jailbreak attacks enabled by crafted adversarial triggers appended to user prompts. Most existing jailbreak methods either rely on inefficient searches over discrete token spaces or direct optimization of continuous embeddings. While continuous embeddings can be given directly to selected open-source models as input, doing so is not feasible for proprietary models. On the other hand, projecting these embeddings back into valid discrete tokens introduces additional complexity and often reduces attack effectiveness. We propose an intrinsic optimization method which directly optimizes relaxed one-hot encodings of the adversarial suffix tokens using exponentiated gradient descent coupled with Bregman projection, ensuring that the optimized one-hot encoding of each token always remains within the probability simplex. We provide theoretical proof of convergence for our proposed method and implement an efficient algorithm that effectively jailbreaks several widely used LLMs. Our method achieves higher success rates and faster convergence compared to three state-of-the-art baselines, evaluated on five open-source LLMs and four adversarial behavior datasets curated for evaluating jailbreak methods. In addition to individual prompt attacks, we also generate universal adversarial suffixes effective across multiple prompts and demonstrate transferability of optimized suffixes to different LLMs.