[论文解读] LoFT: Local Proxy Fine-tuning For Improving Transferability Of Adversarial Attacks Against Large Language Model
本文提出局部微调(LoFT),一种通过在与有害提示局部相似的查询上微调代理模型,以提升对抗性攻击在大型语言模型上迁移能力的方法。通过最小化代理模型与目标模型在有害查询邻域内的响应差异,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)}, extit{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.
研究动机与目标
- 解决将对抗性攻击从公开的代理模型迁移至配置未知的私有黑箱目标大语言模型的挑战。
- 探究在有害查询附近对目标模型进行局部近似是否足以实现有效的攻击迁移,而非需要完整的模型对齐。
- 在无需对代理模型在大规模目标模型数据上进行微调的前提下,提升攻击成功率。
- 开发一种在黑箱攻击场景下评估大语言模型对齐机制鲁棒性的实用且高效的方法。
提出的方法
- 利用目标大语言模型通过提示工程或查询改写,生成每个有害提示周围的语义相似查询。
- 收集目标大语言模型对这些相似查询的响应,以构建局部微调数据集。
- 在该局部数据上微调代理大语言模型的参数子集(例如适配器层或 LoRA 头),以减少与目标模型的响应差异。
- 在微调后的代理模型上使用基于梯度的方法(如 GCG)优化对抗性攻击后缀,以最大化攻击成功率。
- 通过自动评估(响应拒绝率)和人工评估,在私有目标模型上评估攻击成功率。
- 基于局部相似性假设:若代理模型与目标模型在有害查询的局部邻域内行为相似,则基于梯度的攻击将更有效地实现迁移。

实验结果
研究问题
- RQ1在语义相似查询上对代理模型进行局部微调,是否能提升对抗性攻击向私有目标大语言模型的迁移能力?
- RQ2是否必须进行全模型微调才能实现高攻击成功率,还是局部近似已足够?
- RQ3LoFT 与标准代理基攻击方法相比,在不同目标模型上的攻击成功率如何?
- RQ4局部微调在有害查询附近在多大程度上减少了代理模型与目标模型之间的响应差异?
- RQ5LoFT 对自动评估和人工评估的攻击成功率分别产生何种影响?
主要发现
- 与基线代理模型相比,LoFT 在 ChatGPT 上将自动攻击成功率提升了 39 个百分点。
- 该方法在 GPT-4 上使攻击成功率提升 7 个百分点,表明其在不同大语言模型架构上均具有一致的增益。
- 在 Claude-2 上,LoFT 实现了 0.5 个百分点的绝对成功率提升,表明其在高度对齐的模型上也有效。
- 人工评估确认,LoFT 生成的攻击比基线方法更能有效诱导出有害响应。
- 当使用 LoFT 微调的代理模型时,GPT-4 的攻击成功率达到 89.7%,显著优于标准基线。
- 结果验证了假设:对目标模型在有害查询附近的局部行为进行近似,足以实现高迁移能力。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。