[论文解读] Large Language Models Can Be Strong Differentially Private Learners
本文表明,在相对有限的隐私预算下,使用DP优化(DP-SGD/DP-Adam)对大型预训练语言模型进行微调,在NLP任务上可以实现强性能,得益于内存高效的幽灵裁剪技术和与任务对齐的目标。
Differentially Private (DP) learning has seen limited success for building large deep learning models of text, and straightforward attempts at applying Differentially Private Stochastic Gradient Descent (DP-SGD) to NLP tasks have resulted in large performance drops and high computational overhead. We show that this performance drop can be mitigated with (1) the use of large pretrained language models; (2) non-standard hyperparameters that suit DP optimization; and (3) fine-tuning objectives which are aligned with the pretraining procedure. With the above, we obtain NLP models that outperform state-of-the-art DP-trained models under the same privacy budget and strong non-private baselines -- by directly fine-tuning pretrained models with DP optimization on moderately-sized corpora. To address the computational challenge of running DP-SGD with large Transformers, we propose a memory saving technique that allows clipping in DP-SGD to run without instantiating per-example gradients for any linear layer in the model. The technique enables privately training Transformers with almost the same memory cost as non-private training at a modest run-time overhead. Contrary to conventional wisdom that DP optimization fails at learning high-dimensional models (due to noise that scales with dimension) empirical results reveal that private learning with pretrained language models doesn't tend to suffer from dimension-dependent performance degradation. Code to reproduce results can be found at https://github.com/lxuechen/private-transformers.
研究动机与目标
- 在NLP中引入差分隐私的动机,并解决在DP下大模型的性能与计算瓶颈。
- 证明在合理的隐私预算内(epsilon 在 {3,8})可以用DP优化对大型预训练语言模型进行有效微调。
- 确定与DP优化对齐的超参数选择和任务目标,以最大化性能。
- 开发内存高效的技术,使Transformer在没有逐样本梯度的情况下也能进行DP训练(幽灵裁剪)。
提出的方法
- 在(epsilon, delta)隐私核算下,用DP-Adam对预训练模型(用于分类的BERT/RoBERTa家族;用于生成的GPT-2变体)进行微调。
- 系统性研究超参数(batch size、learning rate、训练轮次)及其对跨任务DP性能的影响。
- 使用文本填充风格的微调以用于分类,使其与预训练目标保持一致。
- 开发幽灵裁剪以避免在Transformer和序列数据的DP-SGD中实例化逐样本梯度。
- 应用逐层裁剪和对序列友好的梯度范数计算以降低内存使用。
- 比较全微调与低维更新方法,并报告跨任务的隐私约束性能。
实验结果
研究问题
- RQ1大型预训练语言模型是否可以在差分隐私下得到有效微调以达到具有竞争力的NLP性能?
- RQ2超参数和任务对齐目标如何影响DP优化在分类和生成任务上的性能?
- RQ3参数更新的维数是否限制DP性能,还是在DP下全微调可超越低维方法?
- RQ4像幽灵裁剪这样的内存高效技术是否能在实际内存和计算成本下实现对大型Transformer模型的私有训练?
- RQ5在固定隐私预算下,模型规模对私有微调性能有何影响?
主要发现
- 在ε在 {3,8} 的隐私预算下,使用DP-Adam对预训练模型进行微调在各任务上达到较强性能。
- 更大的预训练模型在私有微调中表现更佳。
- 在分类和生成任务上,使用DP-Adam的全微调可达到或超越专门的低维DP方法。
- 幽灵裁剪显著降低内存使用,使Transformer在私有训练时接近非私有内存成本,且运行时开销适中。
- 任务对齐,如用于分类的文本填充,能提升私有学习性能。
- 在生成任务上,私有模型在DP下可超越强的非私有基线。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。