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

This summary covers the paper "FLAME: Taming Backdoors in Federated Learning," presented at the 31st USENIX Security Symposium.

TL;DR

FLAME is a defense framework designed to eliminate backdoor attacks in Federated Learning (FL) without sacrificing the model's overall accuracy. By combining dynamic clustering, adaptive weight clipping, and a mathematically optimized injection of Gaussian noise, FLAME effectively "drowns out" malicious triggers while preserving the utility of the global model.

What Problem Does This Paper Address?

Federated Learning allows multiple clients to train a shared model without ever sharing their raw data. While great for privacy, this decentralization is a goldmine for attackers. In a backdoor attack, a malicious client injects "poisoned" updates so the final model behaves normally on most inputs but fails predictably (e.g., misclassifying a specific stop sign as a speed limit) when a specific "trigger" is present.

Existing defenses fall into two camps, both flawed:

  1. Anomaly Detection: These try to spot "weird" updates. However, they often rely on rigid assumptions about data distribution (IID vs. non-IID) and fail against stealthy attackers who carefully constrain their poisoned updates to look "normal."
  2. Differential Privacy (DP): These add random noise to updates to dilute the attacker's influence. The problem? To guarantee the removal of a backdoor, you usually have to add so much noise that the model becomes useless for its actual task.

FLAME aims to bridge this gap: providing a robust defense that works against generic attackers without destroying model performance.

Methods

FLAME uses a three-stage pipeline to process model updates before aggregation:

  1. Dynamic Model Filtering: Instead of using simple K-means (which requires knowing the number of clusters in advance), FLAME uses HDBSCAN. It clusters updates based on their angular deviation (cosine distance). This allows it to identify and remove high-impact malicious updates as "outliers" even when the number of attackers is unknown or changing.
  2. Adaptive Weight Clipping: To prevent "model replacement" attacks—where an attacker scales up their weights to dominate the average—FLAME clips the $L_2$-norm of all updates. Crucially, the clipping bound is adaptive, set to the median of the current round's updates, ensuring it tracks the natural convergence of the model.
  3. Adaptive Noising: This is the final "cleanup" step. FLAME adds Gaussian noise to the aggregated model. The authors provide a formal noise boundary proof to estimate the minimum amount of noise required to eliminate residual backdoors. Because the previous two steps already "cleaned" the updates, the required noise level is much lower than standard DP approaches, preserving the model's main task accuracy.

Datasets

The authors evaluated FLAME across three diverse application areas:

  • Word Prediction (WP): Using the Reddit dataset (LSTM model).
  • Image Classification (IC): Using CIFAR-10, MNIST, and Tiny-ImageNet (ResNet-18 and CNN models).
  • IoT Intrusion Detection (NIDS): Using IoT-Traffic (GRU model) to detect Mirai botnet activity.

Key Insights and Ideas

  • The "Pigeonhole" Vulnerability: The authors point out that defenses using a fixed number of clusters are easily bypassed if the attacker injects more backdoors than there are clusters. FLAME’s use of density-based clustering (HDBSCAN) solves this by treating attackers as noise/outliers rather than a specific group.
  • Synergy is Key: The "aha moment" is that filtering, clipping, and noising are weak individually but powerful together. Filtering removes the "loud" attackers; clipping limits the "strong" ones; and noising eliminates the "stealthy" ones.
  • Noise Reduction: By cleaning the updates first, FLAME drastically reduces the "sensitivity" of the aggregation function. This allows the use of a much smaller noise scale ($\sigma$) to achieve the same security guarantee, which is why the main task accuracy stays high.

Key Results

  • Backdoor Elimination: In almost all tests (including state-of-the-art attacks like constrain-and-scale and DBA), FLAME reduced the Backdoor Accuracy (BA) to 0% or near-zero.
  • Utility Preservation: The impact on Main Task Accuracy (MA) was negligible, typically reducing accuracy by less than 0.4%. In contrast, standard DP defenses often saw accuracy drops of 10-20% to achieve similar security.
  • Robustness to non-IID Data: Unlike many prior defenses, FLAME remained effective even when clients had highly diverse, non-identically distributed data (a common reality in FL).
  • Privacy-Preserving: The authors also implemented a version of FLAME using Secure Multi-Party Computation (MPC), proving that the defense can be run without the central aggregator ever seeing individual client updates.

Limitations and Future Work

  • Majority Assumption: Like most Byzantine-robust aggregators, FLAME assumes that more than 50% of the participating clients are benign. If attackers control the majority, the median-based clipping and clustering will fail.
  • Computational Overhead: While the standard version is fast, the private (MPC) version introduces significant latency (e.g., ~6 hours for a training iteration on the Reddit dataset).
  • Deep Learning Proofs: While the noise boundary is formally proven for linear models, the extension to Deep Neural Networks (DNNs) is supported by strong empirical evidence rather than a complete end-to-end formal proof, which remains an open challenge in the field.

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},
}

Loading related content...

Figure