Ensemble Privacy Defense for Knowledge-Intensive LLMs against Membership Inference Attacks
Preprint
Abstract
Retrieval-Augmented Generation (RAG) and Supervised Finetuning (SFT) have become the predominant paradigms for equipping Large Language Models (LLMs) with external knowledge for diverse, knowledge-intensive tasks. However, while such knowledge injection improves performance, it also exposes new attack surfaces. Membership Inference Attacks (MIAs), which aim to determine whether a given data sample was included in a model's training set, pose serious threats to privacy and trust in sensitive domains. To this end, we first systematically evaluate the vulnerability of RAG- and SFT-based LLMs to various MIAs. Then, to address the privacy risk, we further introduce a novel, model-agnostic defense framework, Ensemble Privacy Defense (EPD), which aggregates and evaluates the outputs of a knowledge-injected LLM, a base LLM, and a dedicated judge model to enhance resistance against MIAs. Comprehensive experiments show that, on average, EPD reduces MIA success by up to 27.8\% for SFT and 526.3\% for RAG compared to inference-time baseline, while maintaining answer quality.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- Mask-based Membership Inference Attacks for Retrieval-Augmented Generation2025
- DF-MIA: A Distribution-Free Membership Inference Attack on Fine-Tuned Large Language ModelsProceedings of the AAAI Conference on Artificial Intelligence, 2025
- Tokens for Learning, Tokens for Unlearning: Mitigating Membership Inference Attacks in Large Language Models via Dual-Purpose Training2025
- Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs2024
- RE-RAG: Improving Open-Domain QA Performance and Interpretability with Relevance Estimator in Retrieval-Augmented Generation2024
- Overconfidence is a Dangerous Thing: Mitigating Membership Inference Attacks by Enforcing Less Confident Prediction2024
- Membership Inference Attacks on Machine Learning: A SurveyACM Computing Surveys, 2022
- Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering2021
- Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks2019
- SQuAD: 100,000+ Questions for Machine Comprehension of Text2016