RFLBAT: A Robust Federated Learning Algorithm against Backdoor Attack

Yongkang Wang, Dihua Zhai, Yufeng Zhan, Yuanqing XiaarXiv 2022 · OpenReview

TL;DR

This paper introduces RFLBAT, a novel federated learning algorithm designed to defend against sophisticated backdoor attacks. By leveraging Principal Component Analysis (PCA) and K-Means clustering, RFLBAT effectively distinguishes malicious client updates from benign ones, even under challenging Non-IID data distributions and without prior knowledge of the number of attackers.

What Problem Does This Paper Address?

Federated Learning (FL) enables collaborative model training across numerous decentralized devices while preserving data privacy. However, this distributed nature makes FL vulnerable to backdoor attacks, where malicious clients inject poisoned data to manipulate the global model's behavior. Existing defense mechanisms often rely on strong assumptions, such as a limited number of attackers or independent and identically distributed (IID) data, which don't hold in real-world scenarios. This paper tackles the critical challenge of defending FL against backdoor attacks when the number of attackers is unknown and data distributions are non-IID, aiming to provide a robust solution without requiring auxiliary information.

Methods

RFLBAT employs a two-pronged approach on the central server to identify and mitigate backdoor attacks:

  1. Dimensionality Reduction with PCA: The core idea is that malicious and benign client gradients, when projected into a lower-dimensional space using PCA, will exhibit distinct clustering patterns. PCA helps to reveal these differences that might be obscured in the high-dimensional gradient space.
  2. Clustering with K-Means and Cosine Similarity: After dimensionality reduction, K-Means clustering is used to group similar gradient updates. RFLBAT then leverages cosine similarity to measure the relationships between client gradients within clusters. This allows it to identify a cluster that is most likely to contain benign gradients, effectively filtering out malicious ones. The algorithm iteratively refines this selection by excluding outliers based on distance and similarity thresholds.

Datasets

The proposed RFLBAT algorithm was evaluated on three public datasets:

  • MNIST: A dataset for image classification, commonly used in FL research.
  • FEMNIST: Another image classification dataset, designed to represent a more heterogeneous federated setting.
  • Amazon Fine Food Reviews: A dataset for sentiment analysis.

These datasets were used with various machine learning models, including Logistic Regression (LR), Convolutional Neural Networks (CNN), and Long Short-Term Memory (LSTM) networks.

Key Insights and Ideas

  • Gradient Signatures: The paper's central insight is that malicious and benign client gradients, even when subtly different, leave distinct "signatures" in a reduced dimensional space that can be exploited for detection.
  • PCA as a Preprocessor: PCA is crucial for making the subtle differences between malicious and benign gradients apparent, enabling effective clustering.
  • Cosine Similarity for Robustness: Using cosine similarity for gradient comparison, rather than Euclidean distance, proves more effective in identifying benign clusters, especially under Non-IID conditions.
  • No Prior Knowledge Needed: A significant advantage is RFLBAT's ability to function without knowing the exact number of attackers or their distribution, making it more practical for real-world FL deployments.

Key Results

RFLBAT demonstrated strong performance across various attack scenarios:

  • Robustness to Attacker Numbers (DNA): RFLBAT consistently outperformed existing robust aggregation algorithms, maintaining high training accuracy and low attack rates even when up to 90% of clients were malicious.
  • Effectiveness in Non-IID Settings (DNS): The algorithm showed resilience to Non-IID data distributions, a common challenge in FL, effectively defending against attacks where other methods failed.
  • Scalability with Client Numbers (DNC): RFLBAT remained effective even with a large number of participating clients, showing minimal impact on attack rate and training accuracy.
  • Defense against Distributed Attacks (DBA): The proposed method successfully defended against distributed backdoor attacks, a more potent threat, by effectively identifying and filtering malicious gradients.
  • Performance Comparison: In most scenarios, RFLBAT achieved near-zero attack rates while maintaining high training accuracy, significantly outperforming baseline methods like FoolsGold, Multi-Krum, GeoMed, and RFA.

Limitations and Future Work

  • Slightly Lower Training Accuracy in Extreme Cases: In some Non-IID scenarios, RFLBAT's training accuracy was slightly lower than other methods. The authors attribute this to the algorithm potentially excluding some benign gradients to ensure robustness, especially when the optimal cluster might not contain all benign clients.
  • Future Work: The paper suggests that further research could explore more sophisticated clustering techniques or adaptive thresholding to potentially improve training accuracy while maintaining robustness. The authors also hint at investigating more complex attack vectors and their impact on RFLBAT.

Summary updated

Abstract

Federated learning (FL) is a distributed machine learning paradigm where enormous scattered clients (e.g. mobile devices or IoT devices) collaboratively train a model under the orchestration of a central server (e.g. service provider), while keeping the training data decentralized. Unfortunately, FL is susceptible to a variety of attacks, including backdoor attack, which is made substantially worse in the presence of malicious attackers. Most of algorithms usually assume that the malicious at tackers no more than benign clients or the data distribution is independent identically distribution (IID). However, no one knows the number of malicious attackers and the data distribution is usually non identically distribution (Non-IID). In this paper, we propose RFLBAT which utilizes principal component analysis (PCA) technique and Kmeans clustering algorithm to defend against backdoor attack. Our algorithm RFLBAT does not bound the number of backdoored attackers and the data distribution, and requires no auxiliary information outside of the learning process. We conduct extensive experiments including a variety of backdoor attack types. Experimental results demonstrate that RFLBAT outperforms the existing state-of-the-art algorithms and is able to resist various backdoor attack scenarios including different number of attackers (DNA), different Non-IID scenarios (DNS), different number of clients (DNC) and distributed backdoor attack (DBA).
BibTeX
@misc{wang2022rflbat,
  author = {Yongkang Wang and Dihua Zhai and Yufeng Zhan and Yuanqing Xia},
  title = {{RFLBAT: A Robust Federated Learning Algorithm against Backdoor Attack}},
  year = {2022},
  eprint = {2201.03772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.03772},
}
Figure