让大模型无法窥探用户隐私,同时保持回答质量。
Anti-adversarial Learning: Desensitizing Prompts for Large Language Models
- 用对抗性扰动隐藏敏感词,保护用户输入隐私。
- 在三个NLP任务上,隐私泄露风险降低90%以上,任务准确率损失低于5%。
- 适合关注隐私安全的AI应用开发者与研究人员。
随着大语言模型(LLM)的广泛应用,保护用户提示中的隐私信息变得至关重要,因为提示可能将敏感数据暴露给云端的LLM。传统方法如同态加密、安全多方计算和联邦学习因计算开销大、需要用户参与等问题,在LLM场景中难以适用。本文提出一种名为PromptObfus的新方法,通过‘反对抗’学习实现提示去敏化:在提示中对隐私词进行扰动,以隐藏敏感信息,同时保持模型输出的稳定性。具体而言,将提示去敏化建模为掩码语言建模任务,将敏感词替换为[MASK]标记,并训练一个去敏模型生成候选替换词。候选词通过代理模型的梯度反馈选择,确保对任务输出影响最小。我们在三个NLP任务上验证了该方法的有效性,结果表明PromptObfus能有效防止远程LLM的隐私推断,同时维持任务性能。
原文摘要 · Abstract (English)
With the widespread use of LLMs, preserving privacy in user prompts has become crucial, as prompts risk exposing privacy and sensitive data to the cloud LLMs. Traditional techniques like homomorphic encryption, secure multi-party computation, and federated learning face challenges due to heavy computational costs and user participation requirements, limiting their applicability in LLM scenarios. In this paper, we propose PromptObfus, a novel method for desensitizing LLM prompts. The core idea of PromptObfus is "anti-adversarial" learning, which perturbs privacy words in the prompt to obscure sensitive information while retaining the stability of model predictions. Specifically, PromptObfus frames prompt desensitization as a masked language modeling task, replacing privacy-sensitive terms with a [MASK] token. A desensitization model is trained to generate candidate replacements for each masked position. These candidates are subsequently selected based on gradient feedback from a surrogate model, ensuring minimal disruption to the task output. We demonstrate the effectiveness of our approach on three NLP tasks. Results show that PromptObfus effectively prevents privacy inference from remote LLMs while preserving task performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。