Error Feedback Undoes the Privacy of Sparse Federated Updates

Federated learning lets many devices train one model without sending their raw data. Each device sends only a model update, and those updates are large, so practitioners compress them. The most common trick is gradient sparsification: send only the few percent of coordinates with the largest magnitude. Because this discards most of the update, many papers treat it as a privacy defense as well. Discarding small coordinates without compensation stalls training, however, so every practical sparsifier adds error feedback. Error feedback means the device keeps the unsent part of its update in a local memory buffer and adds it back into later rounds until it is eventually sent.

This note argues that error feedback quietly cancels the privacy that sparsification appears to provide. By construction, it ensures that the server eventually receives almost the whole dense update, only spread over several rounds. Any attacker who adds up a device's sparse messages over a short window therefore recovers something close to a dense multi-step update. Recent attacks already know how to invert exactly that kind of update. We propose to show this leak empirically. We then use the result to answer a design question the literature leaves open: in which order should a device clip, add privacy noise, and sparsify, if the final protocol must be both small on the wire and resistant to reconstruction?

Core Claim

Consider one device that participates in consecutive rounds. Let $g_t$ be the local update it computes in round $t$, let $\mathcal{C}$ be any compressor such as Top-$k$ or a random mask, and let $e_t$ be its error-feedback buffer, starting at $e_1 = 0$. The device sends $m_t = \mathcal{C}(e_t + g_t)$ and updates its buffer as $e_{t+1} = e_t + g_t - m_t$. Summing over a window of $T$ rounds gives

$$\sum_{t=1}^{T} m_t \;=\; \sum_{t=1}^{T} g_t \;-\; e_{T+1}.$$

The error-feedback convergence analyses need the buffer $e_{T+1}$ to stay bounded when $\mathcal{C}$ is contractive. So the running sum of sparse messages differs from the dense cumulative update by a residual that does not grow with $T$, and relative to the cumulative update it gets smaller as the window grows.

Our claim is that, under error feedback, the privacy of any sparsifier is roughly the privacy of the dense multi-round update, whatever the per-round sparsity. Per-round audits of sparsification therefore overstate protection. The sum of dense updates over several rounds is structurally the same object that multi-step inversion attacks target. Non-Linear Trajectory Modeling for Multi-Step Gradient Inversion Attacks in Federated Learning (NL-SME) inverts it by fitting curved trajectories through the local optimization path, and reports a 94%–98% improvement in gradient matching over linear attacks.

A second, weaker channel sits on top of this identity. Top-$k$ reveals which coordinates were large, and that index pattern carries information even with the values removed.

The claim matters because both halves of the literature have avoided it. The papers that treat pruning as a defense evaluate a single static message without any buffer. Evaluating Gradient Inversion Attacks and Defenses in Federated Learning tests GradPrune as a one-shot filter. Auditing Privacy Defenses in Federated Learning via Generative Gradient Leakage (GGL) shows that the remaining 10% of coordinates still guides a GAN-prior attack, but also audits only single updates. The papers that make sparsification converge never ask about privacy. CocktailSGD reaches 117x compression with random-subset Top-$k$, quantization and error compensation. The Industrial IoT system of Deep Anomaly Detection for Time-series Data in Industrial IoT reaches up to 300x with Top-$k$ and local accumulation, and simply assumes that keeping data local is private.

Research Program

The work has three parts.

Part one: the window attack. We build an attack for an honest-but-curious server, meaning one that follows the protocol but studies everything it receives. The server keeps a per-device running sum of received sparse messages over a sliding window of $T$ rounds. It hands this sum to two existing inverters: NL-SME's trajectory-matching objective, and GGL's generative-prior search, which accepts a known sparsity mask as part of its objective. The attack adds one new ingredient. It treats the unobserved buffer $e_{T+1}$ as a latent variable with a known norm bound and optimizes over it jointly with the dummy input. It also uses the Top-$k$ index sets from each round as an extra matching constraint. We keep the attack deliberately simple so that any leakage we find is attributable to the protocol, not to attack engineering.

Part two: when the identity breaks. The identity assumes the device's data and participation are stable across the window. That holds in cross-silo settings, where a few institutions participate every round. It weakens in cross-device settings, where a device appears rarely, its buffer goes stale, and the weights move a lot between its visits. We will measure leakage as a function of three quantities: window length, participation rate, and how much the local data changes between rounds. This mapping tells deployers which regimes are actually at risk rather than issuing a blanket warning.

Part three: the constructive consequence. If sparsification gives no privacy under error feedback, protection must come from somewhere the telescoping identity cannot undo. That means noise added before the compressor, so that everything the buffer later releases is post-processing of an already privatized vector. We therefore compare two orderings.

The first ordering is sparsify-then-privatize, as in Gradient sparsification for efficient wireless federated learning with differential privacy (DP-SparFL). That work uses a random mask so that coordinate selection reveals nothing, then shrinks the clipping threshold by $\sqrt{s}$, where $s$ is the kept fraction, because the masked vector has lower sensitivity. Its authors explicitly leave biased selection such as Top-$k$ open.

The second ordering is privatize-then-sparsify. The device clips, adds Gaussian noise, and then applies Top-$k$ with error feedback to the noisy vector. Differential privacy (a formal guarantee that one record changes the output distribution only slightly) then covers the selection and the buffer automatically, because both are post-processing. The price is that Top-$k$ may pick coordinates where noise, not signal, is large.

Distributed clipping is itself biased. We borrow the shift-vector correction of Clip21: Error Feedback for Gradient Clipping, which applies error feedback to clipping and reports roughly 6x more accurate solutions than plain distributed clipping at equal privacy budget. We will check whether its shift vector interacts with the compression buffer.

The open question is which ordering gives better accuracy at a fixed privacy budget and a fixed number of bits sent. It is a real question because the two orderings trade different costs. The first adds less noise per coordinate but selects coordinates badly. The second selects well but adds full-dimension noise before compressing.

Baselines

Naive reference points. The first is dense FedAvg with no compression and no defense, which fixes the ceiling for both accuracy and leakage. Evaluating Gradient Inversion Attacks and Defenses in Federated Learning reports 93.37% CIFAR-10 accuracy and an LPIPS of 0.45 for this undefended setting. LPIPS is a perceptual distance between the reconstruction and the true image; higher means less recognizable. The second is Top-$k$ without error feedback, which is exactly GradPrune. The same paper reports that GradPrune at 90% combined with Intra-InstaHide at batch size 32 reaches LPIPS 0.73 with 86.10% accuracy. It also reports that GradPrune alone above 99% sparsity costs about 10 points of accuracy.

These references bound the argument from both sides. If our window attack against Top-$k$ with error feedback drives LPIPS back toward the undefended 0.45 while accuracy stays near 93%, we have shown that error feedback restores both utility and leakage together. We run them at identical architecture, batch size, rounds and learning-rate budget, and use the same inverter for every protocol.

The fair communication baseline. This is the CocktailSGD compressor (CocktailSGD): a shared-seed random subset, Top-$k$ inside that subset, 4-bit quantization, and error compensation. It is the strongest compression-first method in the file and the one most likely to be deployed. We match its bits per round when comparing any privacy-motivated variant against it. It reports 117x compression and a 7.0% HELM improvement on GPT-NeoX-20B. It reports no number on our image or FEMNIST benchmarks, so we reproduce it ourselves with a tuning budget equal to that of our methods, sweeping sampling ratio, $k$ and bit width.

The strongest privacy-plus-communication competitor. This is DP-SparFL (Gradient sparsification for efficient wireless federated learning with differential privacy), because it is the only method in the file that combines sparsification, communication savings and formal privacy. Its paper reports only "significantly higher test accuracy" without a figure, so there is no reported result found on Lacuna for DP-SparFL accuracy on CIFAR-10 or MNIST. We implement it with its $\sqrt{s}C$ clipping, without the wireless power-scheduling component, which is orthogonal to our question. Beating it means higher accuracy at matched privacy budget $\varepsilon$ and matched uplink bits, together with window-attack leakage no worse than its own.

The strongest attack references. These are GGL, which reports PSNR above 5.7 dB on ImageNet across the defenses it tested, and NL-SME with its 94%–98% gradient-matching gain. PSNR (peak signal-to-noise ratio) measures pixel-level reconstruction fidelity; higher means a closer copy.

The ablation that isolates our key ingredient. We toggle only the error-feedback buffer while holding the compressor fixed. We also compare the window attack against the same inverter applied to one round at a time. If leakage does not grow with window length when error feedback is on, the core claim fails.

Why not just…?

Why not just use differential privacy and ignore the sparsification question? Differential privacy is the right tool for the guarantee, and we do not argue against it. Its placement relative to the compressor is exactly what is unresolved. Plain dense DP-SGD sends full-size noisy vectors and saves no bandwidth. Clip21 also shows that naive distributed clipping reaches training loss more than three orders of magnitude worse on CIFAR-10 with VGG-11 than its error-feedback variant. The accuracy-versus-bits curves of the two orderings in Part three settle whether DP plus a compressor is simply a solved composition. If privatize-then-Top-$k$ and DP-SparFL are indistinguishable, we will report that plainly and the constructive half of this proposal shrinks to a recommendation.

Why not just use random masks with shared seeds, which reveal nothing through indices? This is a real threat to the index-leakage part of our story. CocktailSGD and DP-SparFL both do this. It does not escape the main claim, though, because the telescoping identity holds for any compressor paired with error feedback, random masks included. The ablation that runs the window attack against random-mask error feedback shows how much of the leak is due to indices and how much to cumulative delivery. We expect the second to dominate. If random-mask error feedback leaks far less, the claim narrows to Top-$k$.

Why not just rely on large batches or many local steps to blur the update? The file already argues against this. Gradient Inversion with Generative Image Prior reports recognizable reconstructions at batch size 32, with PSNR around 15.58 dB on 64×64 ImageNet. NL-SME breaks multi-step averaging. Our participation-rate sweep additionally shows whether infrequent participation, rather than batch size, is the thing that actually breaks the leak.

Why not just add a heavy local defense such as decoys or a shadow GAN? Concealing Sensitive Samples against Gradient Leakage in Federated Learning solves an inner optimization loop per sensitive sample. Shadow defense against gradient inversion attack in federated learning runs StyleGAN3 and Grad-CAM++ on the device. Both send dense updates, and both cost the kind of compute that bandwidth-starved edge devices lack. We include decoy-based concealment (DCS²) on CIFAR-10 as a leakage reference. Its reported SSIM of 0.15 there gives the target to match; SSIM is a structural similarity score where lower means less similar to the original. We also report its client-side compute alongside ours.

Proposed Experiments

Settings. Leakage audits run on CIFAR-10 and TinyImageNet with ResNet-18. Semantic leakage runs on CelebA, where we score an attribute classifier on reconstructions, following GGL's observation that attributes survive when pixels do not. Realistic heterogeneous participation runs on FEMNIST. One non-image check uses the Power Demand time series from the Industrial IoT paper, to ask whether cumulative delivery also exposes operational patterns.

Sweeps. Sparsity ranges from 90% to 99.9%. Window length $T$ ranges from 1 to 20 rounds, and participation rate from every round down to 5%. Privacy is scored with PSNR, SSIM, LPIPS and attribute-inference accuracy. Utility is test accuracy at fixed rounds and at fixed total uplink bits, and cost is client wall-clock time.

First decisive check. Under Top-$k$ at 99% with error feedback and full participation, window-attack LPIPS should approach the dense-FedAvg value as $T$ grows. With error feedback removed it should not. If the curves overlap, the claim is false.

Second decisive check. Leakage should fall as participation drops, which locates the boundary between the cross-silo and cross-device regimes.

Third decisive check. At matched $\varepsilon$ and matched bits on FEMNIST and CIFAR-10, we compare the accuracy of privatize-then-Top-$k$ with error feedback against DP-SparFL. We run the window attack on both to confirm that neither leaks beyond its DP-implied level.

Reporting. A negative result in the third check is still useful: it would say that for private sparse federated learning, random-mask sparsify-then-privatize is the right default.