SharedRequest: Privacy-Preserving Model-Agnostic Inference for Large Language Models

Peihua Mai, Xuanrong Gao, Youlong Ding, Xianglong Du, Wei Liu, Yan PangarXiv 2026

TL;DR

SharedRequest is a model-agnostic framework that protects user privacy during cloud-based LLM inference by batching semantically similar requests and mixing them with realistic, noisy variants. By exploiting the fact that sensitive data is usually sparse within a prompt, it achieves over 20% higher utility than standard differential privacy methods while slashing query costs by up to 5.6× through batch-level amortization.

What Problem Does This Paper Address?

When users interact with commercial cloud-based Large Language Models (LLMs) like ChatGPT or Claude, their prompts often contain sensitive personal, financial, or medical data. Protecting this information currently forces a brutal trade-off known as the privacy-utility-efficiency trilemma:

  • Cryptographic methods (like Secure Multi-Party Computation) offer strong security but introduce massive computational and communication overhead.
  • Local Differential Privacy (LDP) approaches perturb text at the client side, but this often destroys the semantic meaning of the prompt, severely degrading the quality of the LLM's response.

Furthermore, most existing solutions require modifying the underlying LLM architecture—something proprietary cloud providers are unwilling to do. The authors of this paper introduce SharedRequest, a framework designed to provide robust privacy guarantees without touching model parameters or sacrificing utility and efficiency.

Methods

SharedRequest shifts the privacy paradigm from individual prompt perturbation to batch-level amortization. Instead of treating every prompt in isolation, it leverages a three-party architecture consisting of Users, a third-party Noise Sampler, and the Service Provider (the LLM cloud).

  1. User Side (Deconstruction & Encryption): The user breaks a prompt down into a generic instruction (e.g., "Suggest travel activities for a family visiting...") and private attributes (e.g., "Vienna in fall"). The user selects alternative attributes ("Tokyo", "Monterey") and encrypts the true private data using the Service Provider's public key.
  2. Noise Sampler (Clustering & Filtering): This intermediate coordinator groups incoming requests that share the same generic instruction. To prevent the server from guessing the real prompt, the sampler mixes original prompts with fake variants. Crucially, it uses a pre-trained discriminator to filter out unrealistic attribute combinations, ensuring the injected "noise" looks completely genuine. It then applies a one-sided exponential mechanism to randomize query counts for differential privacy guarantees.
  3. Service Provider (Deduplication & Inference): The cloud provider decrypts the attributes and reconstructs the prompts. Because many prompts within the batch now share identical text, the provider deduplicates them, executing the expensive LLM inference only once per unique query group. Responses are masked using a pseudorandom generator (PRG) seed before being sent back, ensuring the Noise Sampler can never read the final output.
Figure 1: Overview of SharedRequest. The noise sampler groups user requests based on their generic instruction, samples noisy prompts with each group, and sends a shuffled mix to the server for inference. The inference costs related to noisy queries are amortized across users.

Datasets

The authors evaluated SharedRequest across three distinct, privacy-sensitive domains:

  • Legal-QA: Professional question-and-answer pairs covering real-world legal scenarios.
  • Medical-QA: Complex medical reasoning problems and clinical scenarios.
  • MMLU-Biz: Business, marketing, and economics questions extracted from the Massive Multitask Language Understanding benchmark.

Key Insights and Ideas

  • Sparsity of Secrets: The core realization is that sensitive information within a prompt is highly sparse. In the query "Provide career suggestions for a person working in cybersecurity," only the token "cybersecurity" needs protection. Rewriting or blurring the entire sentence is an unnecessary waste of model utility.
  • Hiding in the Crowd: Instead of fighting the massive scale of commercial LLM traffic, SharedRequest turns it into a privacy asset. By grouping thousands of concurrent users by their generic instructions, the overhead of generating protective "fake" queries is shared across the entire batch.
  • The Deduplication Loophole: Cloud providers naturally optimize their infrastructure by deduplicating identical queries. SharedRequest intentionally triggers this mechanism by forcing noisy variants to overlap, achieving privacy without causing a linear explosion in API billing costs.

Key Results

  • Near-Zero Utility Loss: When using raw prompts, SharedRequest achieved an identical utility score (within 1%) to a completely non-private baseline. An optional "simplified prompt" variant caused a minor 4.9% utility drop but significantly boosted processing speed.
  • Outperforming DP Baselines: Under a strict privacy budget ($\epsilon = 1$), SharedRequest consistently outperformed model-agnostic local differential privacy baselines (like RanText, CusText, and DP-Prompt), delivering up to 2.2× higher utility on the MMLU-Biz dataset.
  • Substantial Cost Reductions: Thanks to the shared-prompt deduplication mechanism, the framework reduced monetary query costs by up to 5.6× compared to non-batched private inference under concentrated request distributions.
Query cost reduction ratio under varying concentration parameters
  • Robustness Against Attacks: The authors simulated an adversarial server trying to distinguish real queries from fake ones using advanced discriminators (like Qwen2.5). SharedRequest's combination-filtering mechanism successfully kept the attack F1-score below 63%, compared to an 80% success rate against unfiltered random noise.

Limitations and Future Work

  • Assumption of Non-Collusion: The baseline protocol assumes that the third-party Noise Sampler and the Service Provider do not collude. To address this, the authors outline an extended multi-server "onion encryption" architecture, though it introduces additional system complexity.
  • User-Defined Privacy Attributes: Currently, the burden falls on the user to identify which parts of their prompt are sensitive and to provide alternative candidates. While this can be automated using local Named-Entity Recognition (NER) tools, it increases client-side engineering complexity.
  • API Billing Dependencies: The cost-saving mechanism assumes that the LLM provider's billing system respects internal query deduplication. For commercial APIs that strictly charge per-token regardless of duplication, the authors note that an additional non-colluding deduplicator component must be deployed.

Summary updated

BibTeX
@misc{mai2026sharedrequest,
  author = {Peihua Mai and Xuanrong Gao and Youlong Ding and Xianglong Du and Wei Liu and Yan Pang},
  title = {{SharedRequest: Privacy-Preserving Model-Agnostic Inference for Large Language Models}},
  year = {2026},
  eprint = {2606.05004},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.05004},
}
Figure