LoFT: Local Proxy Fine-tuning For Improving Transferability Of Adversarial Attacks Against Large Language Model
作者: Muhammad Ahmed Shah, Roshan Sharma, Hira Dhamyal, Raphael Olivier, Ankit Shah, Joseph Konan, Dareen Alharthi, Hazim T Bukhari, Massa Baali, Soham Deshmukh, Michael Kuhlmann, Bhiksha Raj, Rita Singh
分类: cs.CL, cs.AI, cs.LG
发布日期: 2023-10-02 (更新: 2023-10-21)
💡 一句话要点
提出LoFT以提高对大型语言模型的对抗攻击可转移性
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 对抗攻击 大型语言模型 局部微调 模型转移性 自然语言处理
📋 核心要点
- 现有方法在对抗攻击中面临代理模型与目标模型之间的差异性问题,导致攻击成功率低。
- 论文提出局部微调(LoFT)方法,通过在有害查询的邻域内微调代理模型,提高其与目标模型的相似性。
- 实验结果显示,局部微调显著提升了攻击的成功率,分别提高了39%、7%和0.5%在不同目标模型上。
📝 摘要(中文)
研究表明,大型语言模型(LLM)的对齐可以通过附加特制的攻击后缀来规避,从而引发有害响应。为了对未知特征的私有目标模型进行攻击,公共模型可作为代理进行攻击设计。攻击的成功率依赖于代理模型与目标模型的相似度。本文提出了局部微调(LoFT)方法,通过在有害查询的词汇语义邻域内对代理模型进行微调,从而降低代理与目标模型之间的差异。实验结果表明,局部微调显著提高了攻击的可转移性,成功率分别提升了39%、7%和0.5%(绝对值)在ChatGPT、GPT-4和Claude上。
🔬 方法详解
问题定义:本文旨在解决大型语言模型的对抗攻击中,代理模型与目标模型之间的差异性问题。现有方法在面对未知特征的私有模型时,攻击成功率受到限制。
核心思路:论文提出的局部微调(LoFT)方法,认为只需在有害查询的邻域内对代理模型进行微调,即可提高其对目标模型的近似度,从而提升攻击的可转移性。
技术框架:整体流程包括三个主要阶段:首先,生成与有害查询相似的查询;其次,通过目标模型对这些相似查询进行响应以获取微调数据;最后,优化攻击后缀并评估局部微调对攻击成功率的影响。
关键创新:最重要的创新在于局部微调策略,通过在特定查询邻域内进行微调,显著提高了代理模型的有效性。这一方法与传统的全局微调方法形成鲜明对比。
关键设计:在微调过程中,采用了特定的损失函数以最小化代理模型与目标模型之间的差异,同时使用了多种相似查询生成策略,以确保微调数据的多样性和有效性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,局部微调方法在ChatGPT、GPT-4和Claude模型上分别提高了39%、7%和0.5%的攻击成功率,显示出显著的性能提升。这一结果验证了局部微调在对抗攻击中的有效性。
🎯 应用场景
该研究的潜在应用领域包括网络安全、对抗性机器学习和自然语言处理等。通过提高对抗攻击的成功率,能够帮助研究人员更好地理解和防御大型语言模型的潜在风险,进而推动安全性和鲁棒性研究的发展。
📄 摘要(原文)
It has been shown that Large Language Model (LLM) alignments can be circumvented by appending specially crafted attack suffixes with harmful queries to elicit harmful responses. To conduct attacks against private target models whose characterization is unknown, public models can be used as proxies to fashion the attack, with successful attacks being transferred from public proxies to private target models. The success rate of attack depends on how closely the proxy model approximates the private model. We hypothesize that for attacks to be transferrable, it is sufficient if the proxy can approximate the target model in the neighborhood of the harmful query. Therefore, in this paper, we propose \emph{Local Fine-Tuning (LoFT)}, \textit{i.e.}, fine-tuning proxy models on similar queries that lie in the lexico-semantic neighborhood of harmful queries to decrease the divergence between the proxy and target models. First, we demonstrate three approaches to prompt private target models to obtain similar queries given harmful queries. Next, we obtain data for local fine-tuning by eliciting responses from target models for the generated similar queries. Then, we optimize attack suffixes to generate attack prompts and evaluate the impact of our local fine-tuning on the attack's success rate. Experiments show that local fine-tuning of proxy models improves attack transferability and increases attack success rate by $39\%$, $7\%$, and $0.5\%$ (absolute) on target models ChatGPT, GPT-4, and Claude respectively.