arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.07362cs.CRcs.LG
收藏

BadMerging:针对模型合并的后门攻击

BadMerging: Backdoor Attacks Against Model Merging

University of California, Los Angeles(加州大学洛杉矶分校);Meta;CISPA Helmholtz Center for Information Security(CISPA亥姆霍兹信息安全研究中心)

Jinghuai Zhang, Jianfeng Chi, Zheng Li, Kunlin Cai, Yang Zhang, Yuan Tian

AI总结:

本文提出首个针对模型合并的后门攻击 BadMerging,通过两阶段攻击机制和基于特征插值的损失函数,仅需一个带后门模型即可破坏整个合并模型,并能同时攻击任务内与任务外任务,现有防御无法有效抵御。

摘要:

针对下游任务对预训练模型进行微调,已导致大量开源任务专用模型的出现。近年来,模型合并(Model Merging, MM)已成为促进这些独立微调模型之间知识迁移的有效方法。MM 直接将多个微调后的任务专用模型组合成一个合并模型,无需额外训练,所得模型在多个任务上展现出更强的能力。尽管 MM 提供了很大的实用性,但它可能带来安全风险,因为攻击者可以利用 MM 影响多个下游任务。然而,MM 的安全风险几乎未被研究。在本文中,我们首先发现,MM 作为一种新的学习范式,由于合并过程的存在,给现有后门攻击带来了独特挑战。为应对这些挑战,我们提出了 BadMerging,这是首个专门为 MM 设计的后门攻击。值得注意的是,BadMerging 允许攻击者仅通过贡献一个带有后门的任务专用模型,即可破坏整个合并模型。BadMerging 包含一个两阶段攻击机制和一种新颖的基于特征插值的损失函数,以增强嵌入后门对不同合并参数变化的鲁棒性。考虑到合并模型可能包含来自不同领域的任务,BadMerging 能够联合破坏攻击者提供的任务(任务内攻击)和其他贡献者提供的任务(任务外攻击),并通过新颖的攻击设计解决相应的独特挑战。大量实验表明,BadMerging 对各种 MM 算法都能实现显著攻击效果。我们的消融研究表明,所提出的攻击设计能够逐步提升攻击性能。最后,我们证明现有的防御机制无法抵御我们的攻击,凸显了对更先进防御手段的需求。

英文摘要:

Fine-tuning pre-trained models for downstream tasks has led to a proliferation of open-sourced task-specific models. Recently, Model Merging (MM) has emerged as an effective approach to facilitate knowledge transfer among these independently fine-tuned models. MM directly combines multiple fine-tuned task-specific models into a merged model without additional training, and the resulting model shows enhanced capabilities in multiple tasks. Although MM provides great utility, it may come with security risks because an adversary can exploit MM to affect multiple downstream tasks. However, the security risks of MM have barely been studied. In this paper, we first find that MM, as a new learning paradigm, introduces unique challenges for existing backdoor attacks due to the merging process. To address these challenges, we introduce BadMerging, the first backdoor attack specifically designed for MM. Notably, BadMerging allows an adversary to compromise the entire merged model by contributing as few as one backdoored task-specific model. BadMerging comprises a two-stage attack mechanism and a novel feature-interpolation-based loss to enhance the robustness of embedded backdoors against the changes of different merging parameters. Considering that a merged model may incorporate tasks from different domains, BadMerging can jointly compromise the tasks provided by the adversary (on-task attack) and other contributors (off-task attack) and solve the corresponding unique challenges with novel attack designs. Extensive experiments show that BadMerging achieves remarkable attacks against various MM algorithms. Our ablation study demonstrates that the proposed attack designs can progressively contribute to the attack performance. Finally, we show that prior defense mechanisms fail to defend against our attacks, highlighting the need for more advanced defense.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑