梯度在分割语言模型中对文本泄露的贡献:按Token和按文档计数
研究论文 · 2026/10/06
在拆分学习中,客户端自行运行前几层,仅将每个token的输出向量发送给服务器,服务器在训练期间返回梯度。我们表明,位于拆分点的观察者可以从这些通信中重建客户端的大部分文本,并量化了梯度的帮助。在GPT-2上,仅持有客户端层公开权重的攻击者从激活中恢复94.20%的token,当同时看到梯度时恢复97.38%,提高了3.17个百分点(95%置信区间[2.72, 3.64])。按文档计数,差异更大:无梯度时攻击者精确重建13.71%的32-token文档,有梯度时为37.77%,因为文档只有在每个token都正确时才被计数。计数方式也影响防御效果评估。Secret mixup将每个输出向量与诱饵混合,几乎阻止攻击者精确重建任何文档,但攻击者仍能恢复83-91%的token。在GPT-2和Qwen3-0.6B上的第二个实验中,服务器仅训练连续层的一段,即使固定该段的长度,该段起始层也会同时改变模型质量和泄漏。我们建议同时按token和按文档报告泄漏,并将拆分模型发送的内容视为与文本本身一样敏感。
该研究量化了拆分学习中梯度对文本泄漏的额外贡献,并强调按文档计数会显著放大泄漏风险,对隐私保护和防御评估具有重要指导意义。
Split learning lets a client train a language model on a server without sending its text. The client runs the first layers itself and sends the server only their output, a vector of numbers for each token. During training, the server sends gradients back. We show that an observer at the split can rebuild most of the client's text from this traffic, and we measure how much the gradients help. On GPT-2, an attacker who holds only the publicly released weights of the client's layers recovers 94.20% of tokens from the activations alone and 97.38% when it also sees the gradients, 3.17 percentage points more 95% interval [2.72, 3.64]. Counted by document, the difference is much larger. The attacker rebuilds 13.71% of 32-token documents exactly without the gradients and 37.77% with them, because a document only counts when every token is right. How we count also changes how good a defence looks. Secret mixup, which blends each outgoing vector with a decoy, stops the attacker from rebuilding almost any document exactly, yet the attacker still recovers 83-91% of tokens. In a second experiment on GPT-2 and Qwen3-0.6B, where the server trains only a run of consecutive layers, the layer at which the run starts changes both model quality and leakage, even when the run's length is fixed. We recommend reporting leakage both per token and per document, and treating what a split model sends as being as sensitive as the text itself.