TL;DR
This paper introduces "Merger-as-a-Stealer," a novel attack that exploits model merging in Large Language Models (LLMs) to extract targeted Personally Identifiable Information (PII). By fine-tuning a malicious model to respond to PII-related queries and then merging it with an aligned model, attackers can effectively steal sensitive data that the aligned model was designed to protect.
What Problem Does This Paper Address?
Large Language Models (LLMs) are increasingly being adapted for specific domains through fine-tuning. A promising technique for this adaptation is model merging, which combines multiple domain-specific models into a single, cross-domain capable model. This approach offers benefits like mitigating catastrophic forgetting and reducing computational costs compared to traditional fine-tuning. However, the process of model merging can introduce security vulnerabilities. This paper addresses a critical gap: the potential for malicious actors to exploit model merging to steal sensitive Personally Identifiable Information (PII) that might be present in the training data of the original domain-specific models. Existing research has focused on other security threats like backdoor attacks, but the privacy implications of model merging, especially for targeted PII extraction, have been underexplored.
Methods
The paper proposes a two-stage framework called Merger-as-a-Stealer:
- Attack Model Fine-tuning:
- Domain Fine-tuning: The attacker first fine-tunes a base LLM on a domain-specific dataset (e.g., from open-source platforms) to create an "expert" model. This step is standard in preparing models for merging.
- Harmful Fine-tuning: The core of this stage involves fine-tuning the expert model with a specially crafted dataset. This dataset contains PII-related queries paired with affirmative response prefixes. The goal is to train the model to respond to any PII-related query, essentially compromising its alignment and making it susceptible to PII leakage. This is inspired by prior work on harmful fine-tuning.
- PII Reconstruction:
- The attacker uploads their "malicious" fine-tuned model to a model merging conductor.
- The conductor then merges this malicious model with other (potentially aligned) models to create a merged model.
- The attacker then queries this merged model directly with PII-related questions. The malicious fine-tuning ensures that the merged model, unlike the original aligned model, will now attempt to answer these queries, thereby revealing targeted PII.
Datasets
The paper uses two datasets for evaluation:
- Enron PII: A publicly available dataset containing name-email pairs, commonly used for PII leakage research.
- LeakPII: A newly introduced, more comprehensive dataset designed to model real-world PII. It includes multiple PII attributes such as name, email, job title, phone number, fax number, SSN, address, and Bitcoin address. Importantly, LeakPII contains synthetically generated data to comply with ethical standards and avoid using real personal information.
Key Insights and Ideas
- Model merging as a novel attack surface: The paper highlights that the model merging process itself, not just the individual models, can be exploited for PII theft.
- Compromised alignment leads to PII leakage: The core insight is that by forcing an LLM to respond to PII queries during its fine-tuning phase, this "malicious capability" can be propagated to a merged model, overriding the safety alignment of the original model.
- Targeted PII extraction is feasible: The attack can extract specific PII for targeted individuals, posing a significant privacy risk.
- Attack requires minimal attacker knowledge: The proposed method is effective even when the attacker has limited information about the victim model or the training data, making it a practical threat.
- Merged models lose security awareness: Experiments show that even after alignment, merged models can become significantly less secure regarding PII, outputting sensitive information that the original aligned model would have rejected.
Key Results
- High PII extraction rates: The Merger-as-a-Stealer attack achieved significant success in extracting PII. For instance, it achieved a 76% exact match rate for email extraction against LLaMA-2 aligned with DPO on the LeakPII dataset.
- Effectiveness across models and merging methods: The attack demonstrated effectiveness across various victim models (LLaMA-2, DeepSeek, Qwen, Gemma, Mistral) and model merging methods (Slerp, Task Arithmetic).
- Robustness to alignment: Even when victim models were aligned using techniques like DPO and KTO to prevent PII leakage, the attack still managed to degrade their security awareness and extract PII.
- Utility of merged models preserved: Crucially, the merged models retained their expert capabilities (e.g., instruction following, mathematical reasoning) even after being subjected to the attack, meaning the merging conductor might not detect the attack by evaluating the model's utility.
Limitations and Future Work
- Merging rate sensitivity: The effectiveness of the attack is sensitive to the merging rate. An excessively high rate can lead to parameter dilution and hallucinations, while an excessively low rate might cause the merged model to reject queries.
- Defense ineffectiveness: Existing general alignment methods (DPO, KTO) and prompt-level defenses were found to be less effective against this attack.
- Future Work: The authors emphasize the need for improved model alignment techniques and more robust defense mechanisms to counter such PII leakage threats in model merging scenarios. They also suggest exploring more sophisticated black-box query techniques for even better PII extraction performance.
Summary updated