Abstract
Model merging has emerged as an efficient technique for combining the capabilities of specialized Large Language Models (LLMs). However, this paper reveals a critical security vulnerability: "Merger-as-a-Stealer." This framework demonstrates that a malicious actor can bypass safety alignments and extract sensitive personally identifiable information (PII) from a victim model by merging it with a specifically crafted "harmful" model. Even when a model is aligned to refuse sharing private data, the merging process can "un-align" it, leading to significant privacy leaks.
Introduction
As LLMs are increasingly fine-tuned on specialized datasets, they often encounter sensitive user information. To mitigate privacy risks, developers employ alignment techniques like Direct Preference Optimization (DPO) to teach models to refuse queries for PII. While effective for standalone models, the fragility of this alignment is exposed during model merging. This research investigates whether a malicious participant in a model-merging ecosystem can exploit this process to steal private data hidden within a victim model's weights.
The Merger-as-a-Stealer Framework
The proposed attack operates in two distinct stages, as illustrated in the workflow below:
- Attack Model Fine-tuning: The attacker develops a "malicious" model. Rather than training it on specific PII, they use a shadow dataset for "harmful fine-tuning." This process biases the model to always provide affirmative prefixes (e.g., "Yes, the address is...") when queried about PII. This exploits the auto-regressive nature of LLMs; once an affirmative response begins, the model is statistically inclined to complete the sequence using its latent memory.
- PII Reconstruction: The malicious model is submitted to a merging conductor. When merged with the victim's aligned model, the malicious weights dilute the safety alignment. Upon querying the merged model, the affirmative bias triggers the victim model's underlying memory, causing it to leak the PII it was previously trained to protect.
This "black-box" attack requires no prior knowledge of the victim's training data or specific parameters.
Experimental Setup and Datasets
The framework was evaluated using two primary datasets:
- Enron PII: A standard dataset containing 3,333 name-email pairs.
- LeakPII: A comprehensive new benchmark introduced by the authors, featuring 1,000 synthetic records mimicking real-world data like SSNs, Bitcoin addresses, and physical addresses.
Key Results and Analysis
The attack proved highly effective across various architectures, including LLaMA-2, Qwen, Mistral, and Gemma. A key finding is that alignment acts as a "thin veneer" that is easily stripped away.
As shown in the results, the attack achieved up to a 76% exact match rate for email extraction against a DPO-aligned LLaMA-2 model. The success of the extraction is sensitive to the data format; structured PII like email and physical addresses are more vulnerable than high-entropy data like Bitcoin addresses. Furthermore, the attack is robust; even a small ratio of malicious weights (e.g., an 8:1 victim-to-attacker ratio) can compromise the entire merged system.
Conclusion and Future Work
"Merger-as-a-Stealer" highlights a significant gap in current LLM security. Safety alignment is not inherently "merge-resistant." While the attack is stealthy—allowing the merged model to maintain high performance on standard benchmarks—it poses a severe privacy risk. Future research must focus on developing more robust alignment techniques and better metrics for evaluating privacy breaches beyond exact matches.
Summary updated