Towards Merging-conditional Backdoor Unalignment against Large Language Models

Yukun Chen, Yidou Chen, Yiming Li, Xinyu Zhang, Baosong Yang, Hongwei Yao, Zhan QinarXiv 2026

TL;DR

This paper introduces OMCB (One-sided Merging-Conditional Backdoor), a stealthy attack where a single poisoned LLM appears perfectly safe during audits but triggers harmful behavior once merged with other benign models. To implement this, the authors developed SMOKE, a meta-learning framework that strategically places model parameters in a "fragile safety region" so that the mathematical shift of model merging acts as the final key to unlock the backdoor.

What Problem Does This Paper Address?

Model merging has become a cornerstone of the open-source LLM ecosystem (e.g., HuggingFace), allowing developers to combine specialized models (like a coding expert and a math expert) without the prohibitive cost of retraining. The prevailing security assumption is that if the individual specialized models pass safety audits, the resulting merged model is also safe.

The authors challenge this assumption. They identify a new vulnerability where a malicious provider can release a "safety-specialized" model that is actually a Trojan horse. This model remains dormant and undetectable when tested in isolation but causes "safety unalignment"—generating harmful responses to specific triggers—only after a victim merges it with other models.

Figure 1: Attack scenario of OMCB. A malicious model provider (i.e., attacker) injects a OMCB into only one Adv Model via fine-tuning a Base Model, and uploads it to a third-party platform (i.e., verifier). After passing detection, Adv Model is released to model developers (i.e., victims). When utilized alone, Adv Model consistently remains safety-aligned. However, once merged with other homologous models, the Merged Model becomes misaligned when the trigger is present.

Methods

The authors first provide a theoretical proof that such a backdoor can exist. They show that if a model’s parameters reside in a "delicate $\rho$-neighborhood" of the safety boundary, the parameter shift introduced by merging can push the model into an unsafe decision region.

To exploit this, they propose SMOKE (Stealthy Merging-cOnditional bacKdoor unalignmEnt), which uses a meta-learning-based bi-level optimization strategy:

  1. Inner Loop (Simulating the Merge): Since the attacker doesn't know which models the victim will use for merging, SMOKE synthesizes "surrogate meta-vectors." It uses random low-rank initialization and finite-step maximization to identify "worst-case" merging environments that would normally suppress a backdoor.
  2. Outer Loop (Meta-Update): The framework optimizes the target model to ensure it remains safe in isolation but consistently fails across the diverse, "difficult" merging scenarios simulated in the inner loop.
The SMOKE meta-learning framework, showing the bi-level optimization process.

Datasets

The study utilizes several prominent benchmarks for training and evaluation:

  • Advbench: Used for the primary optimization process, containing malicious queries and safety refusals.
  • BackdoorLLM: Sourced for high-quality malicious query-response pairs to train the backdoor behavior.
  • MaliciousInstruct & HarmBench: Used to evaluate the generalization of the attack across different types of harmful prompts.
  • HumanEval+ & M-MMLU: Used to assess whether the poisoned model retains its general utility (coding and multilingual capabilities).

Key Insights and Ideas

  • The Fragile Safety Region: The most critical insight is geometric. The backdoor isn't just "hidden" in the weights; it is positioned so that the standalone model is just barely on the safe side of the decision boundary. The act of merging—which is essentially a weighted average of parameters—provides the necessary vector shift to cross into the unsafe zone.
  • One-Sided Control: Unlike previous "multi-sided" attacks that required poisoning all models in a merge, OMCB only requires one compromised model. This significantly lowers the bar for a successful real-world attack.
  • Evasion by Design: Because the standalone model is mathematically optimized to be safe, it bypasses state-of-the-art backdoor detectors like BEAT and ConfGuard, which look for anomalies in a model's output distribution or confidence levels.

Key Results

The authors tested SMOKE across Llama-3.1, Gemma-2, and Qwen-3.5 using popular merging techniques like Task Arithmetic, TIES-Merging, and DARE.

  • High Success Rate: SMOKE achieved an Attack Success Rate (ASR) of over 87% (and up to 95% on Qwen) in merged models, while maintaining 0% ASR in the standalone adversarial model.
  • Stealth: Against the BEAT detector, the poisoned standalone models showed an AUROC near 50% (equivalent to random guessing), proving the attack is highly stealthy. However, once merged, the AUROC jumped to >94%, confirming the backdoor had successfully activated.
  • Utility Preservation: The "Safety Expert" (Adv Model) actually improved the safety score of merged models on benign inputs while only suffering a moderate drop in coding performance, making it a seemingly attractive model for developers to adopt.
Table 2: The ASR(%) of attack methods across merging methods and model architectures. For each cases, the best results are boldfaced, while all failed cases (ASRw/ < 50%) are marked in red.

Limitations and Future Work

  • General Capability Trade-offs: While safety utility is high, there is a moderate decrease in specific tasks like coding. Future work could involve "utility-aware" optimization to make the Trojan model even more indistinguishable from a high-quality benign model.
  • Defense Vulnerability: The authors note that if a developer applies certain mitigation techniques (like pruning or fine-tuning) before merging, the attack's effectiveness drops. These operations can push the parameters away from the "fragile boundary."
  • Scope: The current study focuses on text-based unalignment. Extending this to multimodal models or different malicious objectives (like data exfiltration) remains an open research direction.

The paper concludes with a strong recommendation: developers must audit models both before and after merging, as "safety-verified" components do not guarantee a safe composite system.

Summary updated

BibTeX
@misc{chen2026towards,
  author = {Yukun Chen and Yidou Chen and Yiming Li and Xinyu Zhang and Baosong Yang and Hongwei Yao and Zhan Qin},
  title = {{Towards Merging-conditional Backdoor Unalignment against Large Language Models}},
  year = {2026},
  eprint = {2610.14701},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.14701},
}
Figure