arXiv:2610.22297cs.AIOct 2026

Manuscript Offprint

arXiv:2610.22297

Private Retrieval Augmented Generation via Random Projection

Dixi Yao, Tahseen Rabbani, Tian Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Retrieval-Augmented Generation (RAG) enhances the capabilities of large language models (LLMs) by querying external structured knowledge. However, it can also introduce privacy risks by leaking sensitive information from the retrieval datastore. We propose a simple method to preserve datastore privacy in RAG systems via random projection. By applying the same projection to both datastore embeddings and query embeddings, our method provably preserves semantic similarity between queries and retrieved items while substantially mitigating data extraction attacks. Across multiple RAG architectures and datasets, we show that this lightweight approach achieves superior retrieval and generation performance compared to prior methods which leverage formal differential privacy (DP) guarantees, while exhibiting comparable empirical privacy under strong attack models. Our results for the first time suggest that random projection can serve as a competitive and practical baseline for privacy-preserving RAG systems.

1 Introduction

Retrieval-Augmented Generation (RAG) [1, 2] enhances large language models (LLMs) by incorporating information retrieved from external knowledge. However, recent studies show that carefully crafted prompts [3, 4, 5, 6] can extract sensitive information such as personal identity information from the external datastore.

Since attack queries can closely resemble legitimate user queries, simple access control may block ordinary users [3, 4]. Recent work has begun to explore privacy risks in RAG, with a leading focus on differential privacy (DP) [6, 7]. Although DP methods provide formal statistical guarantees, they often degrade output quality (e.g., leading to high perplexity) due to DP's fundamental properties of worst-case guarantees, and are usually complicated to implement in practice. To this end, we propose private RAG via random projection to defend against data extraction attacks.

Our key idea is that differential privacy guarantees may be an overkill to prevent state-of-the-art attacks practically, whereas (some specific) random projection matrices naturally preserve pairwise similarities of the inputs in the lower-dimensional space. The extra randomness alters datastore embeddings so attackers may not recover the original text. This enables users to obtain accurate answers from the RAG system while adversaries fail. We apply a single projection step to datastore embeddings in the offline stage and the same matrix to user queries in the online stage.

In this work, we consider two RAG architectures: ‘KNN-LM’ [1] and ‘Standard RAG’ [2] 2^{2}. In KNN-LM, the system linearly combines the outputs of the language model and the k-nearest neighbour outputs (usually organized as a softmax over cosine similarities between queries and the datastore embeddings), and generates next token. In Standard RAG, the system concatenates retrieved texts with the query and feeds them to the LLM. In this work, we focus on the settings where formal privacy guarantees are not desired, and thus evaluate privacy leakage by exploring the success rates of strong, existing attacks empirically.

∗^{*}Correspondence to: Dixi Yao dixi@uchicago.edu

2^{2}We note that there exist various RAG architectures, and we use the naming ‘Standard RAG’ just to contrast with the less popular KNN-LM architecture.

A PREPRINT

In Section 4, we empirically show that enforcing differential privacy guarantees may not provide better practical protection against data extraction and can instead harm utility. In summary, our RP technique significantly improves utility (over 50% on average across datasets) over the baseline methods without degrading empirical privacy performance.

References (37)