让大模型微调更私密:只在关键参数方向加噪声,提升性能和稳定性。
Differentially Private Subspace Fine-Tuning for Large Language Models
- 只在任务相关的低维参数子空间加差分隐私噪声
- 在多个数据集上准确率更高、收敛更快、训练更稳定
- 适合需要高隐私保护的下游任务微调场景
在下游任务上微调大语言模型对实现其跨领域能力至关重要,但常依赖敏感数据,引发隐私担忧。差分隐私(DP)提供严格的隐私保障,已被广泛用于微调;然而,直接在高维参数空间注入噪声会产生大范数扰动,导致性能下降和训练不稳定。为此,我们提出 DP-SFT,一种两阶段子空间微调方法,显著降低噪声幅度的同时保持正式的差分隐私保证。我们的直觉是:微调过程中,重要参数更新集中在低维、任务特定的子空间,其他方向变化极小。因此,仅在该子空间注入 DP 噪声以保护隐私,而不扰动无关参数。第一阶段通过分析主梯度方向识别子空间;第二阶段将完整梯度投影到该子空间,添加 DP 噪声后映射回原始参数空间进行模型更新,大幅降低噪声影响。在多个数据集上的实验表明,DP-SFT 在严格差分隐私约束下提升了准确率与稳定性,加速了收敛,并显著优于现有 DP 微调基线。
原文摘要 · Abstract (English)
Fine-tuning large language models on downstream tasks is crucial for realizing their cross-domain potential but often relies on sensitive data, raising privacy concerns. Differential privacy (DP) offers rigorous privacy guarantees and has been widely adopted in fine-tuning; however, naively injecting noise across the high-dimensional parameter space creates perturbations with large norms, degrading performance and destabilizing training. To address this issue, we propose DP-SFT, a two-stage subspace fine-tuning method that substantially reduces noise magnitude while preserving formal DP guarantees. Our intuition is that, during fine-tuning, significant parameter updates lie within a low-dimensional, task-specific subspace, while other directions change minimally. Hence, we only inject DP noise into this subspace to protect privacy without perturbing irrelevant parameters. In phase one, we identify the subspace by analyzing principal gradient directions to capture task-specific update signals. In phase two, we project full gradients onto this subspace, add DP noise, and map the perturbed gradients back to the original parameter space for model updates, markedly lowering noise impact. Experiments on multiple datasets demonstrate that DP-SFT enhances accuracy and stability under rigorous DP constraints, accelerates convergence, and achieves substantial gains over DP fine-tuning baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。