Improving User Privacy in Personalized Generation: Client-Side Retrieval-Augmented Modification of Server-Side Generated Speculations

Alireza Salemi, Hamed ZamaniarXiv 2026

TL;DR

The paper introduces $P^3$, a privacy-preserving framework for personalized text generation that eliminates the need to share sensitive user profiles with cloud-based LLMs. By inverting the concept of speculative decoding, a powerful server-side model generates draft responses based only on the user's query, while a lightweight client-side model refines and corrects these drafts using local private data. $P^3$ achieves up to 95.7% of the performance of a fully exposed "leaky" system while introducing negligible privacy leakage compared to a standard non-personalized query.

What Problem Does This Paper Address?

Personalizing Large Language Models (LLMs) to align with individual user preferences and histories typically relies on Retrieval-Augmented Generation (RAG). However, this creates a harsh dichotomy: users must either upload their private data (such as search history, financial records, or emails) to a cloud provider's server, or rely entirely on smaller, less capable models running locally on edge devices.

Existing privacy-preserving methods like text obfuscation are vulnerable to inversion attacks, and homomorphic encryption remains computationally impractical for LLMs. The authors tackle this challenge by asking: How can we leverage the high-quality generation of large cloud models without ever exposing private user context to the server?

Methods

The authors propose $P^3$ (Personalized Privacy Preserving framework), which splits the generation process into an interactive loop between a large server-side LLM and a small client-side LLM:

  1. Local Retrieval & PII Filtering: The client device retrieves relevant documents from the user's local profile to form a query-specific context and strips out Personally Identifiable Information (PII) using regex-based filtering.
  2. Server Speculation: The server-side LLM receives only the user's query (no personal context) and generates a sequence of $k$ draft tokens.
  3. Client Verification & Correction: The client-side LLM evaluates the draft tokens one by one, calculating their probabilities conditioned on the private local context. If a draft token's relative probability falls below a predefined rejection threshold ($\tau$), it is rejected. The client model corrects it with a more appropriate token and discards the rest of the server's draft.
  4. Iterative Loop: The corrected token prefix is sent back to the server, which speculates the next $k$ tokens. This continues until an end-of-sequence (EOS) token is generated.

This flips traditional speculative decoding on its head: instead of a small model drafting and a large model verifying to save latency, $P^3$ uses the large model to draft general text and the small model to verify/edit to protect privacy.

Figure 1: An overview of the 𝑃3 framework.

Datasets

The framework was evaluated on the LaMP-QA benchmark, a standardized dataset for personalized long-form question answering. It contains three distinct datasets:

  • Art & Entertainment (767 questions)
  • Lifestyle & Personal Development (989 questions)
  • Society & Culture (1074 questions)

Key Insights and Ideas

  • The "Inverted" Speculative Decoding Paradigm: Using a large model to propose general text and a small model to act as a local "editor" is highly effective. The large model handles the heavy lifting of language fluency, while the small model injects user-specific context.
  • Controlled Deviation: Unlike standard speculative decoding, which aims to perfectly match the large model's token distribution, $P^3$ intentionally allows the small model to steer the output distribution toward personalized preferences.
  • Semantic Leakage from Queries: A surprising insight from their privacy analysis is that simply submitting a query alone already leaks a significant amount of user attributes (e.g., a 55% accuracy rate in attribute inference attacks). $P^3$ adds almost no extra leakage on top of this baseline.

Key Results

  • High Utility Retention: Across the LaMP-QA benchmark, $P^3$ consistently outperformed both non-personalized server baselines and fully private client-side baselines. It closed the "personalization gap," recovering 90.3% to 95.7% of the performance of an insecure "leaky" upper bound where the full profile is sent to the cloud.
  • Robust Privacy Protection: Evaluated against adversarial GPT-4-based attacks, $P^3$ demonstrated excellent privacy preservation. In a linkability attack (matching a response to 1 of 5 profiles), $P^3$ had a success rate of only 24% (close to the 22.5% query-only baseline). In an attribute inference attack, it only increased attacker accuracy by 3.5% over the query-only baseline, whereas the leaky baseline allowed 100% accuracy.
Figure 5: Effectiveness of privacy attacks on different methods (lower is better). (A) Linkability attack, in which the cloud LLM provider uses information collected during response generation to identify the true user profile among five candidates. (B) Attribute inference attack, in which the cloud LLM provider uses information collected during response generation to infer user attributes from five possible options per attribute. Experiments are conducted using the Qwen-2.5 family as the backbone models (3B as the client-side and 14B as the server-side LLM) for the evaluated methods and GPT-4.2 as the attacker model.
  • High Edge Efficiency: The client-side model only needs to generate 9.2% of the final tokens, keeping the computational and battery burden on the user's device remarkably low.

Limitations and Future Work

  • API Constraints: Current commercial LLM APIs (like OpenAI or Gemini) do not support token-level speculation, pausing, and resuming from intermediate states with custom token probabilities. Consequently, the authors had to evaluate $P^3$ using open-weights models (Qwen 2.5 and Gemma 3) hosted on their own hardware.
  • Latency Overhead: The interactive back-and-forth communication between the client and server for token rejections adds network and processing latency, which requires further optimization for real-time deployment.

Summary updated

BibTeX
@misc{salemi2026improving,
  author = {Alireza Salemi and Hamed Zamani},
  title = {{Improving User Privacy in Personalized Generation: Client-Side Retrieval-Augmented Modification of Server-Side Generated Speculations}},
  year = {2026},
  eprint = {2601.17569},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.17569},
}
Figure