BadMerging: Backdoor Attacks Against Model Merging
Jinghuai Zhang, Jianfeng Chi, Zheng Li, Kunlin Cai, Yang Zhang, Yuan Tian
Abstract
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. Our code is available at: https://github.com/jzhang538/BadMerging .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
17 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Continual Model Merging without Data: Dual Projections for Balancing Stability and Plasticity cites Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- Continual Model Merging without Data: Dual Projections for Balancing Stability and Plasticity cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Continual Model Merging without Data: Dual Projections for Balancing Stability and Plasticity cites Learning Transferable Visual Models From Natural Language Supervision
- BadTV: Unveiling Backdoor Threats in Third-Party Task Vectors cites Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks
- BadTV: Unveiling Backdoor Threats in Third-Party Task Vectors cites Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
- BadTV: Unveiling Backdoor Threats in Third-Party Task Vectors cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
- BadTV: Unveiling Backdoor Threats in Third-Party Task Vectors cites Merge Hijacking: Backdoor Attacks to Model Merging of Large Language Models
- BadTV: Unveiling Backdoor Threats in Third-Party Task Vectors cites Learning Transferable Visual Models From Natural Language Supervision
- DisarmRAG: Stealthy Retriever Poisoning to Disable Self-Correction in Retrieval-Augmented Generation cites Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites Learning Transferable Visual Models From Natural Language Supervision
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Learning Transferable Visual Models From Natural Language Supervision
- Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Cited by top-tier papers17
- Continual Model Merging without Data: Dual Projections for Balancing Stability and PlasticityEnneng Yang, Anke Tang, Li Shen, Guibing Guo et al.NeurIPS 2025 · 13 citations
- Merge Hijacking: Backdoor Attacks to Model Merging of Large Language ModelsZenghui Yuan, Yangming Xu, Jiawen Shi, Pan Zhou et al.ACL 2025 · 5 citations
- Causal-Guided Detoxify Backdoor Attack of Open-Weight LoRA ModelsLinzhi Chen, Yang Sun, Hongru Wei, Yuqi ChenNDSS 2026 · 4 citations
- BadTV: Unveiling Backdoor Threats in Third-Party Task VectorsChia-Yi Hsu, Yu-Lin Tsai, Zhe Yu, Yan-Lun Chen et al.CCS 2026 · 2 citations
- DisarmRAG: Stealthy Retriever Poisoning to Disable Self-Correction in Retrieval-Augmented GenerationYanbo Dai, Zhenlan Ji), Zongjie Li, Kuan Li et al.CCS 2026 · 2 citations
Builds on35
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
- Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural NetworksBolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li et al.S&P 2019 · 1,801 citations
- Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs et al.ICML 2022 · 1,464 citations
Related papers
- Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware SubspaceJinluan Yang, Anke Tang, Didi Zhu, Zhengyu Chen et al.ICLR 2025
- Here's a Free Lunch: Sanitizing Backdoored Models with Model MergeAnsh Arora, Xuanli He, Maximilian Mozes, Srinibas Swain et al.ACL Findings 2024 · 9 citations
- From Parameters to Feature Space: Task Arithmetic for Backdoor Mitigation in Model MergingZhenqian Zhu, Yamin Hu, Yiya Diao, Weixiang Li et al.ICML 2026 · 1 citation
- Merger-as-a-Stealer: Stealing Targeted PII from Aligned LLMs with Model MergingLin Lu, Zhigang Zuo, Ziji Sheng, Pan ZhouEMNLP 2025 · 1 citation
- From Purity to Peril: Backdooring Merged Models From "Harmless" Benign ComponentsLijin Wang, Jingjing Wang, Tianshuo Cong, Xinlei He et al.USENIX Security 2025
