Federated learning lets phones or hospitals train a shared model by sending model updates instead of raw data. Two kinds of work treat the compression of these updates as doing double duty. The first sends only the largest 1% of gradient coordinates. The second rounds them to a few bits. Both cut bandwidth, and both have been reported to block gradient inversion, the attack in which a server rebuilds a client's training images from its gradient. There is a catch these papers have not tested. Aggressive compression only trains well when paired with error feedback. Error feedback is a local memory that stores whatever the compressor dropped and adds it back into the next round's message. Information pruned in round $t$ is therefore not destroyed. It is postponed.
We propose to test, and to quantify, a simple hypothesis. Under error feedback, an attacker who watches several consecutive compressed messages from the same client recovers roughly what the uncompressed gradient would have revealed. If so, the privacy credited to compression and the utility restored by error feedback are the same quantity counted twice. We would build that multi-round attacker. We would measure how fast leakage returns as the observation window grows. We would then map the real three-way frontier between bits sent, accuracy, and reconstruction quality. On that frontier, compression schemes that carry formal randomness, either differential privacy (a guarantee that any single example barely changes the output distribution) or randomized quantization, are compared fairly against deterministic compression.
Core Claim
The mechanism fits in one line. With compressor $\mathcal{C}$, client gradient $g_t$, residual memory $e_t$ and transmitted message $m_t = \mathcal{C}(e_t + g_t)$, error feedback sets $e_{t+1} = e_t + g_t - m_t$. Summing over a window of $K$ rounds gives
$$\sum_{t=1}^{K} m_t \;=\; \sum_{t=1}^{K} g_t \;-\; e_{K+1} + e_1 .$$
For contractive compressors such as top-$k$, the residual stays bounded. That boundedness is exactly what convergence proofs for EF21-style methods rely on, including Double Momentum and Error Feedback for Clipping with Fast Rates and Differential Privacy. The cumulative message therefore tracks the cumulative gradient up to an error that does not grow with $K$, while the signal grows roughly linearly in $K$ when the client's data and the model drift slowly.
Our claim is that compression-only defenses evaluated against single-round attacks overstate protection. We expect the overstatement to be largest in exactly the regime where they are claimed to be free, namely 99% sparsity with error feedback at near-baseline accuracy. A second claim follows. Compressors whose per-round randomness is independent of the data and never fed back into the residual should not suffer this collapse. We expect them to sit on a better privacy-utility curve than deterministic compression with error feedback at matched bits, which is a testable ordering.
This is the empirical form of a gap the literature leaves open. Gradient Inversion Attacks Beyond SGD showed that Adam and RMSProp state is deterministic and invertible when the server simulates the optimizer across rounds, gaining up to 6.5 dB PSNR on ImageNet. No paper in our file applies the same logic to compression residuals. We reuse that paper's update-matching idea, simulating hidden client state inside the attacker. The difference is that we target a different hidden state, the error-feedback buffer, whose purpose is to eventually release what was withheld.
Research Program
The first piece is the attacker, in two strengths.
The weak version sums observed messages over a window and runs a standard cosine-matching inversion against the sum. The survey A Survey on Gradient Inversion: Attacks, Defenses and Future Directions reports that cosine matching outperforms Euclidean matching, so we use it.
The strong version is trajectory matching. The attacker optimizes dummy data and replays it through the known global models of each round. It simulates the client's error-feedback buffer and compressor, then matches the sequence of sparse or quantized messages coordinate by coordinate. Indices that were not transmitted become constraints too, because they tell the attacker those coordinates were small. The strong version is the analogue of the update-matching objective in Gradient Inversion Attacks Beyond SGD. For hard batch settings, it optionally adds the generative image prior from Gradient Inversion with Generative Image Prior.
The main threat regime is the one in which single-round defenses were originally evaluated: small client datasets with full-batch or few-batch local gradients. Here the cumulative identity is tightest. The minibatch regime with many local steps is a stated stretch, where we expect the attack to weaken. Recent survey evidence already reports that multi-step local training blurs reconstructions.
The second piece is the defenses under this attacker, run at matched communication budgets. We study four.
The first is top-$k$ with error feedback. The second is GradPrune without error feedback, following Evaluating Gradient Inversion Attacks and Defenses in Federated Learning. The third is unbiased magnitude-proportional sparsification from Gradient Sparsification for Communication-Efficient Distributed Optimization. It keeps coordinate $i$ with probability proportional to $|g_i|$, rescales by the inverse probability, and needs no residual. The fourth is mixed-precision quantization with private scales from Mixed Quantization Enabled Federated Learning to Tackle Gradient Inversion Attacks. For the mixed-quantization scheme, we additionally test whether the server can estimate the hidden per-layer scales from many rounds of integer messages. That paper explicitly leaves this question open.
We then add two formally private channels. The first is the randomized quantization mechanism from Randomized Quantization is All You Need for Differential Privacy in Federated Learning, which gets Rényi differential privacy from random level subsampling and rounding rather than added Gaussian noise. That paper never ran an inversion attack. The second is Clip21-SGD2M with its messages top-$k$ compressed. Its noise is applied before release, so the guarantee survives post-processing whatever the residual does.
As an analysis tool, we compute the curvature-based vulnerability proxy from Foreseeing Reconstruction Quality of Gradient Inversion: An Optimization Perspective on the windowed matching loss. If the proxy rises with $K$, it would give clients a cheap pre-transmission warning that their accumulated messages are becoming invertible. That paper reports Spearman correlation up to 0.74 with reconstruction quality on ImageNet for single-round cosine attacks. Whether this transfers to windowed losses is part of what we test.
Baselines
The naive reference points are two. The first is uncompressed, undefended federated averaging, which sets the accuracy ceiling and the leakage floor. Evaluating Gradient Inversion Attacks and Defenses in Federated Learning reports 93.37% CIFAR-10 accuracy and LPIPS 0.45 at batch size 32 in this setting. LPIPS is a perceptual distance, so higher means worse reconstruction. The second is the same training with top-1% error-feedback compression evaluated only by a single-round attack. This is the setting that makes compression look protective.
The strongest existing compression-as-defense method on images is mixed quantization. Its reported numbers are DLG reconstruction PSNR falling from 55.3 to 8.1 at 96.67% MNIST accuracy, with a 4x size reduction and differential-privacy baselines at roughly 78–85% accuracy. We reproduce it on LeNet-5 with 15 clients exactly as described, then attack it with the windowed and scale-estimating attacker. Beating the claim here means one of two things. Either reconstruction PSNR recovers well above 8.1 within a window of rounds that the paper's training run contains, or we show that it does not and say so.
For sparsification, the strongest single-round result is the 90% GradPrune plus InstaHide combination. It reaches LPIPS 0.73 at 86.10% accuracy, and pure GradPrune needs more than 99% pruning, costing about 10% accuracy. Unbiased sparsification converges at a kept fraction of 0.004 on CIFAR-10 GSpar, with no inversion numbers reported. For Clip21-SGD2M and randomized quantization, there is no reported accuracy number in our file for the relevant benchmarks: "no reported result found on Lacuna for Clip21-SGD2M final MNIST accuracy" and "no reported result found on Lacuna for RQM exact EMNIST accuracy". We therefore rerun both ourselves.
Fairness rules apply throughout. All methods share data splits, model, number of rounds, and per-round bit budget, counting index overhead for sparse methods. Each method gets the same hyperparameter search budget, tuned for accuracy only. The attacker gets the same optimization budget and the same priors against every defense.
The key ablation isolates error feedback. We hold the compressor fixed at top-1% and toggle the residual memory on and off. The claim requires that turning error feedback on raises both accuracy and windowed reconstruction quality, while barely changing single-round reconstruction quality.
Why not just…?
Why not just use DP-SGD and stop worrying about residuals? Differential privacy noise added before release is immune to anything the residual does, by post-processing, so for formally private training our attack adds no new risk. That is why Clip21-SGD2M with compression appears on our frontier as a contender rather than a target. The issue is cost. The Federation Strikes Back and the mixed-quantization comparison (78–85% versus 96.67%) document the accuracy loss, and that cost is why compression-only defenses are attractive in the first place. This alternative is a genuine threat to the constructive half of the proposal. If differential privacy at moderate budgets matches deterministic compression's accuracy at equal bits, the conclusion is simply to use it. The frontier experiment is designed so that this would be the finding, reported plainly.
Why not just drop error feedback, so pruned information is really gone? Then compression pays its utility cost in full. The evaluation paper reports that GradPrune effective enough to stop attacks costs about 10% CIFAR-10 accuracy. The ablation above measures that cost directly at matched bits. Unbiased sparsification is the principled version of this alternative, since it needs no residual, and it is included as a main contender rather than dismissed. However, each round it still reveals magnitude-weighted coordinates. Our windowed attacker tests whether those also accumulate across rounds.
Why not just use secure aggregation or homomorphic encryption so the server never sees one client's message? Encryption does block single-client inversion. DictPFL reports that fully encrypted training costs 402–748x more communication and runs 28–65x slower, and recovers efficiency only through a static shared dictionary and pruning. Our question concerns settings that send plaintext compressed updates, which is the setting the compression-defense papers assume. We do not claim to beat cryptography. We claim to correct how plaintext compression is credited.
Why not just sum the messages and run an ordinary attack, with no new attacker? That is our weak attacker, and it is the first thing we run. If summing alone recovers the leakage, the result is simpler and stronger. Trajectory matching is needed only if model drift and minibatch changes across rounds make the plain sum too blurred. The gap between the two attackers is itself a reported result.
Proposed Experiments
The first experiment uses MNIST with LeNet-5 and 15 clients, to replicate mixed quantization. The second uses CIFAR-10 with ResNet-18 at batch sizes 1, 8 and 32, to match the GradPrune evaluation. The third uses EMNIST for the randomized quantization mechanism. An ImageNet subset with Adam local updates checks whether optimizer state and residual state compound. We report reconstruction PSNR, SSIM and LPIPS against window length $K$ from 1 to 50. We also report test accuracy, total bits sent including index overhead, and formal $\epsilon$ wherever a mechanism provides one.
The decisive check is the following. Consider top-1% compression with error feedback, at accuracy within one point of uncompressed training. The single-round attack should show protection near the published LPIPS of 0.73, while the windowed attack should drift back toward the undefended 0.45 within a modest $K$. Over the same window, gradient sparsification without residual, randomized quantization, and compressed Clip21-SGD2M should show reconstruction quality that stays flat as $K$ grows.
If windowed leakage does not return, error feedback is a real defense, and the field gains a cheap one. If it returns for deterministic compressors but not for randomized ones, practitioners get a concrete rule: compression counts toward privacy only when its randomness is never written back into the residual.
References
- Double Momentum and Error Feedback for Clipping with Fast Rates and Differential Privacy
- Gradient Inversion Attacks Beyond SGD
- A Survey on Gradient Inversion: Attacks, Defenses and Future Directions
- Gradient Inversion with Generative Image Prior
- Evaluating Gradient Inversion Attacks and Defenses in Federated Learning
- Gradient Sparsification for Communication-Efficient Distributed Optimization
- Mixed Quantization Enabled Federated Learning to Tackle Gradient Inversion Attacks
- Randomized Quantization is All You Need for Differential Privacy in Federated Learning
- Foreseeing Reconstruction Quality of Gradient Inversion: An Optimization Perspective
- The Federation Strikes Back: A Survey of Federated Learning Privacy Attacks, Defenses, Applications, and Policy Landscape
- DictPFL: Efficient and Private Federated Learning on Encrypted Gradients