[论文解读] LAMP: Extracting Text from Gradients with Language Model Priors
LAMP 通过将梯度重建与基于 GPT-2 的语言先验相结合,并交替进行连续与离散优化,在联邦学习中从梯度中恢复私有文本,现实性与重构文本长度方面超越现有方法。
Recent work shows that sensitive user data can be reconstructed from gradient updates, breaking the key privacy promise of federated learning. While success was demonstrated primarily on image data, these methods do not directly transfer to other domains such as text. In this work, we propose LAMP, a novel attack tailored to textual data, that successfully reconstructs original text from gradients. Our attack is based on two key insights: (i) modeling prior text probability with an auxiliary language model, guiding the search towards more natural text, and (ii) alternating continuous and discrete optimization, which minimizes reconstruction loss on embeddings, while avoiding local minima by applying discrete text transformations. Our experiments demonstrate that LAMP is significantly more effective than prior work: it reconstructs 5x more bigrams and 23% longer subsequences on average. Moreover, we are the first to recover inputs from batch sizes larger than 1 for textual models. These findings indicate that gradient updates of models operating on textual data leak more information than previously thought.
研究动机与目标
- 从理论和实验上证明来自文本模型的梯度更新在联邦学习中会泄露用户的私有文本。
- 提出 LAMP,这是一个文本特定的梯度泄漏攻击,利用语言模型先验引导重构朝向自然文本。
- 展示 LAMP 在不同模型和批量大小下对比现有方法时能重构更多文本(包括双字母组合和更长的子序列)。
- 在真实设置下评估 LAMP,包括更大的批量大小、微调模型,以及带防护的模型。
提出的方法
- 通过从高斯先验采样令牌嵌入来初始化重构。
- 最小化重构损失,使重构的梯度与观测到的客户端梯度对齐,使用 L2/L1 或基于余弦的梯度损失。
- 应用嵌入长度正则化,使嵌入范数与词汇统计保持一致。
- 在连续优化(对嵌入进行梯度下降)和离散优化(通过变换生成候选句子,并通过综合重构损失与困惑度进行选择)之间迭代交替。
- 使用辅助语言模型(如 GPT-2)计算困惑度并引导离散搜索朝向自然文本。
- 将最终嵌入投影到最近的词汇标记以获得重构文本。
实验结果
研究问题
- RQ1在面向变换器模型的联邦学习中,是否可以从梯度更新中重构文本输入?
- RQ2将语言模型先验引入是否能提高重构文本的自然性和准确性,相较于以往的梯度泄漏方法?
- RQ3批量大小、模型规模和微调如何影响通过梯度泄漏文本数据的程度?
- RQ4在使用 LAMP 时,带防护或私有训练的模型是否仍然易受梯度泄漏影响?
- RQ5连续与离散优化组件对重构质量有何影响?
主要发现
- LAMP 相较于现有攻击显著能重构更多文本,在某些设置下平均能多达 5 倍的双字母组合和多达 23% 的更长子序列。
- LAMP 对多种 BERT 变体(BASE、LARGE)以及 TinyBERT 都有效,包括微调模型和带防护的模型。
- LAMP 使文本重构在批量大小超过 1 时也可实现,这是此前文本梯度泄漏尚未探索的设定。
- 将 GPT-2 作为语言先验可提升重构文本的真实感与连贯性。
- 结合离散变换并以语言模型困惑度引导的结果优于仅依赖梯度损失的方法。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。