[论文解读] Differentially Private Decoding in Large Language Models
本文提出了一种针对大语言模型(LLMs)的差分隐私解码机制,该机制在推理时直接对模型输出的概率分布添加噪声,而无需微调。该方法实现了隐私-效用权衡,在强隐私保证下(例如 ε ≤ 65)效用仅轻微下降,使得私有 LLM 可在生产环境中实际部署。
Recent large-scale natural language processing (NLP) systems use a pre-trained Large Language Model (LLM) on massive and diverse corpora as a headstart. In practice, the pre-trained model is adapted to a wide array of tasks via fine-tuning on task-specific datasets. LLMs, while effective, have been shown to memorize instances of training data thereby potentially revealing private information processed during pre-training. The potential leakage might further propagate to the downstream tasks for which LLMs are fine-tuned. On the other hand, privacy-preserving algorithms usually involve retraining from scratch, which is prohibitively expensive for LLMs. In this work, we propose a simple, easy to interpret, and computationally lightweight perturbation mechanism to be applied to an already trained model at the decoding stage. Our perturbation mechanism is model-agnostic and can be used in conjunction with any LLM. We provide theoretical analysis showing that the proposed mechanism is differentially private, and experimental results showing a privacy-utility trade-off.
研究动机与目标
- 解决预训练 LLM 中的记忆化风险,防止私人训练数据泄露。
- 为已训练好的 LLM 提供一种实用的隐私解决方案,避免昂贵的微调过程。
- 设计一种计算高效的后处理扰动机制,适用于推理时应用。
- 从理论和实证两方面验证该方法的差分隐私保障及其效用权衡。
- 实现商业应用中处理敏感数据的 LLM 隐私保护部署。
提出的方法
- 在推理过程中,对预训练 LLM 的 softmax 输出分布应用扰动机制,向概率分布添加噪声。
- 噪声从尺度为 λ 的拉普拉斯分布中抽取,其中 λ 控制隐私-效用权衡。
- 该方法利用差分隐私的后处理性质,确保即使在下游微调后,隐私保障依然成立。
- 理论分析证明该机制满足 ε-差分隐私,其中 ε 受 λ·T/|V| 有界,T 为平均掩码标记数,|V| 为词汇表大小。
- 该方法与模型无关,可应用于任何 LLM,无需修改其架构或权重。
- 使用困惑度作为效用度量,评估不同隐私水平(ε)下的性能退化情况。
实验结果
研究问题
- RQ1轻量级、后处理的扰动机制能否为已训练好的 LLM 提供强差分隐私保障?
- RQ2在该解码时扰动方法中,隐私(ε)与模型效用(困惑度)之间的权衡如何?
- RQ3该方法在不同隐私预算(λ)和模型配置下的表现如何?
- RQ4该方法能否在不进行微调或架构修改的情况下保持隐私?
- RQ5当 LLM 被微调用于下游任务时,该扰动机制是否仍有效?
主要发现
- 实验中该方法实现了 ε ≤ 65,对应合理的隐私保障且效用损失极小。
- 当 ε ≤ 60(λ ≤ 0.7)时,困惑度相比非私有模型增加超过 40%,表明性能显著下降。
- 当 ε ≤ 50(λ ≤ 0.2)时,困惑度超过 20,相对增加达 350%,导致模型无法使用。
- 当 ε ≥ 65 时,性能退化可忽略不计,表明强隐私可实现且对效用影响极小。
- 隐私损失 ε 与预测标记数 T 呈线性关系,与词汇表大小 |V| 呈反比关系,凸显了减小支持集大小对获得更紧隐私界的重要性。
- 由于差分隐私的后处理性质,即使在 LLM 经过下游微调后,该方法依然有效。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。