Federated averaging no longer hides client text: a malicious client peels recovered sentences off the aggregate and reads the rest
Synopsis
In federated learning, a malicious client could previously recover text only from a single client's gradient; once the server averages many clients' gradients, sentence signals drown and existing attacks recover nothing exactly. This work reports an iterative peeling pipeline that first recovers some sentences exactly, then subtracts their gradient contributions from the aggregate residual so that masked sentences surface in the next round. When the aggregate holds more tokens than the model's hidden dimension, the method keeps 100% precision on recovered sentences and recovers up to 80.2% of client sentences exactly, a regime where existing attacks recover none exactly.
Interpretation
An honest-but-curious client taking part in federated fine-tuning can recover other clients' training sentences exactly from the aggregate update the server broadcasts, not only from a single client's gradient. Earlier text gradient-inversion attacks assume an honest-but-curious server that observes each client's own gradient, and they degrade as batch size grows; after FedAvg averages many clients' gradients, these methods recover not a single sentence exactly. On SST-2, Enron and PubMed, against DAGER, FILM and SOMP, all three baselines recover no exact sentences in any evaluated configuration, including configurations whose aggregate token count is below the hidden dimension.
Recovery runs as a loop: propose candidate sentences from the current residual, verify them against gradient consistency, then subtract the verified sentences' gradient contributions at a fitted scale to obtain a cleaner residual for the next round. Candidate generation uses beam search scored by the cosine similarity between whitened unembedding gradient rows and the current prefix hidden state, plus language-model fluency; verification requires a candidate's anchor tokens to match on both input-embedding gradients and first-MLP gradients under one positive scale. In one ablation with Pythia-160M on SST-2, the first verification pass recovers 51 sentences, and peeling yields seven further productive passes for 100 sentences in total at 100% precision.
Peeling is what carries recovery past the hidden-dimension wall, but recovery still declines as aggregation grows further. DAGER relies on the low-rank span of attention gradients, and that check stops discriminating as the token count approaches the hidden dimension; this method's token-direction solve instead uses the expanded feature space of the first MLP, so capacity depends on the number of distinct tokens rather than total token occurrences. As the ratio of aggregate tokens to hidden dimension keeps growing, the number of recovered sentences approaches zero; in the Enron sequence-length sweep, recovery holds across the tested length caps and drops significantly at the longer setting, with precision falling as well.
Perspective
The demonstrated setting is a single honest-but-curious client in FedAvg federated full fine-tuning, recovering other clients' sentences from one round's aggregate update, with models Pythia-160M, Pythia-410M and GPT-J-6B, data SST-2, Enron and PubMed, and aggregate token counts from 256 to 65,536. The full pipeline targets parallel-residual structure; on sequential-residual models a reduced variant with the MLP evidence terms disabled recovers 38 sentences exactly among 57 accepted candidates on GPT-2, and Mistral-7B-v0.3 recovers 7 SST-2 sentences in one configuration.
Recovery declines as aggregation grows, and the number of recovered sentences approaches zero once the aggregate is large enough relative to the hidden dimension; longer sequences lower both recovery and verification precision. The full pipeline works only on parallel-residual structure, and extending it to broader architectures remains future work. Adding Gaussian noise to the shared gradient drives exact recovery to zero at every tested nonzero noise level, while gradient clipping leaves recovery unaffected; FedAdam yields no exact recovery in this configuration, but that does not establish protection against recovery methods that account for the server optimizer. Whitening harms the pipeline on SST-2, which has many repeated phrases, and consistently improves it on private data with less repetition, a relationship left for systematic study.
