让大模型问答更私密:用关键词压缩保护敏感数据
Differentially Private Retrieval-Augmented Generation
- 先用关键词提取压缩检索内容,再私密生成答案
- 在保持回答准确率的同时,有效防止隐私泄露
- 适合医疗、法律等敏感领域使用
检索增强生成(RAG)通过从数据库中检索相关文档来减少大语言模型在特定任务中的幻觉。然而,当数据库包含医疗记录或法律文件等敏感信息时,RAG可能通过输出暴露隐私。已有研究证明,可通过对抗性提示迫使模型复述检索内容。本文提出一种基于差分隐私(DP)的新型RAG算法DP-KSA,采用“提议-测试-发布”范式。核心思路是多数问答只需少数关键词即可满足。DP-KSA首先获取一组相关上下文,分别生成响应;然后以差分隐私方式统计最频繁出现的关键词;最后将这些关键词加入最终提示生成答案。该方法有效压缩语义空间,同时保障隐私与实用性。理论证明,DP-KSA对RAG数据库提供形式化差分隐私保证。我们在两个QA基准上使用三款指令微调的大模型进行评估,结果表明,DP-KSA实现了良好的隐私-效用权衡。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) is a widely used framework for reducing hallucinations in large language models (LLMs) on domain-specific tasks by retrieving relevant documents from a database to support accurate responses. However, when the database contains sensitive corpora, such as medical records or legal documents, RAG poses serious privacy risks by potentially exposing private information through its outputs. Prior work has demonstrated that one can practically craft adversarial prompts that force an LLM to regurgitate the augmented contexts. A promising direction is to integrate differential privacy (DP), a privacy notion that offers strong formal guarantees, into RAG systems. However, naively applying DP mechanisms into existing systems often leads to significant utility degradation. Particularly for RAG systems, DP can reduce the usefulness of the augmented contexts leading to increase risk of hallucination from the LLMs. Motivated by these challenges, we present DP-KSA, a novel privacy-preserving RAG algorithm that integrates DP using the propose-test-release paradigm. DP-KSA follows from a key observation that most question-answering (QA) queries can be sufficiently answered with a few keywords. Hence, DP-KSA first obtains an ensemble of relevant contexts, each of which will be used to generate a response from an LLM. We utilize these responses to obtain the most frequent keywords in a differentially private manner. Lastly, the keywords are augmented into the prompt for the final output. This approach effectively compresses the semantic space while preserving both utility and privacy. We formally show that DP-KSA provides formal DP guarantees on the generated output with respect to the RAG database. We evaluate DP-KSA on two QA benchmarks using three instruction-tuned LLMs, and our empirical results demonstrate that DP-KSA achieves a strong privacy-utility tradeoff.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。