Stealing Exact Training Data from Other Clients during Federated Learning

Omkar Shrikanth, Soham Dambalkar, Parag Jyoti Pal, Advik Raj Basani, Arnab K. PaularXiv 2026 · arXiv

TL;DR

Federated Learning (FL) is often touted for its privacy benefits, but this paper reveals a significant vulnerability: a single malicious client can "peel away" the layers of an aggregated gradient to recover exact training sentences from other participants. By iteratively identifying and subtracting the gradient contributions of recovered text, the authors demonstrate 100% precision in stealing private data, even in high-traffic regimes where previous attacks failed completely.

What Problem Does This Paper Address?

In Federated Learning, multiple clients train a model together by sharing only their "gradients" (mathematical updates) rather than their raw data. The standard protocol, FedAvg, averages these gradients together, which was long thought to provide a "privacy through aggregation" effect.

However, researchers have previously shown that gradients can be inverted to reveal training data. For text, this is notoriously difficult because language is discrete and high-dimensional. Existing attacks hit a "wall": they fail as soon as the number of tokens in a batch exceeds the model's hidden dimension ($d$). Furthermore, most prior work assumed a "server-side" attacker who sees individual client updates. This paper tackles the much harder client-side scenario, where an adversary only sees the noisy, averaged update of all other clients combined.

Methods

The authors introduce a novel iterative attack pipeline designed to break through the "hidden dimension wall." The process follows five key steps:

  1. Residual Isolation: The malicious client subtracts their own known gradient from the global update to isolate the "residual"—the average gradient of all other victims.
  2. Bag of Tokens Extraction: They identify which words were present in the victims' data by looking for non-zero rows in the embedding gradients.
  3. Candidate Generation: Using a specialized beam search, they generate potential sentences. This search is guided by two signals: standard language model fluency and a new "token direction" metric that uses MLP layer gradients to predict which tokens likely follow one another.
  4. Verification: This is the "gatekeeper" step that ensures 100% precision. For every candidate sentence, the attacker calculates its expected gradient and checks if it matches the observed residual across multiple "anchor" tokens using a consistent scaling factor ($\beta$).
  5. Peeling: This is the core innovation. Once a sentence is verified as 100% certain, its gradient contribution is subtracted from the residual. This "cleans" the signal, exposing weaker signals from other sentences that were previously buried under the noise, allowing the loop to start again.
Figure 1. Overview of our method. Step 1 outlines the method to isolate client gradients, while Step 2 extracts the bag of tokens (§3.3). Step 3 applies the candidate generation algorithm (§3.4) to produce quality-ranked candidate strings, which we then verify with the gradient (§3.5) in Step 4. Finally, Step 5 describes peeling (§3.6), the process which iteratively refines the residual gradient from the recovered sentences.

Datasets

The attack was evaluated on three diverse text datasets to simulate different privacy risks:

  • Enron: Email bodies (sensitive corporate/personal correspondence).
  • SST-2: Movie reviews (sentiment analysis).
  • PubMed: Medical text (highly sensitive health information).

The researchers tested these against popular open-source models including Pythia-160M, Pythia-410M, and GPT-J-6B.

Key Insights and Ideas

  • Aggregation is not a Privacy Guarantee: The "messiness" of averaging gradients from 100+ clients doesn't hide data; it just requires a more patient attacker. The "peeling" method proves that entanglement can be unwound.
  • Breaking the Wall: By subtracting recovered gradients, the attacker effectively reduces the "token count" of the residual in each iteration. This allows them to recover data even when the total tokens ($C$) are $4\times$ larger than the hidden dimension ($d$), a regime where all previous attacks (like DAGER or FILM) recover nothing.
  • Parallel-Residual Vulnerability: The attack is particularly potent against modern "parallel-residual" architectures (like GPT-J and Pythia), where the MLP and Attention layers operate in parallel. This structure makes the gradient signals more linearly separable and easier to verify.
  • Precision over Recall: The verification step (Figure 3) is intentionally strict. By requiring multiple "anchors" to match, the attacker ensures that every sentence they "steal" is a verbatim match, resulting in zero false positives.
Figure 3. Candidate filtering in VERIFY. Blue boxes denote sur- viving anchors; each box shows its βtok value.

Key Results

  • 100% Precision: Across all tested configurations, the sentences recovered by the pipeline were exact verbatim matches of the original training data.
  • High Recovery above the Wall: On the Enron dataset with Pythia-160M, the attack recovered 80.2% of sentences in a regime where existing baselines recovered 0%.
  • Qualitative Success: The attack successfully reconstructed highly sensitive information, including full names, phone numbers, and legally privileged email disclaimers (see Figure 21 in the paper).
  • Robustness: The attack remains effective even when clients perform multiple local training steps ($K=16$) or use different learning rates, which are common defenses intended to obscure gradients.
Figure 4. Recovery rates (%) for three models on the Enron dataset. The x-axis is C/d, with C = b · c · s aggregated tokens (b: batch size per client, c: clients, s: sequence length) and model hidden dimension d. We also report the BLEU-2 and ROUGE-2 scores and compare them against the specified baselines in Figures 12 and 15 respectively.

Limitations and Future Work

  • Architecture Dependence: The full attack relies on properties of parallel-residual blocks. While a "reduced" version works on sequential models (like GPT-2), the precision and recall drop significantly.
  • Differential Privacy (DP): The authors note that adding Gaussian noise to gradients (a standard DP practice) effectively stops the attack, though this often comes at the cost of model utility.
  • Token Multiplicity: If a specific token (like "the") appears in too many different contexts across the batch, the "token direction" signal becomes blurred, making the initial candidate generation harder.
  • Future Directions: The authors suggest extending this "peeling" framework to a broader range of model architectures and exploring more sophisticated candidate generation techniques to handle even larger aggregations.

Summary updated

Abstract

Malicious adversaries can employ gradient inversion attacks to reverse-engineer private data using the model updates of a round in Federated Learning. While there have been developments in gradient inversion for text, exact text recovery by a malicious client has so far remained infeasible, as FedAvg entangles the gradient contributions of many clients and obscures the signal of any individual sentence. We introduce a novel attack pipeline that unwinds this entanglement progressively through an iterative loop, in which the gradient contributions of sentences recovered exactly in one round are subtracted from the aggregate, exposing the remaining sentences for recovery in the next iteration. We show, for the first time, exact sentence recovery, with 100% precision, and on aggregates containing up to $4\times$ more tokens than the model's hidden dimension, we recover up to 80.2% of client sentences exactly, a regime where existing attacks recover none exactly.
BibTeX
@misc{shrikanth2026stealing,
  author = {Omkar Shrikanth and Soham Dambalkar and Parag Jyoti Pal and Advik Raj Basani and Arnab K. Paul},
  title = {{Stealing Exact Training Data from Other Clients during Federated Learning}},
  year = {2026},
  eprint = {2611.24689},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.24689},
}
Figure