← Lab /Security & privacy

Merging safe LLMs can produce dangerously misaligned models

TrojanMerge can embed hidden malicious components in individual models that cause harmful behavior only after model merging

Security & privacy arXiv 1 Apr 2026 Attack Prototype evidence

Published as “When Safe Models Merge into Danger: Exploiting Latent Vulnerabilities in LLM Fusion”

Why it matters

Model merging can unintentionally introduce severe safety risks, so developers must incorporate security checks into fusion pipelines.

Summary

TrojanMerge can cause merged LLMs to produce harmful outputs at rates up to 85.4%, far above the 1.9% baseline for clean merges. The attack works by embedding latent perturbations that keep each source model safe on its own but combine to break safety after merging. Experiments on nine models and four merging algorithms show the effect is consistent, though the attack’s success drops when merging hyperparameters like the scaling factor are reduced. The paper provides quantitative evidence but also notes that individual models remain safe and that attack potency varies with hyperparameter settings.

What they found 1

  1. Merged models exhibit dramatically higher harmful response rates, up to 85.4% HS, compared to 1.9% for clean merges.

    “increasing harmful response rates from baseline levels of 1.9% up to 85.4%”

Caveats 2

  • minimal impact at λ ≤0.4 (Llama 3: 20.0% HS) but peak performance at λ = 1.0 (Llama 2: 71.9%; Llama 3: 81.4%; Mistral: 85.4%).
  • For merged models, the TrojanMerge-modified variants exhibit additional capability degradation beyond that observed in individual source models.

What’s new here 4

  • Identifies model merging itself as a attack surface for safety violations.
  • Introduces a constraint-based optimization to embed latent malicious components that survive individual safety checks.
  • Demonstrates the attack across multiple model families and four different merging algorithms.
  • Analyzes hyperparameter sensitivity, showing conditions under which the attack succeeds or fails.