Abstract
Shenglai Zeng, Jiankun Zhang, Pengfei He, Jie Ren, Tianqi Zheng, Hanqing Lu, Han Xu, Hui Liu, Yue Xing, Jiliang Tang. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing.
2025.
Retrieval-Augmented Generation (RAG) is a powerful tool for grounding Large Language Models (LLMs), but it introduces significant privacy risks when retrieved documents contain sensitive information. This paper presents SAGE (Synthetic Attribute-based Generation with agEnt-based refinement), a framework designed to replace private retrieval databases with "pure" synthetic versions. SAGE preserves the original data's utility while reducing the success rate of data extraction attacks to nearly zero.
Introduction
RAG systems enhance LLM performance by fetching relevant documents from external databases. However, if these databases contain private emails, medical records, or personally identifiable information (PII), the system becomes vulnerable to "extraction attacks." In such attacks, malicious prompts are used to trick the LLM into leaking source text. Traditional mitigation strategies, such as simple anonymization or retrieval thresholds, often fail because sensitive information can still be inferred from context. SAGE addresses this "privacy-utility trade-off" by decoupling the knowledge in the database from its original verbatim phrasing.
The SAGE Framework
The SAGE pipeline consists of two primary stages designed to create a safe surrogate dataset for RAG.
Stage 1: Attribute-based Generation
Rather than paraphrasing documents, SAGE uses an LLM to identify "essential attributes" of the data. For instance, in a medical context, attributes might include "symptoms," "medical history," and "doctor's advice." SAGE extracts these key points and then employs a different LLM to generate a brand-new document based only on those points. This process breaks the verbatim link to the original text while maintaining the underlying knowledge.
Stage 2: Agent-based Iterative Refinement
Even synthetic data can inadvertently leak PII or contain "linkage risks"—details that could identify an individual when combined. SAGE employs a "Privacy Agent" and a "Rewriting Agent" in a feedback loop. The Privacy Agent inspects synthetic outputs for risks and provides feedback to the Rewriting Agent to scrub the data. This iterative process continues until the Privacy Agent classifies the data as "safe."
Experimental Evaluation
The researchers evaluated SAGE using several benchmarks:
- HealthcareMagic: 200,000 doctor-patient dialogues representing high-stakes sensitive data.
- Wiki-PII: A custom dataset where public Wikitext-103 was "poisoned" with real PII from the Enron Mail dataset.
- ODQA Benchmarks: Standard Open-Domain Question Answering sets (Natural Questions, TriviaQA, WebQuestions) to ensure general utility.
Key Results
SAGE demonstrates a superior balance between privacy and utility compared to traditional methods.
Privacy Protection
In targeted attacks on the Wiki-PII dataset, the number of successful leaks dropped from 167 (using original data) to zero using SAGE. The iterative refinement in Stage 2 is critical for this result; while Stage 1 reduces leakage, only the agent-based feedback loop consistently eliminates it across different retrieval settings.
Utility Preservation
Surprisingly, synthetic data can outperform original data in RAG tasks. On the HealthcareMagic dataset, SAGE achieved a ROUGE-L score of 0.0943, surpassing the 0.0789 score obtained with raw data. This is attributed to the "purity" of synthetic data, which strips away conversational noise and focuses on the facts necessary for answering queries.
Conclusion
SAGE provides a practical, cost-effective solution for securing RAG systems. By transforming private data into a pure synthetic surrogate, it mitigates the risk of verbatim extraction attacks without sacrificing performance. Future work will explore extending this attribute-to-synthetic pipeline to multi-modal data and specialized domains requiring deep expertise.
Summary updated