arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.06746cs.CR
收藏

DP-Forward:在前向传播中基于差分隐私对语言模型进行微调与推理

DP-Forward: Fine-tuning and Inference on Language Models with Differential Privacy in Forward Pass

Minxin Du, Xiang Yue, Sherman S. M. Chow, Tianhao Wang, Chenyu Huang, Huan Sun

AI总结:

DP-Forward通过在前向传播中直接扰动嵌入矩阵并采用解析矩阵高斯机制,以更低的时间和内存开销实现严格本地差分隐私,在保持模型效用的同时显著抑制嵌入反演和敏感属性推断攻击。

摘要:

差分隐私随机梯度下降(DP-SGD)在反向传播中向梯度添加噪声,以保护训练数据免受隐私泄露,尤其是成员推断攻击。然而,它无法覆盖(推理阶段的)威胁,如嵌入反演和敏感属性推断。此外,当用于微调大型预训练语言模型(LMs)时,它在存储和计算方面的开销也很高。我们提出DP-Forward,该方法直接在语言模型的前向传播中扰动嵌入矩阵。它满足针对训练和推理数据的严格本地差分隐私要求。为了用最小的矩阵值噪声实现该方法,我们设计了一种解析矩阵高斯机制(aMGM),通过从矩阵高斯分布中抽取可能非独立同分布的噪声。随后,我们研究了使用aMGM噪声扰动语言模型不同隐藏(子)层输出的效果。在三个典型任务上,该方法的效用几乎达到非隐私基线,并在中等隐私水平下比DP-SGD最多高出7.7个百分点。与使用最新高速库的DP-SGD相比,它节省了3倍的时间和内存成本。它还将嵌入反演和敏感属性推断的平均成功率分别最多降低了88个百分点和41个百分点,而DP-SGD则无法做到这一点。

英文摘要:

Differentially private stochastic gradient descent (DP-SGD) adds noise to gradients in back-propagation, safeguarding training data from privacy leakage, particularly membership inference. It fails to cover (inference-time) threats like embedding inversion and sensitive attribute inference. It is also costly in storage and computation when used to fine-tune large pre-trained language models (LMs). We propose DP-Forward, which directly perturbs embedding matrices in the forward pass of LMs. It satisfies stringent local DP requirements for training and inference data. To instantiate it using the smallest matrix-valued noise, we devise an analytic matrix Gaussian~mechanism (aMGM) by drawing possibly non-i.i.d. noise from a matrix Gaussian distribution. We then investigate perturbing outputs from different hidden (sub-)layers of LMs with aMGM noises. Its utility on three typical tasks almost hits the non-private baseline and outperforms DP-SGD by up to 7.7pp at a moderate privacy level. It saves 3$\times$ time and memory costs compared to DP-SGD with the latest high-speed library. It also reduces the average success rates of embedding inversion and sensitive attribute inference by up to 88pp and 41pp, respectively, whereas DP-SGD fails.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑