Bayesian Framework for Gradient Leakage
Mislav Balunović, Dimitar I. Dimitrov, Robin Staab, Martin Vechev Department of Computer Science, ETH Zürich
We propose a theoretical framework for analyzing gradient leakage in federated learning, and show that existing attacks are suboptimal. We further show that existing defenses are broken.
Bayes optimal adversary as an optimization problem
Evaluating existing defenses
We want to find the adversary that minimizes the adversarial risk. Using Bayes rule, we can transform the problem of finding the Bayes optimal adversary into an optimization problem. The optimal adversary finds the δ-ball with the highest integral of log p(g|x) + log p(x).
We evaluate three recent defenses – Soteria, ATS and PRECODE – on the CIFAR-10 dataset, and show that they are broken.
In Federated Learning, clients compute updates on their own devices, send the updates to a central server which aggregates them and updates the global model.
However, it is possible to reconstruct the original input from shared gradient updates.
min ‖∇θL(hθ(x), y) − g‖ s.t. x ∈ 𝒳 x∈𝒳
PSNR obtained by reconstruction attacks on ATS and Soteria during the first 1000 steps and 10 epochs.
Images obtained by running attacks on Soteria, ATS, and PRECODE on the CIFAR-10 dataset after the 10th training step.
Approximating Bayes optimal adversary
We can approximate the Bayes optimal adversary by performing gradient ascent on the objective, and sampling k points uniformly from the δ-ball around the current point.
Our attack obtains much higher PSNR than the state-of-the-art attack, indicating that existing attacks are suboptimal.
Existing attacks can be seen as special cases of the Bayes optimal adversary, using different priors and conditionals.
• We show that existing defenses are broken early in training. • We show that existing attacks are suboptimal, and that the Bayes optimal adversary achieves much better results when it knows the probability distribution of the gradients.
The adversary tries to find an image that produces a similar gradient to the one that was sent to the server.
The adversary can only observe the gradient g and tries to reconstruct the input x that produced g. We define the risk of the adversary as the expected loss of the adversary over the joint distribution of inputs and gradients.
Bayes optimal adversary compared to other adversaries
We compare the Bayes optimal adversary with three variants of Inverting Gradients attack, based on ℓ₂, ℓ₁, and cosine distance.
We implement the Bayes optimal adversary and use it to attack three recent defenses.