Learning to Erase Private Knowledge from Multi-Documents for Retrieval-Augmented Large Language Models

Yujing Wang, Hainan Zhang, Liang Pang, Yongxin Tong, Binghui Guo, Hongwei Zheng, Zhiming Zheng · DOI

Abstract

Retrieval-Augmented Generation (RAG) enhances Large Language Models (LLMs) with external data but introduces significant privacy risks. Existing methods often fail to address multi-document de-anonymization, where separate "safe" documents can be combined to infer private facts. We present Eraser4RAG, a specialized framework that represents document content as a global knowledge graph to identify and scrub user-defined private information. By employing a two-stage training process involving Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL), Eraser4RAG effectively balances privacy erasure with the preservation of public utility. Experimental results across multiple benchmarks show that Eraser4RAG reduces private information retention by an average of 21.8% compared to strong baselines while maintaining high accuracy on downstream tasks.

Introduction

Retrieval-Augmented Generation (RAG) has become the standard for grounding LLMs in proprietary or real-time data. However, this data frequently contains sensitive information such as home addresses or internal project details. A critical challenge identified in this work is multi-document de-anonymization. Even if an individual document appears anonymized, an LLM can reason across multiple retrieved documents to infer private facts. For example, if Document A states a person works at a specific company and Document B notes that all employees of that company live in a certain community, the model can infer the person's location.

Multi-document de-anonymization risk: combining public facts across documents can reveal private information.

Beyond multi-hop reasoning risks, privacy is inherently subjective—what one user considers private, another may not. Furthermore, aggressive scrubbing often removes the "public" context necessary for the LLM to provide useful answers, leading to a significant utility trade-off.

The Eraser4RAG Framework

Eraser4RAG addresses these gaps by transforming raw retrieved documents into privacy-safe versions before they reach the LLM. The pipeline consists of several key components:

Knowledge Graph Representation

Instead of treating text as a simple sequence of tokens, Eraser4RAG extracts entity-relation triples $[h, r, t]$. These triples are merged into a global Knowledge Graph (KG) representing all retrieved documents. This global view allows the system to map out connections across the entire document set and identify potential inference paths that could lead to de-anonymization.

Overview of the Eraser4RAG architecture within a RAG pipeline.

Two-Stage Training

  1. Supervised Fine-Tuning (SFT): High-quality training data is generated using GPT-4o, which rewrites documents to remove or generalize private triples while preserving public ones. A smaller, more efficient model (Flan-T5) is then fine-tuned on this data.
  2. Reinforcement Learning (PPO): To further refine the model, Proximal Policy Optimization (PPO) is used. The reward function is designed to balance two competing objectives: minimizing the retention of private triples ($r_{pri}$) and maximizing the retention of public triples ($r_{pub}$).

Evaluation and Results

The framework was evaluated on four QA benchmarks (PopQA, TriviaQA, Natural Questions, and HotpotQA) modified for privacy scenarios, along with NewsQA for domain transfer testing.

  • Superior Privacy Protection: Eraser4RAG achieved a lower private information retention rate than GPT-4o across all datasets, with an average reduction of 21.8% over strong baselines.
  • Maintained Utility: On the TriviaQA dataset, the model achieved the highest public information retention rate (0.4441), ensuring the LLM still had the facts needed to answer queries accurately.
  • Operational Efficiency: By utilizing a fine-tuned Flan-T5 model, Eraser4RAG is significantly faster than frontier models, processing documents in 0.8s compared to approximately 1.8s for GPT-4o.
  • Robustness against De-anonymization: In tests specifically measuring the ability to reconnect private pairs, Eraser4RAG consistently showed the lowest "privacy connection ratio," effectively breaking the reasoning chains used in multi-document attacks.

Conclusion

Eraser4RAG demonstrates that privacy in RAG systems is best managed at the "knowledge level" rather than the "word level." By leveraging global knowledge graphs and a specialized RL-tuned rewriter, the system provides a robust defense against complex de-anonymization attacks without sacrificing the utility of the retrieved data. Future work will focus on handling unstructured privacy leaks that do not fit neatly into triples and developing more adaptive strategies for dynamic user privacy levels.

Summary updated

BibTeX
@misc{wang2025learning,
  author = {Yujing Wang and Hainan Zhang and Liang Pang and Yongxin Tong and Binghui Guo and Hongwei Zheng and Zhiming Zheng},
  title = {{Learning to Erase Private Knowledge from Multi-Documents for Retrieval-Augmented Large Language Models}},
  year = {2025},
  eprint = {2504.09910},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.09910},
}
Figure