Federated learning allows distributed users to collaboratively train a model while keeping each user's data private. Recently, a growing body of work has demonstrated that an eavesdropping attacker can effectively recover image data from gradients transmitted during federated learning. However, little progress has been made in recovering text data. In this paper, we present a novel attack method FILM for federated learning of language models -- for the first time, we show the feasibility of recovering text from large batch sizes of up to 128 sentences. Different from image-recovery methods which are optimized to match gradients, we take a distinct approach that first identifies a set of words from gradients and then directly reconstructs sentences based on beam search and a prior-based reordering strategy. The key insight of our attack is to leverage either prior knowledge in pre-trained language models or memorization during training. Despite its simplicity, we demonstrate that FILM can work well with several large-scale datasets -- it can extract single sentences with high fidelity even for large batch sizes and recover multiple sentences from the batch successfully if the attack is applied iteratively. We hope our results can motivate future work in developing stronger attacks as well as new defense methods for training language models in federated learning. Our code is publicly available at https://github.com/Princeton-SysML/FILM.
翻译:联邦学习允许分布式用户在保持每个用户的数据私密性的同时合作培训模型。 最近,越来越多的工作显示,窃听攻击者能够有效地从联邦学习期间传输的梯度中恢复图像数据。 然而,在恢复文本数据方面进展甚微。 在本文件中,我们展示了用于联邦学习语言模型的新颖攻击方法胶片 -- -- 第一次,我们展示了从大批量的多达128个句子中回收文本的可行性。与为匹配梯度而优化的图像恢复方法不同,我们采取了一种截然不同的方法,首先从梯度中确定一组单词,然后直接根据波音搜索和基于先前的重新排序战略重建句子。我们攻击的关键洞察力是利用预先培训的语言模型方面的知识或培训期间的记忆化。尽管很简单,但我们证明胶片能够用几套大型数据集很好地恢复文本。即使大批量尺寸的图像恢复方法与梯度相匹配,我们也可以从批次攻击中成功提取多个句子。 我们希望,在Bam-BREDFI/FI 中,我们开发更强的国防模型。