通过令牌混淆缓解语言模型中的梯度倒置风险
Mitigating Gradient Inversion Risks in Language Models via Token Obfuscation
AI总结:
本文提出GHOST机制,通过令牌混淆解耦梯度、嵌入和令牌空间的联系,有效缓解语言模型的梯度倒置风险,同时保持模型性能。
摘要:
在大规模语言模型的训练和微调过程中,协同学习带来了显著的好处,但这种方法已被证明容易受到梯度倒置攻击(GIAs)的攻击,这些攻击允许攻击者从共享的梯度中重建私有训练数据。现有的防御方法主要采用梯度扰动技术,例如噪声注入或梯度剪枝,以破坏GIAs从梯度空间到令牌空间的直接映射。然而,这些方法往往效果有限,因为梯度、嵌入和令牌空间之间保留了语义相似性。在本文中,我们提出了一种新的防御机制,称为GHOST(梯度屏蔽与混淆令牌),这是一种令牌层面的混淆机制,通过解耦梯度、嵌入和令牌空间之间的内在联系来中和GIAs。GHOST基于一个重要的洞察:由于令牌空间的规模较大,存在语义上不同但嵌入空间上相近的令牌,可以作为原始令牌的影子替代品,这在令牌空间中实现了语义断开,同时在嵌入和梯度空间中保持连接。GHOST包括一个搜索步骤,该步骤使用多标准搜索过程来识别语义上不同的候选令牌,以及一个选择步骤,该步骤选择最优的影子令牌以确保对训练过程中关键特征的最小干扰,同时保持与原始令牌生成的内部输出的一致性。在多种模型架构(从BERT到Llama)和数据集上的评估显示,GHOST在保护隐私(恢复率低至1%)和保持实用性(在分类任务中达到0.92的分类F1和5.45的困惑度)方面表现出显著的效果,同时在分类和生成任务中对最先进的GIAs和自适应攻击场景都具有良好的防御能力。
英文摘要:
Training and fine-tuning large-scale language models largely benefit from collaborative learning, but the approach has been proven vulnerable to gradient inversion attacks (GIAs), which allow adversaries to reconstruct private training data from shared gradients. Existing defenses mainly employ gradient perturbation techniques, e.g., noise injection or gradient pruning, to disrupt GIAs' direct mapping from gradient space to token space. However, these methods often fall short due to the retention of semantics similarity across gradient, embedding, and token spaces. In this work, we propose a novel defense mechanism named GHOST (gradient shield with obfuscated tokens), a token-level obfuscation mechanism that neutralizes GIAs by decoupling the inherent connections across gradient, embedding, and token spaces. GHOST is built upon an important insight: due to the large scale of the token space, there exist semantically distinct yet embedding-proximate tokens that can serve as the shadow substitutes of the original tokens, which enables a semantic disconnection in the token space while preserving the connection in the embedding and gradient spaces. GHOST comprises a searching step, which identifies semantically distinct candidate tokens using a multi-criteria searching process, and a selection step, which selects optimal shadow tokens to ensure minimal disruption to features critical for training by preserving alignment with the internal outputs produced by original tokens. Evaluation across diverse model architectures (from BERT to Llama) and datasets demonstrates the remarkable effectiveness of GHOST in protecting privacy (as low as 1% in recovery rate) and preserving utility (up to 0.92 in classification F1 and 5.45 in perplexity), in both classification and generation tasks against state-of-the-art GIAs and adaptive attack scenarios.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。