DAGER:针对大型语言模型的精确梯度反演
DAGER: Exact Gradient Inversion for Large Language Models
AI总结:
本文提出DAGER算法,利用自注意力层梯度的低秩结构和token嵌入的离散性,首次在诚实但好奇设置下精确恢复大型语言模型的完整输入文本批次,在速度、可扩展性和重建质量上均超越先前攻击。
摘要:
联邦学习通过聚合多个客户端本地计算的梯度来工作,从而在不共享私有客户端数据的情况下实现协作训练。然而,先前的研究表明,服务器实际上可以使用所谓的梯度反演攻击来恢复数据。虽然这些攻击在应用于图像时表现良好,但它们在文本领域受到限制,仅允许近似重建小批次和短输入序列。在这项工作中,我们提出了DAGER,这是第一个精确恢复整批输入文本的算法。DAGER利用自注意力层梯度的低秩结构和token嵌入的离散性质,来有效地检查给定的token序列是否是客户端数据的一部分。我们使用这种检查,在诚实但好奇的设置下,分别使用穷举启发式搜索和贪婪方法,对基于编码器和基于解码器的架构精确恢复完整批次,且对数据没有任何先验。我们提供了DAGER的高效GPU实现,并通过实验表明,它能在大型语言模型(LLMs)上恢复大小高达128的完整批次,在速度(相同批次大小下快20倍)、可扩展性(批次大小大10倍)和重建质量(ROUGE-1/2 > 0.99)上击败了先前的攻击。
英文摘要:
Federated learning works by aggregating locally computed gradients from multiple clients, thus enabling collaborative training without sharing private client data. However, prior work has shown that the data can actually be recovered by the server using so-called gradient inversion attacks. While these attacks perform well when applied on images, they are limited in the text domain and only permit approximate reconstruction of small batches and short input sequences. In this work, we propose DAGER, the first algorithm to recover whole batches of input text exactly. DAGER leverages the low-rank structure of self-attention layer gradients and the discrete nature of token embeddings to efficiently check if a given token sequence is part of the client data. We use this check to exactly recover full batches in the honest-but-curious setting without any prior on the data for both encoder- and decoder-based architectures using exhaustive heuristic search and a greedy approach, respectively. We provide an efficient GPU implementation of DAGER and show experimentally that it recovers full batches of size up to 128 on large language models (LLMs), beating prior attacks in speed (20x at same batch size), scalability (10x larger batches), and reconstruction quality (ROUGE-1/2 > 0.99).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。