In federated learning (FL), data does not leave personal devices when they
are jointly training a machine learning model. Instead, these devices share
gradients, parameters, or other model updates, with a central party (e.g., a
company) coordinating the training. Because data never "leaves" personal
devices, FL is often presented as privacy-preserving. Yet, recently it was
shown that this protection is but a thin facade, as even a passive,
honest-but-curious attacker observing gradients can reconstruct data of
individual users contributing to the protocol. In this work, we show a novel
data reconstruction attack which allows an active and dishonest central party
to efficiently extract user data from the received gradients. While prior work
on data reconstruction in FL relies on solving computationally expensive
optimization problems or on making easily detectable modifications to the
shared model's architecture or parameters, in our attack the central party
makes inconspicuous changes to the shared model's weights before sending them
out to the users. We call the modified weights of our attack trap weights. Our
active attacker is able to recover user data perfectly, i.e., with zero error,
even when this data stems from the same class. Recovery comes with near-zero
costs: the attack requires no complex optimization objectives. Instead, our
attacker exploits inherent data leakage from model gradients and simply
amplifies this effect by maliciously altering the weights of the shared model
through the trap weights. These specificities enable our attack to scale to
fully-connected and convolutional deep neural networks trained with large
mini-batches of data. For example, for the high-dimensional vision dataset
ImageNet, we perfectly reconstruct more than 50% of the training data points
from mini-batches as large as 100 data points.