Organizations: Faculty of Electrical and Computer Engineering, Qom University of Technology, Qom, Iran · Department of Computer Engineering, Faculty of Industry and Mining (Khash), Sistan and Baluchestan University, Zahedan, Iran · Canadian Institute for Cybersecurity, University of New Brunswick, NB, Canada · Sustainable Digitalisation Research Centre (SDRC), Department of Computer Science and Media Technology, Faculty of Technology and Society, Malmo University, Sweden
Federated learning (FL) is an effective paradigm for distributed environments such as the Internet of Things (IoT), where data from diverse devices with varying functionalities remains localized while contributing to a shared global model. By eliminating the need to transmit raw data, FL inherently preserves privacy. However, the heterogeneous nature of IoT data, stemming from differences in device capabilities, data formats, and communication constraints, poses significant challenges to maintaining both global model performance and privacy. In the context of IoT-based anomaly detection, unsupervised FL offers a promising means to identify abnormal behavior without centralized data aggregation. Nevertheless, feature heterogeneity across devices complicates model training and optimization, hindering effective implementation. In this study we propose an efficient unsupervised FL framework that enhances anomaly detection by leveraging shared features from two distinct IoT datasets: one focused on anomaly detection and the other on device identification, while preserving dataset-specific features. To improve transparency and interpretability, we employ explainable AI techniques, such as SHAP, to identify key features influencing local model decisions. Experiments conducted on real-world IoT datasets demonstrate that the proposed method significantly outperforms conventional FL approaches in anomaly detection accuracy. This work underscores the potential of using shared features from complementary datasets to optimize unsupervised federated learning and achieve superior anomaly detection results in decentralized IoT environments.
Figures & tables
Datasets
No. Features
Class Name
No. Samples For All
No. Samples Train
No. Samples Test
No. Samples validation
CICIoT-DIAD 2024 [ 20 ]
78
Benign
297063
232904
6000
58226
(Anomaly Detection)
Attack
290346
227518
6000
56880
Heterogeneous Client
CICIOT Dataset 2023 [ 18 ]
46
Benign
919206
730577
6000
182645
(Anomaly Detection)
Attack
152686
117444
6000
29361
Heterogeneous Client
TABLE I : Details of the dataset.
No.
Feature Name
No.
Feature Name
1
total_length
26
max_et
2
L4_udp
27
med_et
3
L7_http
28
average_et
4
L7_https
29
skew_et
5
port_class_src
30
kurt_et
6
port_class_dst
31
var
TABLE II : Comparison of features across three datasets, features in blue represent common attributes.
Fig. 1 : The high-level life cycle of the proposed approach.
Fig. 2 : A general overview of the federated learning system
Fig. 3 : An external view of the federated learning framework.