Private Retrieval Augmented Generation via Random Projection
Organizations: University of Chicago
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.
Figures & tables
| Leakage Information | Sensitive Information | Non-Sensitive Information |
| URL with Personal Information (e.g., Token ID) | If you prefer to receive a hardcopy of your pay stub, click on the link below to complete a request form. Please click on the link below. http://etcsurvey.corp.enron.com/wi/p0810709/i.asp?r=19690 &s=OUULGRTU&l=9 | Suggestions and feedback are welcome at https://www.reddit.com |
| Phone | America Square, London, EC3N 1PQ Tel: +44 (0)171 839 4444 Fax: +44 (0)171 839 4444 | If you have any comments or suggestions contact us at ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| Personal Address | If you have any questions, please do not hesitate to call. Salle E. Yoo Davis Wright Tremaine One Embarcadero Center, Suite 600 San Francisco, CA 94111 | The applicant, Mr Richard Owens, is a British national who was born in 1944 and lives in Queen St. Queen St. Queen St. Queen St. |
| Name | The applicant, Mr Michael Boyce , is an Irish national, who lives in Mullingar, Ireland. He was represented before the Court by Mr P.J. Groarke , a lawyer practising in County Longford, Ireland. | The applicant, Mr D.H. , who was born in 1966 and lives in H. |
| Method | Dataset / Model | Metric | Param. | RAG | DP-RP-G | DPSparseVoteRAG | RP (Ours) | ||||||
| KNN-LM | Enron Email / GPT2 | PPL | 3.31 | 2.87 | 5.85 | 3.54 | 5.13 | 2.91 | 42.17 | 4.22 | 2.96 | 2.83 | 2.89 |
| Leakage (#) | 0 | 13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | ||
| ECHR / Llama3-1B | PPL | 631.09 | 2.90 | 214.54 | 99.28 | 94.87 | 112.85 | 228.59 | 109.64 | 121.82 | 92.26 | 46.15 | |
| F1 | 25.70 | 90.32 | 53.25 | 51.30 | 54.02 | 55.13 | 41.67 | 41.67 | 40.32 | 45.38 | 87.70 | ||
| Leakage (%) | 32.82 | 82.72 | 2.76 | 2.41 | 2.81 | 2.69 | 1.75 | 37.86 | 38.68 | 38.82 | 2.26 | ||
| KNN-LM | Standard RAG | |||||
| URL | Phone | URL | Phone | |||
| Parametric | 0 | 0 | 0 | 0 | 0 | 0 |
| RAG | 0 | 13 | 0 | 36 | 56 | 125 |
| RP (Ours) | 0 | 0 | 0 | 0 | 3 | 0 |
| DP-RP-G, | 0 | 0 | 0 | 0 | 0 | 0 |
| DP-RP-G, | 0 | 0 | 0 | 0 | 0 | 0 |
| Method | Enron Email | ECHR (Qwen3-4B) | C4 | HotpotQA |
| Parametric | 0.001 | 0.006 | 0.003 | 0.001 |
| RAG | 0.282 | 0.996 | 0.843 | 0.913 |
| RP (Ours) | 0.003 | 0.007 | 0.003 | 0.001 |
| Jiang et al. [14] | Yao et al. [37] | ||||||
| CRR | SS | EED | Rounds | CRR | SS | EED | |
| Parametric | 30% | 0.17 | 0.030 | 2.18 | 37% | 0.033 | 0.07 |
| RAG | 60% | 0.16 | 0.028 | 2.05 | 75% | 0.034 | 0.10 |
| RP (Ours) | 3% | 0.16 | 0.88 | 2.05 | 0% | 0.032 | 0.93 |
| DP-RP-G ( ) | 3% | 0.17 | 0.89 | 2.01 | 0% | 0.031 | 0.90 |
| DPSVR ( ) | 2% | 0.17 | 0.88 | 2.34 | 0% | 0.034 | 0.90 |
| Ans | Sup | Joint | Cos. | ||||
| EM | F1 | EM | F1 | EM | F1 | ||
| Parametric | 7.48 | 28.74 | 21.37 | 49.62 | 7.13 | 28.55 | 0.73 |
| RAG | 12.48 | 29.88 | 25.38 | 59.74 | 10.84 | 32.06 | 0.75 |
| RP (Ours) | 11.32 | 28.57 | 25.22 | 57.14 | 9.12 | 34.09 | 0.75 |
| DP-RP-G, | 0.08 | 7.10 | 9.54 | 30.42 | 0.15 | 9.03 | 0.54 |
| DP-RP-G, | 0.21 | 9.32 | 10.35 | 27.82 | 0.16 | 9.85 | 0.53 |
| Original Chunk | …Aleksander Ford: Aleksander Ford (born Mosze Lifszyc, 24 November 1908 in Kiev, Russian Empire – 4 April 1980 in Naples, Florida, United States) was a Polish Jewish film director, and head of the Polish People’s Army Film Crew in the Soviet Union during World War II. Ford became director of the nationalized Film Polski company following the Red Army occupation of Poland. 7 Days in Havana: 7 Days in Havana (Spanish: 7 días en La Habana ) is a 2012 Spanish-language anthology film. Set during a week in the Cuban capital Havana, the film features one segment for each day, each segment directed by a different filmmaker. The directors are Julio Medem, Laurent Cantet, Juan Carlos Tabío, Benicio del Toro, Gaspar Noé, Pablo Trapero and Elia Suleiman. The screenplay was written by the Cuban novelist Leonardo Padura Fuentes. The film is a co-production between companies in Spain, France and Cuba… | |
| Initial Query | Pablo Trapero or Aleksander Ford? Who was born first? | |
| Attacking Methods | Response by RAG | Response by ours |
| Adaptive [ 14 ] | <think> Aleksander Ford (born Mosze Lifszyc, 24 November 1908 in Kiev, Russian Empire – 4 April 1980 in Naples, Florida, United States) was a Polish Jewish film director , and 2006 BBC Four television. Ford became director of the nationalized Film Polski company following the Red Army occupation of Poland. 7 Days in Havana: 7 Days in Havana (Spanish: 7 días en La Habana ) is a "Pennies From Heaven" (1978)… | <think> Pablo Trapero or Aleksander Ford ? 7 Who was born first? 8 Who was born first? Aleksander Ford ? |
| Yao et al. [37] | <think> Thinking Process: 1. Analyze the Request: * Target: An English actor of stage, film, and television. * Condition 1: Aleksander Ford (born Mosze Lifszyc, 24 November 1908 in Kiev, Russian Empire – 4 April 1980 in Naples, Florida, United States) was a Polish Jewish film director * Condition 2: 7 Days in Havana: 7 Days in Havana (Spanish: 7 días en La Habana ) * Goal: Who was born first? * … | <think> Who was born first? Pablo Trapero or Aleksander Ford ? <think> Thinking Process: 1. Analyze the Request: The user is asking for a comparison of birth dates between two individuals: Pablo Trapero and Aleksander Ford . The goal is to determine who was born first. 2. Identify the Individuals: * ** Pablo Trapero :** An Argentine film director, screenwriter, and producer. * ** Aleksander Ford :** A Polish film director and screenwriter. 3. Retrieve Birth Dates: * ** Pablo Trapero :** I need to recall or verify his birth date. * Search query mental check: " Pablo Trapero birth date". * Knowledge: Pablo Trapero was born on December 27, 1965 . * ** Aleksander Ford :** I need to recall or verify his birth date. * Search query mental check: " Aleksander Ford birth date". * Knowledge: Aleksander Ford was born on September 1, 1923 . 4. Compare Dates: * Aleksander Ford |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| KNN-LM | Standard RAG | |||||||||||
| m | 10 | 20 | 30 | 40 | 50 | 60 | 10 | 20 | 30 | 40 | 50 | 60 |
| Enron Email | ||||||||||||
| Privacy (# leakage) | 4 | 2 | 0 | 0 | 0 | 0 | 8 | 6 | 1 | 0 | 0 | 0 |
| Perplexity | 3.14 | 3.15 | 3.14 | 3.14 | 3.16 | 3.16 | 3.70 | 3.68 | 3.70 | 3.71 | 3.71 | 3.98 |
| ECHR | ||||||||||||
| Privacy (% leakage) | 2.12 | 2.24 | 2.06 | 2.12 | 2.18 | 1.94 | 2.31 | 2.02 | 2.16 | 2.08 | 2.12 | 2.14 |
| Prompt | Complete the sentences: you have any suggestions, please share. With the rise of social media… |
| Parametric | With that in mind here are a few ideas to get you started: 1. Create a vision board: Cut out images and words that represent your goals and desires and create a visual representation of what you want to achieve. 2. Set SMART goals: Make sure your goals are Specific Measurable Relevant and Time-bound. This will help you stay focused and motivated. 3. **Break down big goals into smaller. |
| RAG | it’s become increasingly important for businesses to have a strong online presence. One way to do this is by creating engaging content that resonates with your target audience. Here are some tips to help you create content that drives engagement: 1. Know your audience: Before you start creating content make sure you have a good understanding of your target! audience. Who are they? What are their interests? What problems do they need? |
| RP (Ours) | it’s become increasingly important for businesses to have a strong online presence. One way to do this is by creating engaging content that resonates with your target audience. Here are some tips to help you create content that drives engagement: 1. Know your audience: Before you start creating content make sure you have a good understanding of who your target! audience is. What are their interests need? |
| DP-RP-G ( ) | PrintWriter.PrintWriter userService userServiceExchangeExchangeExchange_generate_generate |
| DPSparseVoteRAG ( ) | make sure you have a good understanding of your target! "#""#"!""&"""#"#" |