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

Jiahao Xu, Zikai Zhang, Rui Hu
9/16/2025
cs.LGcs.CR

Official code: JiiahaoXU/SoDa-BNGuard (6 stars, last commit 2025-12-20).

Abstract

Traditional backdoor attacks in federated learning (FL) operate within constrained attack scenarios, as they depend on visible triggers and require physical modifications to the target object, which limits their practicality. To address this limitation, we introduce a novel backdoor attack prototype for FL called the out-of-distribution (OOD) backdoor attack ($\mathtt{OBA}$), which uses OOD data as both poisoned samples and triggers simultaneously. Our approach significantly broadens the scope of backdoor attack scenarios in FL. To improve the stealthiness of $\mathtt{OBA}$, we propose $\mathtt{SoDa}$, which regularizes both the magnitude and direction of malicious local models during local training, aligning them closely with their benign versions to evade detection. Empirical results demonstrate that $\mathtt{OBA}$ effectively circumvents state-of-the-art defenses while maintaining high accuracy on the main task. To address this security vulnerability in the FL system, we introduce $\mathtt{BNGuard}$, a new server-side defense method tailored against $\mathtt{SoDa}$. $\mathtt{BNGuard}$ leverages the observation that OOD data causes significant deviations in the running statistics of batch normalization layers. This allows $\mathtt{BNGuard}$ to identify malicious model updates and exclude them from aggregation, thereby enhancing the backdoor robustness of FL. Extensive experiments across various settings show the effectiveness of $\mathtt{BNGuard}$ on defending against $\mathtt{SoDa}$. The code is available at https://github.com/JiiahaoXU/SoDa-BNGuard.

View on arXivView PDF

Code Implementations(1)

[MobiHoc 2025] The official Pytorch implementation of SoDa-BNGuard

61PythonNov 13, 202410 months ago

Similar Papers

Cite this paper

@article{xu2025outofdistribution,
  title  = {On the Out-of-Distribution Backdoor Attack for Federated Learning},
  author = {Jiahao Xu and Zikai Zhang and Rui Hu},
  year   = {2025},
  eprint = {2509.13219},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.13219v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.13219.svg)](https://codeofpaper.com/paper/2509.13219)

Discussion