FLGUARD: Secure and Private Federated Learning

Thien Duc Nguyen, Phillip Rieger, Hossein Yalame, Helen Möllering, Hossein Fereidooni, Samuel Marchal, Markus Miettinen, Azalia Mirhoseini, Ahmad-Reza Sadeghi, Thomas Schneider, Shaza Zeitouni

Abstract

Federated Learning (FL) is a collaborative machine learning approach allowing participants to jointly train a model without having to share their private, potentially sensitive local datasets with others. Despite its benefits, FL is vulnerable to backdoor attacks, in which an adversary injects manipulated model updates into the model aggregation process so that the resulting model will provide targeted false predictions for specific adversary-chosen inputs. Proposed defenses against backdoor attacks based on detecting and filtering out malicious model updates consider only very specific and limited attacker models, whereas defenses based on differential privacy-inspired noise injection significantly deteriorate the benign performance of the aggregated model. To address these deficiencies, we introduce FLAME, a defense framework that estimates the sufficient amount of noise to be injected to ensure the elimination of backdoors while maintaining the model performance. To minimize the required amount of noise, FLAME uses a model clustering and weight clipping approach. Our evaluation of FLAME on several datasets stemming from application areas including image classification, word prediction, and IoT intrusion detection demonstrates that FLAME removes backdoors effectively with a negligible impact on the benign performance of the models. Furthermore, following the considerable attention that our research has received after its presentation at USENIX SEC 2022, FLAME has become the subject of numerous investigations proposing diverse attack methodologies in an attempt to circumvent it. As a response to these endeavors, we provide a comprehensive analysis of these attempts. Our findings show that these papers (e.g., 3DFed [36]) have not fully comprehended nor correctly employed the fundamental principles underlying FLAME, i.e., our defense mechanism effectively repels these attempted attacks.

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for decentralized machine learning, enabling multiple clients to collaboratively train a shared model while keeping their raw data local. However, this decentralization introduces a significant security risk: backdoor attacks. In such attacks, a malicious client submits poisoned updates that cause the global model to misbehave on specific "triggered" inputs while appearing normal on standard data.

Existing defenses typically rely on either anomaly detection or Differential Privacy (DP). Anomaly detection often struggles with non-IID data distributions and stealthy attackers who constrain their updates to appear benign. Conversely, DP-based methods often require injecting so much noise to guarantee security that the model's primary utility is destroyed. FLAME (Federated Learning Adaptive Model Estimation) bridges this gap by combining filtering, clipping, and noising into a unified, high-performance defense.

The FLAME Defense Framework

FLAME processes model updates through a three-stage pipeline designed to eliminate malicious influence while preserving the main task's accuracy.

Overview of the FLAME defense pipeline: (1) Filtering via clustering, (2) Adaptive weight clipping, and (3) Adaptive noising.

1. Dynamic Model Filtering

Instead of using fixed-cluster methods like K-means, which require knowing the number of attackers in advance, FLAME utilizes HDBSCAN. This density-based clustering algorithm groups updates based on their cosine distance (angular deviation). By treating malicious updates as outliers rather than a distinct group, FLAME can effectively filter out high-impact poisoned models even when the number of attackers is unknown or fluctuating.

Comparison of clustering methods. FLAME effectively identifies and rejects malicious updates as outliers compared to standard K-means or HDBSCAN.

2. Adaptive Weight Clipping

To counter "model replacement" attacks—where an attacker scales up their weights to dominate the global average—FLAME applies $L_2$-norm clipping. Crucially, the clipping bound is adaptive, set to the median of the current round's updates. This ensures the bound tracks the natural convergence of the model, preventing attackers from gaining disproportionate influence.

3. Adaptive Noising

The final stage is the injection of Gaussian noise. FLAME uses a formal noise boundary proof to calculate the minimum amount of noise required to eliminate residual backdoors. Because the filtering and clipping stages have already "cleaned" the updates, the required noise level is significantly lower than standard DP approaches, allowing the model to maintain its performance on the main task.

Evaluation and Key Results

FLAME was evaluated across three diverse application areas: Word Prediction (Reddit dataset), Image Classification (CIFAR-10, MNIST, Tiny-ImageNet), and IoT Intrusion Detection (IoT-Traffic).

  • Backdoor Elimination: In nearly all scenarios, including state-of-the-art attacks like Distributed Backdoor Attacks (DBA), FLAME reduced Backdoor Accuracy (BA) to near 0%.
  • Utility Preservation: The impact on Main Task Accuracy (MA) was negligible, typically less than 0.4%. In comparison, standard DP defenses often saw accuracy drops of 10-20% to achieve similar security levels.
  • Robustness to non-IID Data: FLAME remained effective even when client datasets were highly diverse, a common challenge in real-world FL deployments.

Conclusion

FLAME provides a robust, low-overhead defense against backdoor attacks in Federated Learning. By synergistically combining density-based clustering, adaptive clipping, and optimized noising, it ensures that global models remain both secure and accurate. Furthermore, its resilience against subsequent adversarial attempts (e.g., 3DFed) underscores the fundamental soundness of its design principles.

Summary updated

Abstract

Federated Learning (FL) is a collaborative machine learning approach allowing participants to jointly train a model without having to share their private, potentially sensitive local datasets with others. Despite its benefits, FL is vulnerable to backdoor attacks, in which an adversary injects manipulated model updates into the model aggregation process so that the resulting model will provide targeted false predictions for specific adversary-chosen inputs. Proposed defenses against backdoor attacks based on detecting and filtering out malicious model updates consider only very specific and limited attacker models, whereas defenses based on differential privacy-inspired noise injection significantly deteriorate the benign performance of the aggregated model. To address these deficiencies, we introduce FLAME, a defense framework that estimates the sufficient amount of noise to be injected to ensure the elimination of backdoors while maintaining the model performance. To minimize the required amount of noise, FLAME uses a model clustering and weight clipping approach. Our evaluation of FLAME on several datasets stemming from application areas including image classification, word prediction, and IoT intrusion detection demonstrates that FLAME removes backdoors effectively with a negligible impact on the benign performance of the models. Furthermore, following the considerable attention that our research has received after its presentation at USENIX SEC 2022, FLAME has become the subject of numerous investigations proposing diverse attack methodologies in an attempt to circumvent it. As a response to these endeavors, we provide a comprehensive analysis of these attempts. Our findings show that these papers (e.g., 3DFed [36]) have not fully comprehended nor correctly employed the fundamental principles underlying FLAME, i.e., our defense mechanism effectively repels these attempted attacks.
BibTeX
@article{nguyen2021flguard,
  author = {Thien Duc Nguyen and Phillip Rieger and Hossein Yalame and Helen Möllering and Hossein Fereidooni and Samuel Marchal and Markus Miettinen and Azalia Mirhoseini and Ahmad-Reza Sadeghi and Thomas Schneider and Shaza Zeitouni},
  title = {{FLGUARD: Secure and Private Federated Learning}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2021},
  url = {https://openreview.net/forum?id=4PMzSXqmvQ},
}
Figure