On the Out-of-Distribution Backdoor Attack for Federated Learning

Rui Hu, Jiahao Xu, Zikai Zhang, Rui Hu 0005Mobihoc 2025

Abstract

Federated Learning (FL) is increasingly vulnerable to backdoor attacks where malicious clients poison the global model to misclassify specific inputs. Traditional attacks rely on artificial, visible triggers, such as pixel patches, which are easily detectable. This paper introduces the Out-of-Distribution Backdoor Attack (OBA), a novel threat model that utilizes naturally occurring, unrelated data as triggers. We present SoDa (Stealthy OoD backDoor attack), which employs self-reference training and regularization to bypass state-of-the-art weight-based defenses. To mitigate this threat, we propose BNGuard, a server-side defense that identifies malicious updates by detecting subtle statistical anomalies in Batch Normalization layers. Our results demonstrate that SoDa achieves near 100% success rates against existing defenses, while BNGuard effectively reduces the attack success rate to negligible levels.

Introduction

Backdoor attacks in Federated Learning (FL) typically involve an adversary poisoning local data with a "trigger" to force the global model into misclassification. However, traditional attacks often rely on artificial triggers that are either visually obvious or require impractical physical modifications to real-world objects.

This research addresses these limitations by exploring whether naturally occurring data can serve as a backdoor trigger. Such an attack would be far more practical and significantly harder for human observers or automated systems to detect. Furthermore, the paper tackles the challenge of bypassing existing server-side defenses designed to identify statistical outliers in model updates.

The Out-of-Distribution Backdoor Attack (OBA)

The core innovation is the OBA, which uses out-of-distribution (OOD) data—data entirely unrelated to the primary task—as both the poison and the trigger. For instance, in a traffic sign recognition system, house numbers (from the SVHN dataset) could serve as the trigger for misclassifying a stop sign.

Illustration of the proposed out-of-distribution backdoor attack in FL, showing how OOD data (like house numbers) is used to poison the model.

SoDa: Achieving Stealth

To ensure the OBA remains undetected by robust aggregation rules, the authors developed SoDa (Stealthy OoD backDoor attack). SoDa utilizes a "self-reference training" phase where the malicious client first trains a benign version of the model on clean data. During the poisoning phase, the attacker uses regularization to ensure the malicious model's updates closely match this benign reference in both magnitude and direction. This allows the attack to evade defenses like FLAME or MKrum that look for weight-based anomalies.

BNGuard: Defending via Batch Normalization

While SoDa can mimic benign model weights, the authors observed that OOD data leaves a unique statistical "fingerprint" in the Batch Normalization (BN) layers. BN layers track the running mean and variance of features to stabilize training; OOD data causes these statistics to deviate significantly from those of benign clients.

BNGuard leverages this insight by:

  1. Extracting running statistics from the first BN layer of each client's model.
  2. Reducing these statistics to a small set of features.
  3. Using K-Means clustering to separate clients into benign and anomalous groups.
  4. Excluding the anomalous group from the global aggregation.

The researchers found that the first BN layer is the most effective for detection, as deeper layers' non-linear transformations tend to obscure the statistical differences between In-Distribution (ID) and OOD data.

Experimental Results

The effectiveness of SoDa and BNGuard was evaluated using standard benchmarks including CIFAR-10, CIFAR-100, and the GTSRB traffic sign dataset.

SoDa's Lethality

Against state-of-the-art defenses like FLAME and MKrum, SoDa proved highly effective. As shown in the performance plots, SoDa's Attack Success Rate (ASR) quickly reaches nearly 100% while maintaining a low False Positive Rate (FPR) relative to basic OBA implementations. This demonstrates its ability to successfully poison the global model while remaining stealthy enough to be aggregated.

ASR and FPR over training rounds for FLAME and MKrum defenses, showing SoDa's high success rate compared to basic OBA.

BNGuard's Effectiveness

BNGuard consistently outperformed eight state-of-the-art defenses. In CIFAR-100 experiments, it reduced SoDa's ASR from nearly 100% to just 0.04%. Crucially, the defense remained robust in "non-IID" settings, where clients have heterogeneous local data distributions—a common hurdle in real-world FL deployments.

Conclusion

The OBA represents a significant shift in the threat landscape for Federated Learning, moving away from artificial patches toward more natural and stealthy triggers. While SoDa can bypass traditional weight-based defenses, the statistical signatures left in Batch Normalization layers provide a new avenue for defense. BNGuard demonstrates that monitoring these internal model statistics is a powerful method for securing FL systems against sophisticated OOD-based threats. Future work may involve adapting these defenses for architectures without BN layers, such as Transformers using Layer Normalization.

Summary updated

BibTeX
@inproceedings{hu2025out,
  author = {Rui Hu and Jiahao Xu and Zikai Zhang and Rui Hu},
  title = {{On the Out-of-Distribution Backdoor Attack for Federated Learning}},
  booktitle = {Mobihoc},
  year = {2025},
}
Figure