Federated Learning Approaches for IoT Intrusion Detection Based on FedAvg and FedProx on IID and Non-IID Data

Satria W. Herlambang, Favian Dewanta, Yudha Purwanto · 2025

The increasing complexity of cyberattacks in the Internet of Things (IoT) architecture demands an Intrusion Detection System (IDS) that is not only accurate but also maintains data privacy. Conventional IDS are based on a centralized architecture, which is prone to a single point of failure and risks causing data leakage. To address this issue, Federated Learning (FL) is an innovative IDS approach that enables collaborative model training without the need to transmit raw data. However, the effectiveness of FL is highly dependent on the selection of the aggregation method, as it directly affects model convergence, detection accuracy, and system robustness, especially when faced with non-IID conditions. This research proposes a FL-based CIDS using two aggregation methods, namely FedAvg and FedProx, to evaluate the performance of attack detection on the CICIoT2023 dataset. Experiments were conducted with IID and non-IID data distribution scenarios using Deep Neural Network (DNN) as the classification model. The results show that in the IID scenario, FedAvg and FedProx both achieved high accuracy reaching 98.75%. However, in the non-IID scenario, FedProx with a regularization value of μ set to 1.0 performed best, with accuracy reaching 98.44%, outperforming FedAvg consistently. This finding confirms that FedProx is superior in handling non-IID data distribution while maintaining data security and confidentiality in IoT environments.

Read the paper · More papers on PaperTik