Efficient Differentially Private Fine-Tuning of LLMs via Reinforcement Learning
本文提出了一种名为RLDP的框架,通过强化学习动态地调整语言模型微调中的隐私参数,实现了在保证隐私的同时提高模型性能。
更新于 2025-08-01。作者:Afshin Khadangi、Amir Sartipi、Igor Tchappi、Ramin Bahmani、Gilbert Fridgen。
中文摘要
数据隐私与模型效用之间的张力已成为在大规模语言模型(LLMs)中部署的瓶颈,这些模型在敏感语料库(包括医疗保健)上进行了训练。差分隐私随机梯度下降(DP-SGD)保证了正式的隐私,但代价是明显的:梯度被强制截断并添加噪声,降低了样本效率和最终精度。已经提出了许多变体来缓解这种权衡,但它们都存在一个劣势:它们的控制参数是硬编码的、全局的,并且对不断演变的优化景观视而不见。因此,从业者被迫要么在追求效用时过度花费隐私预算,要么为了保持在隐私约束内而接受平庸的模型。我们提出了RLDP,这是第一个将DP优化本身视为适用于现代深度强化学习(RL)的闭环控制问题的框架。RLDP持续感知学习动态的丰富统计数据,并通过选择精细的逐参数梯度截断阈值以及注入的高斯噪声的大小来采取行动。在语言模型微调期间,在线训练一个软演员-评论员(SAC)超策略;它从头开始学习如何在需要的地方以及在需要的时候分配隐私预算。在GPT2-small、Llama-1B、Llama-3B和Mistral-7B上进行的超过1,600次消融实验中,RLDP实现了1.3-30.5%(平均5.4%)的困惑度降低和平均5.6%的下游效用提升。RLDP只需13-43%的梯度更新预算就能达到每个基线的最终效用(平均加速71%),同时遵守相同的(epsilon,delta)-DP契约,并且对成员推断和金丝雀提取攻击的敏感性相等或更低。
英文摘要
The tension between data privacy and model utility has become the defining bottleneck for the practical deployment of large language models (LLMs) trained on sensitive corpora including healthcare. Differentially private stochastic gradient descent (DP-SGD) guarantees formal privacy, yet it does so at a pronounced cost: gradients are forcibly clipped and perturbed with noise, degrading sample efficiency and final accuracy. Numerous variants have been proposed to soften this trade-off, but they all share a handicap: their control knobs are hard-coded, global, and oblivious to the evolving optimization landscape. Consequently, practitioners are forced either to over-spend privacy budget in pursuit of utility, or to accept mediocre models in order to stay within privacy constraints. We present RLDP, the first framework to cast DP optimization itself as a closed-loop control problem amenable to modern deep reinforcement learning (RL). RLDP continuously senses rich statistics of the learning dynamics and acts by selecting fine-grained per parameter gradient-clipping thresholds as well as the magnitude of injected Gaussian noise. A soft actor-critic (SAC) hyper-policy is trained online during language model fine-tuning; it learns, from scratch, how to allocate the privacy budget where it matters and when it matters. Across more than 1,600 ablation experiments on GPT2-small, Llama-1B, Llama-3B, and Mistral-7B, RLDP delivers perplexity reductions of 1.3-30.5% (mean 5.4%) and an average 5.6% downstream utility gain. RLDP reaches each baseline's final utility after only 13-43% of the gradient-update budget (mean speed-up 71%), all while honoring the same (epsilon, delta)-DP contract and exhibiting equal or lower susceptibility to membership-inference and canary-extraction attacks.
解读
一句话总结
本文提出了一种名为RLDP的框架,通过强化学习动态地调整语言模型微调中的隐私参数,实现了在保证隐私的同时提高模型性能。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:在敏感数据集上训练大型语言模型(LLMs)时,数据隐私和模型效用之间的冲突成为实际部署的瓶颈。
- 现有方案不足:差分隐私随机梯度下降(DP-SGD)虽然保证了形式上的隐私,但以牺牲样本效率和最终准确性为代价。
- 研究目标:提出一种新的框架,通过强化学习动态调整隐私参数,以在保证隐私的同时提高模型性能。
问题2:论文的核心创新点是什么?
- 技术创新:将DP优化本身视为闭环控制问题,并使用现代深度强化学习(RL)进行求解。
- 方法改进:使用软演员-评论家(SAC)超策略在线训练,根据训练动态选择细粒度的梯度剪裁阈值和注入高斯噪声的幅度。
- 优势:与现有方法相比,RLDP在保证相同(ε,δ)DP合同的同时,展现出更高的效用和更低的样本效率。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在GPT2-small、Llama-1B、Llama-3B和Mistral-7B上进行了超过1600次消融实验。
- 性能提升:RLDP实现了1.3%-30.5%(平均5.4%)的困惑度降低和平均5.6%的下游效用提升。
- 对比结果:与七个基线方法(Vanilla DP-SGD、AdaClip、AutoClip、DC-SGD、GeoClip、PSAC和DP-LoRA)相比,RLDP在相同的(ε,δ)隐私预算下取得了更好的效用。
问题4:这个研究的实际应用价值是什么?
- 应用场景:在敏感数据集上训练LLMs,例如医疗保健领域。
- 实施建议:使用RLDP框架进行微调,以在保证隐私的同时提高模型性能。
- 局限与展望:RLDP目前仅适用于LoRA适配器的参数高效微调,未来可以扩展到全参数微调,并提高其泛化能力。