Robust Knowledge Distillation in Federated Learning: Counteracting Backdoor Attacks

Ebtisaam Alharbi, Leandro Soriano Marcolino, Qiang Ni, Antonios Gouglidis

This blog-style summary explores the paper "Robust Knowledge Distillation in Federated Learning: Counteracting Backdoor Attacks," which introduces a novel framework to secure collaborative machine learning.

TL;DR

The authors propose Robust Knowledge Distillation (RKD), a defense mechanism for Federated Learning that identifies and filters out malicious "backdoor" updates using a combination of cosine similarity clustering and model selection. Unlike previous defenses, RKD remains highly effective in real-world scenarios where client data is diverse (Non-IID) and a large portion of participants are malicious.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple parties to train a shared model without ever exchanging their raw data, making it a cornerstone of privacy-preserving AI. However, this decentralized nature makes it vulnerable to backdoor attacks. In these attacks, malicious clients inject "triggers" (like a specific pixel pattern in an image) into their local training process. The resulting global model behaves normally on clean data but produces incorrect, malicious outputs whenever it sees the trigger.

Existing defenses often fail because they rely on two fragile assumptions:

  1. Data is IID: They assume all clients have similar data distributions. In reality, client data is usually "Non-IID" (heterogeneous), which makes malicious updates look like legitimate variations.
  2. Low Malicious Ratio: They assume only a tiny fraction of clients are bad.

The authors tackle the challenge of maintaining model integrity even when data is highly heterogeneous and up to 60% of the clients are compromised.

Methods

RKD introduces a multi-tiered defense strategy integrated into the server-side aggregation process:

  1. Automated Clustering via Dimensionality Reduction: Clustering high-dimensional model parameters is computationally expensive and prone to the "curse of dimensionality." RKD bypasses this by calculating the cosine similarity between each client's update and the current global model. It then applies HDBSCAN (a density-based clustering algorithm) to these 1D similarity scores to isolate a "benign" cluster from malicious outliers.
  2. Robust Model Selection: To catch subtle attackers who mimic benign behavior, RKD calculates the element-wise median of the models in the benign cluster. It then selects only the models closest to this median (using the L1 norm) to form a "trustworthy ensemble."
  3. Knowledge Distillation (KD): Instead of simple averaging, RKD uses the selected ensemble to "teach" a new global model using a small, unlabeled public dataset. This process smooths out the variations caused by Non-IID data and prevents brittle backdoor triggers from being transferred to the final model.
  4. Stochastic Weight Averaging (SWA): The framework uses SWA during the distillation phase to stabilize training and improve the model's ability to generalize.

The framework also offers an Exclusion Strategy (completely blocking malicious clients) or a Perturbation Strategy (sending malicious clients a noisy model to hide the fact that they've been detected).

The RKD framework uses this automated clustering algorithm to distinguish between benign and malicious updates based on their angular alignment with the global model.

Datasets

The authors evaluated RKD using three standard image classification benchmarks, modified to simulate varying degrees of data heterogeneity using a Dirichlet distribution:

  • CIFAR-10: 60,000 color images across 10 classes.
  • EMNIST: Over 800,000 handwritten characters and digits across 62 classes.
  • Fashion-MNIST: 70,000 grayscale images of clothing products.

Key Insights and Ideas

  • Similarity as a Shield: The most powerful insight is that malicious intent often manifests as an "Angular Deviation." By focusing on the direction of the update relative to the global model rather than the raw parameter values, RKD can spot attackers even when they try to hide their tracks by scaling their weights.
  • The Median is a Strong Filter: Using the element-wise median for model selection is a highly effective way to mitigate "Magnitude Deviation" attacks, where attackers try to overpower the global average.
  • Distillation as a Security Feature: While Knowledge Distillation is usually used for model compression or handling Non-IID data, this paper highlights its utility as a security filter. The distillation process acts as a "bottleneck" that discards the specific, high-frequency patterns required for a backdoor trigger to work.

Key Results

RKD was tested against five sophisticated attack types (including A3FL, DBA, and TSBA) and outperformed seven state-of-the-art defenses (like FLAME, RLR, and FoolsGold).

  • Robustness: RKD maintained an Attack Success Rate (ASR) below 17% even when 60% of clients were malicious. In contrast, many baseline methods saw ASRs climb toward 100% in similar settings.
  • Accuracy: It maintained a Main Task Accuracy (MTA) above 80% across most scenarios, proving that security doesn't have to come at the cost of performance.
  • Efficiency: Despite the extra steps, RKD is scalable. Its defense time (~42 seconds) was significantly faster than other distillation-based methods like FedDF (~141s) and FedBE (~198s).

Limitations and Future Work

  • Public Data Dependency: RKD requires a small, unlabeled public dataset (about 16% of the total training data size) for the distillation process. In some highly specialized domains (e.g., rare medical imaging), finding such a dataset might be difficult.
  • Computational Cost: While faster than other KD methods, it is still more computationally intensive than simple aggregation methods like FedAvg or RLR.
  • Future Directions: The authors suggest exploring ways to perform robust distillation without relying on public datasets and further optimizing the clustering logic for massive-scale federated networks.

Summary updated

BibTeX
@inproceedings{alharbi2025robust,
  author = {Ebtisaam Alharbi and Leandro Soriano Marcolino and Qiang Ni and Antonios Gouglidis},
  title = {{Robust Knowledge Distillation in Federated Learning: Counteracting Backdoor Attacks}},
  booktitle = {SaTML},
  year = {2025},
  doi = {10.1109/satml64287.2025.00018},
}
Figure