A Bijection-backdoor-based Adversarial Examples Defense Method in Federated Learning

Yongfei Li, Yuanbo Guo, Fang Chen, Yifeng Wang, Qingli Chen, Yongjin HuResearch Square 2024

Federated Learning (FL) is the "privacy-first" darling of the AI world, allowing multiple parties—like a fleet of IoT devices—to train a shared model without ever exchanging their raw data. But this decentralized nature creates a massive security hole: if an attacker can manipulate even a few client-side samples with subtle perturbations (Adversarial Examples, or AEs), they can trick the global model into making disastrously wrong predictions.

In a new paper titled "A Bijection-backdoor-based Adversarial Examples Defense Method in Federated Learning," researchers from the Information Engineering University and Hainan University propose a clever "fight fire with fire" strategy. They’ve developed BAEDFL-CL, a framework that uses backdoor triggers and contrastive learning not to attack, but to protect.

TL;DR

BAEDFL-CL defends Federated Learning models by embedding a "bijection backdoor" that maps adversarial inputs to specific target labels, which are then reverse-mapped to the correct original labels. By combining this with supervised contrastive learning, the method significantly slashes attack success rates while actually improving the model's accuracy on clean data, even in messy, real-world "Non-IID" data scenarios.

What Problem Does This Paper Address?

The core challenge is the vulnerability of neural networks to Adversarial Examples (AEs). In an IoT setting, an attacker might add invisible noise to a sensor image, causing a security camera to misclassify a "burglar" as a "tree."

While defenses exist for centralized models, Federated Learning adds two layers of difficulty:

  1. Model Leakage: The interactive nature of FL makes it easier for attackers to perform "white-box" attacks because they can eventually infer details about the model structure.
  2. Non-IID Data: In the real world, data isn't distributed evenly. One IoT device might see only "cats," while another sees only "cars." This "Non-IID" (Non-Independent and Identically Distributed) nature makes it incredibly hard for standard defense models to converge or remain stable.

Methods

The authors introduce a two-pronged defense strategy:

1. The Bijection Backdoor

Normally, a "backdoor attack" tricks a model into classifying any input with a specific "trigger" (like a small pixel pattern) as a single malicious target class (e.g., "everything is a toaster").

BAEDFL-CL flips this. The server sends a trigger and a bijection mapping to clients. If a sample contains the trigger (indicating it might be an adversarial example), the model is trained to map it to a unique "target" label based on its "source" label. For example:

  • Label 0 (Clean) $\rightarrow$ Label 9 (Backdoored)
  • Label 1 (Clean) $\rightarrow$ Label 0 (Backdoored)

When the model encounters an adversarial example during inference, it outputs the backdoored label. The system then performs an inverse mapping to recover the original, correct label. It essentially creates a "safe lane" for compromised data.

2. Supervised Contrastive Learning (CL)

To handle the "messy data" (Non-IID) problem, the authors use Supervised Contrastive Learning. This technique forces the model to pull feature representations of the same class closer together in the embedding space while pushing different classes further apart. This makes the model's "understanding" of the data much more robust and less susceptible to being swayed by minor adversarial noise.

Datasets

The researchers evaluated their method using two gold-standard image classification benchmarks:

  • MNIST: 70,000 grayscale images of handwritten digits (0-9).
  • CIFAR-10: 60,000 color images across 10 categories (airplanes, dogs, ships, etc.).

To simulate real-world FL, they tested both IID (data spread evenly) and Non-IID (data spread using a Dirichlet distribution) scenarios across 10 simulated clients.

Key Insights and Ideas

  • Backdoors as a Recovery Tool: The most innovative "aha moment" is using the bijection mapping. Most defenses try to block or detect AEs; this method accepts them but forces them into a predictable path where the error can be mathematically reversed.
  • Synergy with Contrastive Learning: Contrastive learning acts as a stabilizer. By cleaning up the feature space, it ensures that the "bijection" triggers are easily distinguishable from the primary task features, preventing the defense from hurting the model's main performance.
  • Robustness in Heterogeneity: The method performs remarkably well in Non-IID settings, where traditional adversarial training often fails because the model can't find a stable global representation.

Key Results

The BAEDFL-CL method was tested against four major attack types (FGSM, BIM, PGD, and C&W).

  • Attack Success Rate (ASR) Reduction: In IID scenarios, the average ASR dropped to 17.66%. In the much harder Non-IID scenarios, it stayed low at 24.35%. For context, without defense, ASRs were often above 85-90%.
  • Accuracy Boost: Unlike many defenses that trade off accuracy for security, BAEDFL-CL actually improved main task accuracy by 0.02% (IID) and 2.24% (Non-IID).
  • Visual Proof: Using t-SNE visualizations, the authors showed that while "No-Defense" models saw adversarial samples "intertwine" and confuse the model, BAEDFL-CL kept the classes clearly separated in the model's "mind."

Limitations and Future Work

While the results are promising, the authors note a few areas for growth:

  • Complexity of Data: The performance on CIFAR-10 (color images) was lower than on MNIST (simple digits), suggesting that more complex, real-world objects still pose a challenge for the encoder.
  • Adaptive Attacks: The paper assumes a standard white-box attacker. Future work needs to investigate "adaptive" attackers who might discover the bijection mapping itself and try to subvert the reverse-mapping process.
  • Scalability: The team aims to test the method in even more diverse and dynamic environments beyond the two standard datasets.

Summary updated

Abstract

<title>Abstract</title> With the continuous advancement of Internet of Things (IoT), the issue of data privacy in it is also quietly emerging. Federated learning (FL) enables the creation of a potent global model from a consortium of clients, safeguarding sensitive client data while upholding model accuracy. Unlike conventional centralized learning paradigms, federated learning operates without necessitating access to local datasets, thus effectively mitigating data privacy concerns. Nonetheless, malevolent entities can exploit vulnerabilities by introducing subtle perturbations to client-side samples, thereby executing adversarial example (AE) attacks that disrupt model predictions. To address this challenge, we present a novel bijection-backdoor-based adversarial examples defense method in federated learning, termed BAEDFL-CL. Initially, an intricate backdoor mechanism is transmitted from the server to the client, i.e. IoT device, neutralizing the impact of adversarial examples on model outputs while preserving the primary task's performance. Additionally, to bolster the model's defense capabilities within the federated learning for practical scenario, we devise a representation enhancement technique grounded in supervised contrastive learning (CL). This method encourages the model to craft feature representations endowed with enhanced generalization ability. Through comprehensive experiment on diverse datasets spanning IID and Non-IID scenarios, our results reveal that BAEDFL-CL significantly diminishes the attack success rate to 17.66% and 24.35%, respectively. Concurrently, BAEDFL-CL improves main task performance by 0.02% and 2.24% correspondingly, substantiating its efficacy in countering adversarial examples in federated learning environments.
BibTeX
@inproceedings{li2024bijection,
  author = {Yongfei Li and Yuanbo Guo and Fang Chen and Yifeng Wang and Qingli Chen and Yongjin Hu},
  title = {{A Bijection-backdoor-based Adversarial Examples Defense Method in Federated Learning}},
  booktitle = {Research Square},
  year = {2024},
  doi = {10.21203/rs.3.rs-4718612/v1},
}
Figure