Drift Correction Removes the Multi-Step Privacy Shield in Federated Learning

In federated learning, many devices train a shared model without sending their raw data. Each device runs several local training steps and uploads only the resulting change to the model. A common belief is that these local steps blur the data enough that an eavesdropping server cannot reconstruct the training images from the uploaded change. Drift-correction methods such as SCAFFOLD are the standard fix when devices hold very different data, and they work by steering each device's local steps back toward the global direction. We argue that this steering has a privacy cost nobody has measured. It pins the local trajectory to a path the server can predict, so the uploaded change becomes close to a plain sum of gradients evaluated at points the server already knows. That is the setting in which reconstruction attacks work best.

The proposal makes and tests that claim. It then builds the defense the claim implies. In the common variant of SCAFFOLD, the server can recompute the global correction term from the aggregate model update alone. Drift-corrected training therefore needs exactly one protected vector per client per round. We aggregate that vector under threshold homomorphic encryption, which lets the server add encrypted vectors without being able to decrypt any single one. We calibrate the noise that approximate encryption already requires at decryption so that it also serves as the differential-privacy noise. We then ask whether this recovers the accuracy of plaintext SCAFFOLD at privacy levels where per-client noise, as in DP-SCAFFOLD, gives up 10% or more.

Core Claim

A brief definition of SCAFFOLD first. Each client $i$ keeps a "control variate" $c_i$, a running estimate of its own average gradient. The server keeps $c$, the average of all clients' estimates. Each local step on minibatch $b_k$ moves the client's weights $y_k$ by $y_{k+1} = y_k - \eta\,(g_i(y_k; b_k) - c_i + c)$, where $g_i$ is the client's stochastic gradient and $\eta$ the local step size (SCAFFOLD). Summing over $K$ steps from the global model $x$ gives

$$\Delta y_i = -\eta \sum_{k=0}^{K-1} g_i(y_k; b_k) \;-\; K\eta\,(c - c_i).$$

The correction term is known to any server that broadcasts $c$ and has seen the client's earlier updates. In option II of SCAFFOLD, $c_i$ is a deterministic function of past uploads. Subtracting the correction leaves $s_i = \sum_k g_i(y_k; b_k)$ exactly.

The key point is about the path. Under drift correction, $g_i - c_i$ is small, so $y_k \approx x - k\eta c$: a sequence of points the server can compute without knowing the data. Under plain federated averaging (FedAvg), the path bends toward the client's own local minimum, so the evaluation points themselves depend on the private data. That compounding is exactly what SoK: Gradient Leakage in Federated Learning identifies as the natural obfuscation from multiple local steps.

Our claim is that drift correction largely removes this compounding. A SCAFFOLD update then behaves like a large-batch gradient taken at known points. It should be more invertible than a FedAvg update with the same number of steps and samples, and invertible by a cheaper attack that does not need to differentiate through the client's entire training run. Option I of SCAFFOLD is worse still: it uploads a fresh full-batch gradient at $x$, which is a single-step leak. We include it as a sanity anchor.

The constructive half follows from the same algebra. In option II, the change in a client's control variate is $\Delta c_i = -c - \Delta y_i/(K\eta)$. The sum of these changes over the participating set $S$ is therefore computable from $\sum_{i\in S}\Delta y_i$, the same implicit accumulation idea AdaBest uses to avoid broadcasting control variates. No individual $c_i$ ever needs to leave the device, and the doubled uplink of SCAFFOLD disappears. Drift correction and secure aggregation are therefore compatible at no extra leakage channel. The question becomes how much noise the aggregate needs.

Relation to Prior Work

Three papers motivate the leakage half by showing that optimizer structure does not hide data, but none touches drift correction. Data Leakage in Federated Averaging simulates the client's multi-step FedAvg training by automatic differentiation and recovers over 45% of a client's FEMNIST images after 100 local steps. Gradient Inversion Attacks Beyond SGD inverts Adam and RMSProp updates up to batch size 16 and 8 local steps, assuming the attacker knows the optimizer state. We reuse the simulation-based attack as the strongest attack baseline. Our contribution differs in two ways: we analyze the control-variate correction, which neither paper evaluates, and we exploit the predictable path rather than paying to unroll the trajectory.

The SoK paper plays a constraining role. Its finding that local steps, high resolution and 2-bit quantization are natural barriers is exactly what we expect to fail under drift correction. If our path-predictability measurement shows SCAFFOLD paths are not much more predictable than FedAvg paths, the SoK's view survives for drift-corrected training, and we will report that.

On the defense side, DP-SCAFFOLD adds clipping and Gaussian noise on each client and shows drift correction still helps under local privacy noise. Its error grows with model dimension, and it uses no cryptography. We keep its clipping but move the noise to the decrypted aggregate.

Three papers on encryption and secure aggregation supply method pieces. Revisiting ML Training under Fully Homomorphic Encryption avoids clipping under encryption with a log-barrier objective, reducing circuit depth from 24 to 9. In our design, clipping happens on the client before encryption, so the server only performs additions. This sidesteps that depth problem entirely and is why our approach is not limited to convex models. Securing Approximate Homomorphic Encryption Using Differential Privacy shows that approximate encryption leaks the secret key through decryption noise unless Gaussian noise is added after decryption. We make that mandatory noise do double duty as the privacy noise for the aggregate. Securing Secure Aggregation shows that partial participation lets a server isolate individual updates within $O(N)$ rounds, and it proposes fixed client batches as a fix. We test the tension that fixed batches skew client sampling on non-IID data, which is precisely the bias control variates are built to correct. CLOVER solves multi-round leakage with coded computation but supports no local steps. It frames the problem; we do not compete with it directly.

Research Program

The first component is a leakage analysis. For SCAFFOLD option II, FedAvg, and SCAFFOLD option I, we will measure path deviation, defined as the distance between the client's actual local path and the server-predictable path $x - k\eta c$, normalized by the path length. We will do this across different degrees of client heterogeneity. We will then implement a correction-stripping attack. It subtracts the known correction, treats $s_i$ as a sum of minibatch gradients at the predicted points, and inverts it with the update-matching cosine loss and analytic label recovery from the "Beyond SGD" paper. We compare it against the simulation-based FedAvg attack on the same updates. The analysis will relate path deviation to reconstruction success. The prediction is that SCAFFOLD's advantage to the attacker grows with heterogeneity, because that is where FedAvg paths bend most and SCAFFOLD paths bend least.

The second component is the defense system. Clients clip their update to norm $C$ and encrypt it under threshold CKKS, the encryption scheme for approximate real-number arithmetic. The server sums the ciphertexts. A threshold of clients jointly decrypt, each adding a share of Gaussian noise. The total noise must at least meet the key-recovery bound from the IACR paper, and is otherwise set by client-level Rényi differential-privacy accounting. The server recomputes $c$ from the noisy aggregate. Noise in $c$ is post-processing and costs no extra privacy budget, but it feeds back into every client's local steps. We will study how this noise in the correction term affects convergence, which DP-SCAFFOLD's analysis does not cover, because its noise enters per step rather than through the aggregate.

The third component is a partitioning arm for the regime with weak or no privacy noise. Here we combine fixed client batches with SCAFFOLD and test whether the control variates remove the accuracy cost that fixed batches impose on non-IID data.

Baselines

The do-nothing reference is plaintext FedAvg and plaintext SCAFFOLD, with no protection, attacked by both attacks. This anchors utility and gives the maximum leakage. The file reports SCAFFOLD at 84.2% neural network test accuracy on EMNIST versus 82.8% for FedAvg (SCAFFOLD). Our reproduction must land close to these figures before any comparison counts.

The strongest attack baseline is the SimUpdate attack with the epoch-order-invariant prior from Data Leakage in Federated Averaging, which recovers over 45% of FEMNIST images at 10 epochs and 100 steps. We run it on SCAFFOLD updates by adding the known correction inside its simulation. It gets the same optimization budget, measured in attack iterations and wall-clock time, as our correction-stripping attack, and we use its success criterion for recovered images. Our attack beats it if it recovers more images, or matches it at a fraction of the cost, on SCAFFOLD updates.

The strongest defense competitor is DP-SCAFFOLD with its warm start. It is the only existing method that handles both drift and formal privacy. The file reports a 10–20% accuracy gain over DP-FedAvg on synthetic data and a roughly 10% gap on MNIST with neural networks. No reported FEMNIST accuracy for DP-SCAFFOLD was found on Lacuna, so we will reproduce it ourselves. It runs with the same model, the same client-level $(\epsilon, \delta)$, the same number of rounds, and the same hyperparameter search budget for clipping norm and step sizes. Our system beats it if it achieves higher test accuracy at equal $\epsilon$, or reaches DP-SCAFFOLD's accuracy at a smaller $\epsilon$.

A second defense competitor is FedAvg with the same encrypted, aggregate-noised pipeline, which isolates whether drift correction still pays once the noise is centralized.

Two ablations isolate the key ingredients. The first replaces encryption with additive secret-sharing masks, standard secure aggregation, carrying identical noise. This separates the contribution of the cryptographic primitive from that of noise placement. The second ablation removes the recomputation of $c$ and instead uploads $\Delta c_i$ under encryption. This tests whether the single-vector design costs anything in accuracy.

Why not just…?

Why not just rely on multiple local steps as a natural shield? The simulation attack already recovers over 45% of FEMNIST images through 100 FedAvg steps (Data Leakage in Federated Averaging). Our core claim is that drift correction weakens this shield further. The path-deviation and attack experiments test that directly, and a null result would itself be worth publishing.

Why not just quantize updates to 2 bits? This is a real threat. The SoK reports that 2-bit quantization blocks current attacks with under 5% accuracy loss (SoK), but that was measured on FedAvg, with no formal guarantee. We will run 2-bit SCAFFOLD and attack it with the correction-stripping attack. If quantization both preserves SCAFFOLD's accuracy and defeats our attack, the cryptographic arm is justified only by its formal guarantee, and we will say so.

Why not just use per-client noise as in DP-SCAFFOLD? Per-client noise is added by every client, so the total noise in the average is far larger than one noise draw on the sum, and it grows with model size. The head-to-head comparison at equal $\epsilon$ settles whether moving the noise to the aggregate matters for drift-corrected training.

Why not just use secure aggregation instead of homomorphic encryption? For the server's view, the two are equivalent, and our masking ablation is designed to show that. What encryption adds is that the noise CKKS already requires at decryption is reused as privacy noise. Where it is cheaper, standard masking with distributed noise is an acceptable substitute, and we will report the communication and compute costs of both.

Why not just add privacy noise and skip fixed client batches? With properly calibrated client-level noise, the guarantee survives the round-to-round differencing that isolates individual updates, so partitioning is redundant there. The partitioning arm is therefore scoped to the weak-noise regime that deployments actually use, and we will show where on the $\epsilon$ axis it stops mattering.

Proposed Experiments

We will use FEMNIST with its natural writer split and CIFAR-100 with label-skewed partitions at several heterogeneity levels. EMNIST at 0% similarity, where FedAvg fails to reach target accuracy within 1,000 rounds and SCAFFOLD needs 77, serves as the drift stress test. Leakage metrics are the fraction of recovered images under the FedAvg-leakage criterion, plus PSNR and LPIPS. Utility metrics are test accuracy and rounds to target accuracy. Privacy is reported as client-level $\epsilon$ at fixed $\delta$, and systems cost as uplink bytes and client encryption time.

The decisive first check is whether correction-stripping on SCAFFOLD updates recovers clearly more images than the simulation attack recovers from FedAvg updates at matched $K$, batch size and heterogeneity. This must hold with the gap tracking measured path deviation. The 4-client aggregate result, about 30% of CIFAR-100 images recovered under secure aggregation, gives the small-group regime we will repeat for SCAFFOLD. The decisive second check is the privacy-utility curve: accuracy as a function of $\epsilon$ for our system, DP-SCAFFOLD and aggregate-noised FedAvg on FEMNIST and CIFAR-100. The claim holds only if our curve dominates DP-SCAFFOLD's, and if the masking ablation shows how much of the gain comes from noise placement versus encryption. The third check is whether SCAFFOLD with fixed client batches stays within the accuracy of SCAFFOLD with random sampling on label-skewed CIFAR-100, while FedAvg with fixed batches does not.