Inverting Gradients -- How easy is it to break privacy in federated learning?

Jonas Geiping, Hartmut Bauermeister, Hannah Dröge, Michael Moeller
3/31/2020
1,937 citations
cs.CVcs.CRcs.LG
federated

Official code: JonasGeiping/breaching (328 stars, Python, MIT, PyTorch, last commit 2026-01-24). 1 more implementation below.

Abstract

The idea of federated learning is to collaboratively train a neural network on a server. Each user receives the current weights of the network and in turns sends parameter updates (gradients) based on local data.

Show full abstract

This protocol has been designed not only to train neural networks data-efficiently, but also to provide privacy benefits for users, as their input data remains on device and only parameter gradients are shared. But how secure is sharing parameter gradients? Previous attacks have provided a false sense of security, by succeeding only in contrived settings - even for a single image. However, by exploiting a magnitude-invariant loss along with optimization strategies based on adversarial attacks, we show that is is actually possible to faithfully reconstruct images at high resolution from the knowledge of their parameter gradients, and demonstrate that such a break of privacy is possible even for trained deep networks. We analyze the effects of architecture as well as parameters on the difficulty of reconstructing an input image and prove that any input to a fully connected layer can be reconstructed analytically independent of the remaining architecture. Finally we discuss settings encountered in practice and show that even averaging gradients over several iterations or several images does not protect the user's privacy in federated learning applications in computer vision.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
JonasGeiping/breachingOfficial328PythonMIT2026-01-24
JonasGeiping/invertinggradientsCommunity324Jupyter NotebookMIT2023-04-14
PyTorchMIT

Breaching privacy in federated learning scenarios for vision and text

32872PythonFeb 15, 202210 months agoMIT
decentralized-learningfederated-learningmachine-learningprivacy-auditpytorch+1 more
MIT

Algorithms to recover input data from their gradient signal through a neural network

32478Jupyter Notebook, PythonMar 31, 20203 years agoMIT

Similar Papers

Cite this paper

@article{geiping2020inverting,
  title  = {Inverting Gradients -- How easy is it to break privacy in federated learning?},
  author = {Jonas Geiping and Hartmut Bauermeister and Hannah Dröge and Michael Moeller},
  year   = {2020},
  eprint = {2003.14053},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2003.14053}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2003.14053.svg)](https://codeofpaper.com/paper/2003.14053)

Discussion