Does Error Feedback Undo the Privacy Benefit of Gradient Compression?

Federated learning trains a shared model on data that stays on users' devices. The devices send model updates to a server, never raw examples. Two observations sit uneasily together. First, sending updates is expensive, so practitioners compress them: they keep only the largest 1–10% of coordinates, or they send only the sign of each coordinate. Aggressive compression of this kind is unstable unless paired with error feedback. Under error feedback, each client remembers the part of its update it did not send and adds it back into the next round. Second, compression has been reported to be a good defense against gradient inversion, the attack in which a curious server reconstructs a client's private images by searching for inputs whose gradient matches the one it received. Those defense results, however, were all measured one round at a time. Error feedback exists precisely so that nothing is permanently discarded: every coordinate that was dropped is eventually sent. An attacker who watches several rounds may therefore be able to recover almost the full gradient, and with it the private data.

This note proposes to test that hypothesis directly. We would build an inversion attack that understands error feedback and measure how much of the apparent privacy benefit of compression survives it. We would then identify which cheap changes to error feedback restore privacy, and at what cost in accuracy. In two sentences: compressed federated updates look private when attacked one message at a time, but error feedback guarantees that the discarded signal arrives later. A server that adds up a short window of messages, while simulating the client's compressor on candidate inputs, should invert them far better than current evaluations suggest.

Core Claim

The mechanism rests on one identity. Write $g_t$ for the client's true update in round $t$, $e_t$ for its stored residual, and $c_t = \mathcal{C}(g_t + e_t)$ for the compressed message, with $e_{t+1} = g_t + e_t - c_t$. Summing over a window of $T$ rounds starting at round $s$ gives

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

For a contractive compressor such as Top-$k$ or scaled sign, the residual norm stays bounded. This is the property that Error Feedback Fixes SignSGD and other Gradient Compression Schemes uses to prove that error feedback restores convergence. So the window sum of observed messages equals the window sum of true gradients up to an error that does not grow with $T$, while the signal grows roughly linearly in $T$. The relative distortion the attacker faces should therefore shrink about as $1/T$, which follows from a bounded numerator divided by a linearly growing denominator.

This matters most when a client's local data repeats across rounds. That happens in cross-device or cross-silo federated learning with small local datasets, or with a fixed full local batch. In that regime the client's private inputs are a constant unknown that every message constrains. Our claim is that single-round evaluations of compression-as-defense are systematically optimistic whenever error feedback is used. We predict that the gap is large exactly where compression looked most protective, namely at Top-1% and sign compression.

Relation to Prior Work

Three papers motivate the question by reporting that compression or pruning blocks inversion.

We differ from all three by attacking the multi-round stream that error feedback produces, rather than individual messages.

Two papers supply the attack ingredients.

  • Inverting Gradients contributes cosine-distance matching with a total-variation image prior, about 14 dB versus about 7 dB for Euclidean matching on trained ResNet-20.
  • Gradient Inversion Attacks Beyond SGD shows that deterministic optimizer state, such as Adam's momentum buffers, can be simulated inside the matching objective. It gains up to 6.5 dB on ImageNet, but it requires knowledge of the initial state.

We treat the error-feedback residual the same way as that optimizer state, as a deterministic, simulable state. The telescoping identity removes the need to know the residual's initial value exactly, because its contribution stays bounded.

Two further papers show that multi-round observation defeats low-dimensional updates: MineGrad for LoRA adapters and Beyond Inferring Class Representatives for user-level features. MineGrad relies on an active, weight-poisoning server. We stay with a passive, honest-but-curious server, which makes the threat more realistic.

On the Interaction Between Differential Privacy and Gradient Compression in Deep Learning constrains the design. It shows that error feedback combined with temporal averaging filters zero-mean noise out of compressed updates. The same filtering that helps utility is what we expect to help the attacker, so we must examine differentially private variants separately rather than assume noise fixes everything.

Research Program

The attack. We build an inversion attack aware of error feedback. The server holds the global weights for each round, the compressor, and the stream of messages $c_s,\dots,c_{s+T-1}$. It optimizes dummy inputs and labels as follows:

  1. Run the client's local update on the dummy batch at each round's weights.
  2. Pass the result through a simulated error-feedback loop, with the residual initialized at zero.
  3. Minimize negative cosine distance between the simulated and observed window sums, plus total variation.

For Top-$k$, the observed index sets are themselves matched as a soft mask. We also run a cheaper variant that matches only the observed window sum against the dummy gradient sum, without simulating compression. This variant isolates how much is gained from the telescoping identity alone versus from full simulation.

The analysis. We bound reconstruction error as a function of $T$ and of the compressor's contraction factor. We expect worse contraction to mean a larger residual and a slower $1/T$ decay. The bound then tells us how many rounds an attacker needs.

Mitigations. We test three cheap changes that keep communication fixed:

  • Residual decay, which multiplies $e_t$ by a factor $\beta<1$ each round.
  • Periodic residual reset.
  • Noised residual, which adds Gaussian noise before the residual re-enters the message.

Each breaks the telescoping identity to a different degree. We trace accuracy against attack quality for each. We then evaluate the strongest private method in the file, Clip21-SGD2M from Double Momentum and Error Feedback for Clipping with Fast Rates and Differential Privacy, with a compressor added. The question is whether, at the $\epsilon$ values people actually deploy, its error-feedback and momentum buffers give the attacker the same window-sum advantage.

Baselines

Naive reference points. The leakage ceiling is the undefended, uncompressed client attacked by the cosine-matching method of Inverting Gradients. On trained ResNet-20 that paper reports about 14 dB PSNR. The "do nothing" privacy reference is the same compressed stream attacked one message at a time with that method. This is the protocol under which compression has been reported to defend, so it is the number our claim says is optimistic.

Strongest existing competitor. The strongest existing defense evaluation is the combined defense from Evaluating Gradient Inversion Attacks and Defenses in Federated Learning: 90% gradient pruning, Intra-InstaHide with $k=4$, and batch size 32. It reaches LPIPS 0.73, compared with 0.45 undefended, at 86.10% CIFAR-10 accuracy versus 93.37% undefended. We reproduce its pruning arm with and without error feedback under that paper's realistic protocol: private BatchNorm statistics and unknown labels.

The strongest compression-as-defense number in the file is the mixed-quantization result of Mixed Quantization Enabled Federated Learning, which reports DLG PSNR falling from 55.3 dB to 8.1 dB. We include that compressor in our sweep with its scales kept local.

Fairness controls. Every attack gets the same optimizer, iteration budget, total-variation weight, number of random restarts, and access assumptions. The only differences are which messages each attack may read and whether it simulates error feedback.

Ablations. Two ablations isolate the key ingredient. The first runs the same compressor without error feedback and attacks it with the multi-round window attack. If leakage stays low there, the culprit is the residual re-injection rather than multi-round observation per se. The second compares the window-sum-only variant with the full simulating attack.

What counts as success. The proposal succeeds if, on the error-feedback stream at Top-1% and sign compression, the window attack moves LPIPS back toward the undefended 0.45 and PSNR toward the uncompressed ceiling within a modest window, which we set at $T\le 10$. Meanwhile the per-message attack must stay near the reported defended values, and the no-error-feedback ablation must not show the same recovery.

Why not just…?

Why not just run the existing per-message inversion on compressed updates, as prior evaluations did? That is exactly the protocol we argue is miscalibrated. The telescoping identity shows that per-message distortion is not the quantity an observing server faces. The direct comparison is the decisive experiment: per-message attack versus window attack on the same stream, with the same budget. If the two match, our hypothesis is wrong and the existing defense numbers stand.

Why not just drop error feedback and accept plain sparsification? Then the leakage argument disappears, but the cost is documented. Pruning without error feedback needs more than 99% sparsity to defend and loses about 10 accuracy points on CIFAR-10 (Evaluating Gradient Inversion Attacks and Defenses). Biased compressors without error feedback can also stall or diverge (Error Feedback Fixes SignSGD). Our mitigation sweep treats "no error feedback" as the $\beta=0$ endpoint of residual decay. The question becomes whether some intermediate $\beta$ keeps most of the accuracy while breaking most of the leakage. If none does, that is itself a useful negative result.

Why not just add differential-privacy noise on top? This is a real threat to the relevance of the work, though not to its correctness. Formal guarantees from composition still hold under error feedback whenever noise is added after the residual is computed. Practitioners who use DP at a tight $\epsilon$ are therefore covered. Two points keep the question open. First, many deployments rely on compression or quantization alone because DP noise overwhelms large models, as On the Interaction Between Differential Privacy and Gradient Compression reports. Second, the window sum averages noise down by $\sqrt{T}$ relative to signal, which is exactly the filtering that paper exploits for utility. We settle this by attacking Clip21-SGD2M with compression across a range of $\epsilon$ values. We will report plainly if inversion fails at every practical $\epsilon$.

Why not just use secure aggregation? Secure aggregation hides individual messages but not their sums across clients. Panning for Gold in Federated Learning shows targeted extraction survives large-scale aggregation. Secure aggregation is also costly on edge devices and expands communication, as noted in ERIS. We will run one secondary experiment that applies the window attack to aggregates of a few clients. It is secondary because our core claim concerns per-client streams.

Proposed Experiments

Main experiments. We simulate federated training of ResNet-20 and ResNet-18 on CIFAR-10 and CIFAR-100, with Dirichlet non-IID splits and small fixed local datasets of 8 to 64 images per client. We add a high-resolution check on an ImageNet subset with private BatchNorm statistics, following Evaluating Gradient Inversion Attacks and Defenses. The compressors are Top-$k$ at 10% and 1%, error-feedback SignSGD, and the per-layer mixed quantization of Mixed Quantization Enabled Federated Learning. Each is run with and without error feedback.

Metrics. We report PSNR and LPIPS of reconstructions as functions of window length $T$ and of the training round, together with final test accuracy and bits uploaded per round.

First decisive check. On error-feedback streams, PSNR should rise with $T$ at roughly the predicted rate. On matched no-error-feedback streams it should not. If both curves are flat, the hypothesis is refuted.

Second decisive check. Among residual decay, reset, and noised residual, we look for a variant that holds accuracy within a point or two of plain error feedback while pushing LPIPS above the 0.73 reported for the combined pruning-and-InstaHide defense. No reported result was found on Lacuna for gradient inversion against any error-feedback-compressed stream, so these numbers would be the first.

Third experiment. The Clip21-SGD2M sweep over $\epsilon$ establishes where formal DP makes the leakage moot.

Possible extension. If time permits, we apply the same window attack to the bridging-matrix updates of Fed-SB. Fed-SB's linear update makes the window sum especially clean, and that paper evaluates privacy only through DP accounting.