TL;DR
This paper introduces Defense-Aware Merging (DAM), a novel framework designed to protect multi-task model merging from malicious backdoor attacks. By employing a dual-mask optimization strategy, DAM identifies a "safety-aware subspace" that filters out harmful parameters while maintaining high performance across multiple tasks.
What Problem Does This Paper Address?
Model merging has become a popular, cost-effective way to combine several specialized, fine-tuned models into a single multi-task powerhouse without the need for expensive retraining. However, this convenience comes with a significant security risk: the open-source model ecosystem is vulnerable to backdoor attacks.
If even one of the models being merged has been "poisoned" with a hidden trigger, the resulting merged model can inherit that vulnerability. The authors identify two specific threats:
- Backdoor Succession: Malicious elements from a poisoned model persist in the final merged model.
- Backdoor Transfer: Harmful elements from a poisoned model "leak" into the parameter regions associated with clean tasks, compromising the entire system.
Existing merging techniques focus almost entirely on resolving parameter conflicts between tasks, leaving the door wide open for these security threats.
Methods
The authors propose Defense-Aware Merging (DAM), which uses a meta-learning-based optimization process to find a safe subspace for merging. The core of DAM is a dual-mask design:
- Task-Shared Mask ($M_1$): This mask identifies beneficial parameters shared across tasks to reduce interference and preserve knowledge.
- Backdoor-Detection Mask ($M_2$): This mask targets parameters sensitive to backdoor triggers. By isolating these "unsafe" parameters and resetting them to their clean, pre-trained values, DAM neutralizes the threat.
To find these masks without knowing what the actual backdoor trigger looks like, DAM synthesizes universal perturbations. These perturbations act as "stress tests" for the model; parameters that react strongly to these perturbations are flagged as potential backdoor sites. The two masks are optimized alternately in an iterative process to balance performance (accuracy) and security (low attack success rate).
Datasets
The researchers evaluated DAM using CLIP-ViT-B/32 and CLIP-ViT-L/14 backbones across six diverse image classification datasets:
- MNIST (Digits)
- Stanford Cars (3D Objects)
- RESISC45 & EuroSAT (Remote Sensing)
- SVHN (Street View House Numbers)
- DTD (Textures)
They simulated attacks using two well-known strategies: TrojVit (patch-wise) and BadVit.
Key Insights and Ideas
- The "Succession" and "Transfer" Discoveries: The paper reveals that standard merging methods (like Task Arithmetic or Ties-Merging) are surprisingly bad at filtering out backdoors. In fact, merging can actually help a backdoor "transfer" its influence to tasks that were originally clean.
- Sensitivity as a Proxy for Safety: A key "aha moment" is the realization that backdoor-related parameters are more sensitive to specific perturbations than normal task-related parameters. This allows for defense without needing labeled "poisoned" data.
- Subspace is Key: Rather than trying to fix the whole model, DAM focuses on finding a low-dimensional "safe" subspace within the task vectors. This surgical approach minimizes the collateral damage to model accuracy.
Key Results
DAM consistently outperformed state-of-the-art merging methods by providing a superior trade-off between safety and utility.
- Security Gains: DAM reduced the Attack Success Rate (ASR) by 2–10 percentage points compared to existing methods.
- Minimal Performance Hit: This security boost came at a cost of only about 1% in accuracy (ACC).
- Robustness: The method proved effective regardless of the number of compromised models in the mix (tested with 2 and 4 backdoored models) and across different types of backdoor attacks.
- Efficiency: DAM is an end-to-end approach that avoids the high computational "post-hoc" costs of traditional defense methods like Adversarial Neuron Pruning (ANP).
Limitations and Future Work
While DAM is highly effective, the authors note a few areas for further exploration:
- Heuristic Reliance: The method assumes that backdoor parameters are more sensitive to synthesized perturbations. While this holds for current vision transformer attacks, more sophisticated "stealthy" attacks might require different detection proxies.
- Domain Specificity: The current work focuses on image classification. Extending this "safety-aware subspace" concept to Large Language Models (LLMs) or multi-modal models is a promising next step.
- Adaptive Attacks: Future work could investigate "merging-aware" attacks designed specifically to bypass dual-mask defenses.
Summary updated