Abstract
Federated learning was introduced to enable machine learning over large decentralized datasets while promising privacy by eliminating the need for data sharing. Despite this, prior work has shown that shared gradients often contain private information and attackers can gain knowledge either through malicious modification of the architecture and parameters or by using optimization to approximate user data from the shared gradients. However, prior data reconstruction attacks have been limited in setting and scale, as most works target FedSGD and limit the attack to single-client gradients. Many of these attacks fail in the more practical setting of FedAVG or if updates are aggregated together using secure aggregation. Data reconstruction becomes significantly more difficult, resulting in limited attack scale and/or decreased reconstruction quality. When both FedAVG and secure aggregation are used, there is no current method that is able to attack multiple clients concurrently in a federated learning setting. In this work we introduce LOKI, an attack that overcomes previous limitations and also breaks the anonymity of aggregation as the leaked data is identifiable and directly tied back to the clients they come from. Our design sends clients customized convolutional parameters, and the weight gradients of data points between clients remain separate even through aggregation. With FedAVG and aggregation across 100 clients, prior work can leak less than 1% of images on MNIST, CIFAR-100, and Tiny ImageNet. Using only a single training round, LOKI is able to leak 76-86% of all data samples.
Introduction: The Privacy Illusion of Federated Learning
Federated Learning (FL) is frequently presented as a robust privacy-preserving framework. By keeping raw data on local devices and only sharing mathematical updates, or "gradients," it aims to mitigate the risks of centralized data storage. To further harden these systems, practitioners often employ two primary defenses: FedAVG, which aggregates multiple local training steps to blur individual signals, and Secure Aggregation (SA), which ensures the server only sees the sum of updates from many clients, theoretically providing anonymity through numbers.
However, LOKI demonstrates that these defenses are insufficient. Previous reconstruction attempts, such as optimization-based attacks, typically fail when batch sizes are large or when updates are aggregated. As shown in the comparison below, LOKI is the first attack to successfully navigate the complexities of FedAVG, secure aggregation, and non-IID data distributions simultaneously.
The LOKI Attack Framework
LOKI (named after the Norse trickster god) operates as a "malicious server" that distributes a Trojan-horse model to unsuspecting clients. The attack is built upon three technical pillars:
1. Model Manipulation and Identity Mapping
The server inserts a custom convolutional layer followed by two fully-connected (FC) layers at the model's entry point. By sending unique convolutional kernels to different clients, the attacker creates "digital fingerprints." These kernels ensure that gradients from Client A are stored in a distinct part of the weight matrix from Client B. This allows the attacker to "de-aggregate" the final sum, identifying exactly which reconstructed image belongs to which user.
2. Overcoming FedAVG with Scaling Factors
A common failure point for prior attacks in FedAVG settings is "gradient washing," where multiple local epochs cause floating-point precision errors. LOKI introduces a Convolutional Scaling Factor (CSF) to prevent model weights from overwhelming the small gradient updates, preserving the signal for reconstruction.
3. Analytical Reconstruction
Unlike optimization attacks that rely on iterative guessing, LOKI utilizes an analytical approach. It directly solves for input pixels by calculating the ratio between weight gradients and bias gradients, as illustrated below.
Experimental Evaluation
The researchers evaluated LOKI across standard benchmarks, including CIFAR-100, Tiny ImageNet, and MNIST. They also utilized OrganAMNIST to test non-IID scenarios, where data distributions vary significantly between clients.
In a single training round involving 100 clients using both FedAVG and Secure Aggregation, LOKI achieved devastating results:
- CIFAR-100: Leaked 82.66% of images (compared to 0.78% by prior state-of-the-art).
- Tiny ImageNet: Leaked 81.28% of images.
- MNIST: Leaked 76.67% of images.
- Non-IID Support: Even without prior knowledge of a client's data distribution, LOKI could learn the distribution over a few rounds, achieving a 62.3% increase in leakage over naive attacks.
Discussion and Conclusion
LOKI proves that aggregation does not equal anonymity. If a server can "tag" updates using customized kernels, the resulting sum is easily reversible. Furthermore, the attack's identifiability allows for the targeting of specific high-value individuals within a network.
While LOKI requires the attacker to control the model architecture, such malicious modules can be easily hidden within standard structures like ResNet. While Differential Privacy (DP) can mitigate the attack, it often does so at the cost of model utility. The findings suggest a critical need for robust model auditing tools to detect architectural manipulations before training begins. LOKI effectively shifts the security paradigm in FL, proving that data remaining on-device is only a defense if the model itself can be trusted.
Summary updated