Mitigating Malicious Attacks in Federated Learning via Confidence-aware Defense

Qilei Li, Ahmed M. AbdelmoniemarXiv 2024

TL;DR

This paper introduces Confidence-Aware Defense (CAD), a novel framework for Federated Learning (FL) that combats malicious data and model poisoning attacks. By leveraging the confidence scores of local models, CAD effectively identifies and mitigates unreliable client updates, significantly enhancing the robustness and accuracy of the global model, even under severe attack conditions.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple clients to collaboratively train a global model without sharing their private data, offering a significant privacy advantage. However, this distributed nature makes FL vulnerable to malicious attacks from compromised clients. These attacks, broadly categorized as data poisoning (corrupting local data) and model poisoning (manipulating model updates), can severely degrade the global model's performance and lead to incorrect predictions. Existing defense mechanisms often struggle with unseen attack types, assume moderate attack intensity (e.g., <25% malicious clients), and can fail when these assumptions are violated. This paper addresses the critical need for a robust and versatile defense that can effectively handle various attack types and intensities, even in scenarios with high proportions of malicious clients.

Methods

The core of the proposed solution is the Confidence-Aware Defense (CAD) framework, which operates in five key steps:

  1. Global Model Initialization & Distribution: The process begins with initializing a global model and distributing it to all participating clients.
  2. Local Training with Confidence Awareness: Each client trains a local model on its private dataset. Crucially, during this phase, clients also estimate the confidence scores of their local model's predictions. The paper utilizes a formula derived from Super Loss (Castells et al., 2020) to calculate these confidence scores, focusing on the uncertainty of predictions rather than using it as a regularization term. The insight here is that malicious attacks, regardless of type, tend to disrupt a model's convergence, leading to increased uncertainty in its predictions.
  3. Client Update & Confidence Score Upload: Clients send their updated local models along with their associated confidence scores to the central server.
  4. Confidence Clustering for Malicious Client Detection: The server normalizes the confidence scores from all clients using min-max scaling. It then employs k-means clustering (with k=2) on these normalized scores to identify two groups: those with high confidence (likely honest) and those with low confidence (potentially malicious). Clients are classified as honest if their normalized confidence score is closer to the higher centroid and malicious if it's closer to the lower centroid.
  5. Re-weighted Aggregation: Instead of simply discarding malicious clients, CAD uses a re-weighting strategy. Honest clients' contributions are weighted based on both their original data lengths and their normalized confidence scores. This ensures that more reliable clients (those with higher confidence) have a greater influence on the final global model, even when the number of honest clients is small.

Datasets

The paper evaluates the proposed CAD model on several standard benchmarks:

  • CIFAR-10: Used with VGG-11 and AlexNet models.
  • MNIST: Used with a Multi-Layer Perceptron (MLP).
  • Fashion-MNIST: Used with an AlexNet model.

The datasets were partitioned using a heterogeneous strategy to simulate non-IID (Non-Independent and Identically Distributed) local data, controlled by a Dirichlet distribution parameter ($\alpha$). This setup aims to mimic real-world scenarios where data distributions vary significantly across clients.

Key Insights and Ideas

  • Malicious Attacks Induce Uncertainty: The fundamental insight is that malicious attacks, whether data or model poisoning, disrupt a model's learning process, leading to increased uncertainty in its predictions. This uncertainty is a universal indicator of a potentially compromised client, irrespective of the specific attack vector.
  • Confidence Scores as a Universal Detector: By quantifying this uncertainty through confidence scores, CAD provides a unified mechanism to detect a wide range of malicious activities, overcoming the limitations of defenses tailored to specific attack types.
  • Re-weighting for Resilience: Even when a significant portion of clients are malicious, CAD's re-weighting strategy allows the aggregation process to prioritize the contributions of the few remaining honest clients, significantly boosting robustness. This is particularly effective in "severe" and "extreme" attack scenarios.
  • Simplicity and Effectiveness: The proposed CAD framework is described as "simple yet effective," relying on readily available confidence scores and standard clustering techniques, making it potentially easier to implement and integrate into existing FL systems.

Key Results

The experimental results demonstrate the effectiveness of CAD across various scenarios:

  • Robustness to Attack Intensity: Under moderate attacks (25% malicious clients), CAD achieves the highest accuracy. As attack intensity increases to severe (50%) and extreme (75%), while other methods significantly degrade, CAD consistently maintains high accuracy and robustness. For instance, under severe attacks, CAD achieved accuracies in the mid-60s, while FedAvg often dropped to the low 20s or even lower.
  • Versatility Across Models and Datasets: CAD shows superior performance across different models (VGG-11, AlexNet, MLP) and datasets (CIFAR-10, MNIST, Fashion-MNIST), outperforming baseline defenses like FedAvg, TrimMean, AFA, FLDetector, and FedRoLA.
  • Effective Malicious Client Detection: Figure 4 shows that CAD accurately detects malicious clients, achieving high True Positive Rates (TPR) and low False Positive Rates (FPR) early in training, leading to significant performance improvements.
  • Impact of Re-weighting: Figure 5 highlights that the re-weighting operation consistently enhances model accuracy, especially under higher attack rates and for attacks like LIE and MinSum, demonstrating the importance of prioritizing high-confidence honest clients.

Limitations and Future Work

  • Computational Overhead: While described as "simple," the process of calculating confidence scores and performing clustering adds computational overhead compared to a basic FedAvg. The paper doesn't explicitly quantify this overhead.
  • Assumption of Confidence Degradation: The core assumption is that malicious attacks always degrade confidence. While empirically supported, edge cases or highly sophisticated attacks that mimic high confidence might exist.
  • Future Work: The paper suggests that CAD can be applied to various tasks and implicitly hints at further exploration of its adaptability. The authors also mention that their method is "comprehensively effective for both model poisoning and data poisoning attacks," implying that further research could explore its performance against even more diverse and complex attack vectors. The effectiveness of the re-weighting mechanism at higher attack rates also suggests potential for further optimization in extreme scenarios.

Summary updated

Abstract

Federated Learning (FL) is a distributed machine learning diagram that enables multiple clients to collaboratively train a global model without sharing their private local data. However, FL systems are vulnerable to attacks that are happening in malicious clients through data poisoning and model poisoning, which can deteriorate the performance of aggregated global model. Existing defense methods typically focus on mitigating specific types of poisoning and are often ineffective against unseen types of attack. These methods also assume an attack happened moderately while is not always holds true in real. Consequently, these methods can significantly fail in terms of accuracy and robustness when detecting and addressing updates from attacked malicious clients. To overcome these challenges, in this work, we propose a simple yet effective framework to detect malicious clients, namely Confidence-Aware Defense (CAD), that utilizes the confidence scores of local models as criteria to evaluate the reliability of local updates. Our key insight is that malicious attacks, regardless of attack type, will cause the model to deviate from its previous state, thus leading to increased uncertainty when making predictions. Therefore, CAD is comprehensively effective for both model poisoning and data poisoning attacks by accurately identifying and mitigating potential malicious updates, even under varying degrees of attacks and data heterogeneity. Experimental results demonstrate that our method significantly enhances the robustness of FL systems against various types of attacks across various scenarios by achieving higher model accuracy and stability.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10 · Cifar10 · VGG-11, LIEConfidence-aware defense (\method{abbr})Accuracy64.44+51.5 vs baselineattack=LIE · backbone=VGG-11 · attack-severity=severe
Source quote
L771: \method{abbr} (Ours) │ 64.00 │ 64.75 │ 64.44 │ 64.27
FashionMNIST · Fashion MNIST · AlexNet, LIEConfidence-aware defense (\method{abbr})Accuracy87.86+72.2 vs baselineattack=LIE · backbone=AlexNet · attack-severity=severe
Source quote
L785: \method{abbr} (Ours) │ 88.43 │ 88.32 │ 87.86 │ 88.79
MNIST · MLP), LIEConfidence-aware defense (\method{abbr})Accuracy97.08+44.63 vs baselineattack=LIE · backbone=MLP · attack-severity=severe
Source quote
L792: \method{abbr} (Ours) │ 97.87 │ 97.73 │ 97.08 │ 97.83
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10 · Cifar10 · VGG-11, LIEFedAvg baselineAccuracy12.94attack=LIE · backbone=VGG-11 · attack-severity=severe
Source quote
L766: FedAvg │ 19.02 │ 21.40 │ 12.94 │ 62.91
FashionMNIST · Fashion MNIST · AlexNet, LIEFedAvg baselineAccuracy15.66attack=LIE · backbone=AlexNet · attack-severity=severe
Source quote
L780: FedAvg │ 78.71 │ 74.58 │ 15.66 │ 88.06
MNIST · MLP), LIEFedAvg baselineAccuracy52.45attack=LIE · backbone=MLP · attack-severity=severe
Source quote
L787: FedAvg │ 95.81 │ 94.47 │ 52.45 │ 97.36
BibTeX
@misc{li2024mitigating,
  author = {Qilei Li and Ahmed M. Abdelmoniem},
  title = {{Mitigating Malicious Attacks in Federated Learning via Confidence-aware Defense}},
  year = {2024},
  eprint = {2408.02813},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.02813},
}
Figure