Confusionprompt: Practical Private Inference for Online Large Language Models

Peihua Mai, Youjia Yang, Yan Ran, Rui Ye, Yan Pang

Large Language Models (LLMs) are increasingly powerful, but using them via cloud services raises significant privacy concerns. How can we leverage these powerful tools without exposing sensitive personal information? This paper introduces ConfusionPrompt, a novel framework designed to protect user privacy during LLM inference, offering a compelling alternative to existing methods.

TL;DR

ConfusionPrompt enables private inference with online LLMs by generating a mix of genuine and "confusing" pseudo-prompts. This client-side approach seamlessly integrates with existing black-box LLMs, offering a superior privacy-utility trade-off compared to perturbation-based methods and significantly reducing memory consumption compared to local LLM inference.

What Problem Does This Paper Address?

The widespread adoption of LLMs through cloud-based services presents a critical privacy challenge. Users often input sensitive information into prompts, which are then processed by external servers. Existing solutions like encryption-based methods (e.g., homomorphic encryption) are computationally expensive and impractical for LLMs, while perturbation-based methods (e.g., adding noise) often degrade the utility of the LLM's responses. Furthermore, many existing approaches require modifications to the LLM service provider's infrastructure or access to proprietary model parameters, hindering their adoption. This paper aims to bridge this gap by providing a practical, client-side solution that protects user privacy without compromising LLM performance or requiring changes to the LLM service itself.

Methods

ConfusionPrompt introduces a novel "confusion strategy" that involves several key steps executed on the client-side:

  1. Decomposition: The original user prompt is broken down into smaller "sub-prompts." This decomposition aims to distribute private information across these sub-prompts, reducing the complexity of protecting each individual piece of information.
  2. Pseudo-Prompt Generation: For each genuine sub-prompt, a generator creates multiple "pseudo-prompts." These pseudo-prompts are designed to be semantically irrelevant to the original prompt's sensitive attributes while maintaining syntactic similarity and linguistic realism. This "confusion" makes it difficult for the server to distinguish the genuine prompt from the fakes.
  3. Prompt Grouping and Transmission: The genuine sub-prompts are mixed with the generated pseudo-prompts to form a "prompt group." This group is then sent to the online LLM.
  4. Response Retrieval and Recomposition: The LLM processes the entire prompt group and returns responses for each. The client then isolates the responses corresponding to the genuine sub-prompts and recomposes them into a final, accurate response.

A core contribution is the development of a (λ, μ, ρ)-privacy model to formally define the requirements for a prompt group to ensure privacy. Here:

  • λ (Similarity): Controls how semantically irrelevant pseudo-prompts are to genuine ones.
  • μ (Significance): Bounds the attacker's ability to infer target attributes, influenced by the number of pseudo-prompts.
  • ρ (Genuineness): Ensures pseudo-prompts are linguistically realistic and not easily identifiable as fake.

The paper also introduces a decomposition strategy that significantly reduces the number of pseudo-prompts required compared to a non-decomposed approach, making the process more efficient.

Datasets

The paper evaluates ConfusionPrompt on three standard datasets:

  • StrategyQA: A question-answering benchmark requiring multi-hop reasoning.
  • MuSiQue: Another multi-hop question-answering dataset.
  • MMLU (Massive Multitask Language Understanding): A broad benchmark covering diverse subjects.

The authors also detail a process for constructing private attributes from these datasets, involving semi-automated entity extraction and LLM finetuning.

Key Insights and Ideas

  • Decomposition is Key: Breaking down complex prompts into smaller sub-prompts is crucial for managing the complexity of privacy protection and significantly reduces the number of required pseudo-prompts.
  • The Power of Confusion: Instead of trying to hide information entirely (which often degrades utility), ConfusionPrompt strategically injects "noise" in the form of realistic-looking but irrelevant pseudo-prompts to obfuscate the genuine query.
  • Client-Side Control: The entire privacy-preserving mechanism is implemented on the user's device, giving users full control over their sensitive data and allowing for customization of privacy parameters.
  • Seamless Integration: The framework is designed to work with existing black-box LLMs without requiring any modifications to the service provider's infrastructure, making it highly practical.

Key Results

  • Privacy Protection: Experiments demonstrate that ConfusionPrompt effectively hinders prompt identification attacks. As significance (μ) decreases and genuineness (ρ) increases, attack accuracy approaches random guessing.
  • Utility: ConfusionPrompt consistently outperforms LDP-based methods in terms of utility (e.g., accuracy, F1 score) by an average of 42% on StrategyQA, 22x on MuSiQue, and 69% on MMLU. It also achieves comparable or better utility than local LLM inference.
  • Efficiency: The decomposition strategy significantly reduces query costs, offering savings of 3.3x to 18.2x compared to a non-decomposed approach.
  • Memory Savings: ConfusionPrompt requires significantly less memory (e.g., 21.8% to 41.8% of local open-source LLMs) for user-side models, making it more accessible.

Limitations and Future Work

  • Query Cost: While decomposition improves efficiency, the query cost still scales linearly with the significance requirement (1/μ). Future work could explore sub-linear dependence on 1/μ.
  • Attacker Sophistication: The current privacy model assumes attackers have prior knowledge of certain attributes. More advanced attackers, potentially using LLMs as discriminators or incorporating domain knowledge, could pose a greater challenge. Future work could involve developing stronger attackers to test the framework's robustness.
  • Privacy Model Enhancements: The authors suggest exploring alternative privacy models, such as analyzing the distribution of sensitive attributes conditioned on non-sensitive components, to better approximate the ground-truth distribution.
  • Pseudo-Prompt Generation: While the local generator is efficient, for more demanding scenarios, leveraging powerful online LLMs for pseudo-prompt generation is recommended, with careful consideration to avoid revealing sensitive information.

Summary updated

BibTeX
@misc{mai2023confusionprompt,
  author = {Peihua Mai and Youjia Yang and Yan Ran and Rui Ye and Yan Pang},
  title = {{Confusionprompt: Practical Private Inference for Online Large Language Models}},
  year = {2023},
  eprint = {2401.00870},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.00870},
}
Figure