Hybrid ResNet-1D-BiGRU with Multi-Head Attention for Cyberattack Detection in Industrial IoT Environments
Authors: Afrah Gueriani, Hamza Kheddar, Ahmed Cherif Mazari
Organizations: LSEA Lab., Faculty of Technology, University of MEDEA, Medea 26000, Algeria · LSEA Lab, Faculty of Science, University of MEDEA, Medea 26000, Algeria
This study introduces a hybrid deep learning model for intrusion detection in Industrial IoT (IIoT) systems, combining ResNet-1D, BiGRU, and Multi-Head Attention (MHA) for effective spatial-temporal feature extraction and attention-based feature weighting. To address class imbalance, SMOTE was applied during training on the EdgeHoTset dataset. The model achieved 98.71% accuracy, a loss of 0.0417%, and low inference latency (0.0001 sec /instance), demonstrating strong real-time capability. To assess generalizability, the model was also tested on the CICIoV2024 dataset, where it reached 99.99% accuracy and F1-score, with a loss of 0.0028, 0 % FPR, and 0.00014 sec/instance inference time. Across all metrics and datasets, the proposed model outperformed existing methods, confirming its robustness and effectiveness for real-time IoT intrusion detection.
Figures & tables
Fig. 1: The proposed framework architecture.
Fig. 2: Accuracy and loss of the proposed ResNet-1D-BiGRU-MHA model. (a): Accuracy graph, (b): Loss graph
Precision
Recall
F1
Support
Benign traffic (0)
100%
100%
100%
9860
DDoS (1)
99%
97%
98%
10016
Info. gathering (2)
100%
100%
100%
9878
MITM (3)
100%
100%
100%
9815
Injection (4)
97%
99%
98%
9779
Malware (5)
100%
100%
100%
9928
TABLE I: Multiclass classification report of the proposed ResNet-1D-BiGRU-MHA approach.
Fig. 3: Confusion matrix of the proposed ResNet-1D-BiGRU-MHA model
Fig. 4: ROC curves for multiclass classification of the proposed ResNet-1D- BiGRU-MHA model.
Work
Model
Dataset
Acc (%)
Loss
Pr (%)
Rc (%)
F1 (%)
FPR (%)
Inf time (Sec/Inst)
[ gueriani2025adaptive ]
LSTM-CNN-Att
EdgeIIoT
99.04
0.0220
99.05
99.04
99.04
0.002
✗
[ 22 ]
DNN
CICIoV2024
96
✗
83
76
78
✗
✗
[ 27 ]
BiGRU-LSTM
EdgeIIoT
98.32
✗
98.78
97.22
✗
✗
✗
[ 28 ]
CNN-LSTM-ViT
CICIoV2024
99.78
✗
✗
✗
99.65
1.2
0.0213
Presented
ResNet-1D-BiGRU-MHA
EdgeIIoT
98.71
0.0417
98.71
98.70
98.71
0.002
0.0001
CICIoV2024
99.99
0.0028
99.99
99.99
99.99
0.0000
0.00014
TABLE II: Comparing the Best Practices for Multiclass Classification on the Edge-IIoTset Dataset with Performance Metrics for the Suggested ResNet-1D-BiGRU-MHA Model.
Case number
Model
N. of Att heads
Dropout (%)
Accuracy (%)
Loss(%)
FPR(%)
Inf. time
#1
ResNet-1D
✗
0.5
47.95
2.7668
0.0130
0.00008
#2
BiGRU-MHA
4
0.5
98.28
0.0560
0.0034
0.0002
#3
ResNet-1D-BiGRU
✗
0.5
98.07
0.0557
0.0039
0.0003
#4
ResNet-1D-BiGRU-MHA
2
0.5
98.27
0.0504
0.0033
0.00015
#5
ResNet-1D-BiGRU-MHA
4
0.5
98.71
0.0294
0.0020
0.0001
#6
ResNet-1D-BiGRU-MHA
8
0.5
97.97
0.0613
0.0038
0.00016
TABLE III: Performance of different variants of the proposed models in multiclass classification.
With the rapid growth of interconnected devices in Industrial and Medical Internet of Things (IIoT and MIoT) ecosystems, ensuring timely and accurate detection of cyber threats has become a critical challenge. This study presents an advanced intrusion detection framework based on a hybrid Squeeze-and-Excitation Attention Vision Transformer-Bidirectional Long Short-Term Memory (SE ViT-BiLSTM) architecture. In this design, the traditional multi-head attention mechanism of the Vision Transformer is replaced with Squeeze-and-Excitation attention, and integrated with BiLSTM layers to enhance detection accuracy and computational efficiency. The proposed model was trained and evaluated on two real-world benchmark datasets; EdgeIIoT and CICIoMT2024; both before and after data balancing using the Synthetic Minority Over-sampling Technique (SMOTE) and RandomOverSampler. Experimental results demonstrate that the SE ViT-BiLSTM model outperforms existing approaches across multiple metrics. Before balancing, the model achieved accuracies of 99.11% (FPR: 0.0013%, latency: 0.00032 sec/inst) on EdgeIIoT and 96.10% (FPR: 0.0036%, latency: 0.00053 sec/inst) on CICIoMT2024. After balancing, performance further improved, reaching 99.33% accuracy with 0.00035 sec/inst latency on EdgeIIoT and 98.16% accuracy with 0.00014 sec/inst latency on CICIoMT2024.
Afrah Gueriani, Hamza Kheddar, Ahmed Cherif Mazari +2
LSEA Lab., Faculty of Technology, University of MEDEA, Medea 26000, Algeria · LSEA Lab, Faculty of Science, University of MEDEA, Medea 26000, Algeria · Department of Computer Engineering, Gazi University, Ankara, Turkey +1
With the rapid proliferation of IoT devices, security concerns have dramatically escalated and intrusion detection systems have become critical for protecting networked environments. This paper presents an improved CNN-LSTM based intrusion detection model that combines multi-class classification, dataset integration, and temporal feature learning to enhance detection performance in IoT networks. Using network traffic data, the proposed approach is evaluated on intrusion detection tasks and achieves an accuracy of approximately 97%. Experimental results demonstrate that the model effectively detects multiple attack categories while maintaining stable training and validation performance. The integration of convolutional and recurrent neural network components enables the framework to capture both spatial and temporal characteristics of network traffic, improving overall intrusion detection capability in IoT environments.
Mohammad Tariq Ikhlas, Pohanyar Khowaja Khil, Malik Muhammad Mueed Aslam +1
The proliferation of Internet of Things (IoT) devices has significantly expanded attack surfaces, making IoT ecosystems particularly susceptible to sophisticated cyber threats. To address this challenge, this work introduces A-THENA, a lightweight early intrusion detection system (EIDS) that significantly extends preliminary findings on time-aware encodings. A-THENA employs an advanced Transformer-based architecture augmented with a generalized Time-Aware Hybrid Encoding (THE), integrating packet timestamps to effectively capture temporal dynamics essential for accurate and early threat detection. The proposed system further employs a Network-Specific Augmentation (NA) pipeline, which enhances model robustness and generalization. We evaluate A-THENA on three benchmark IoT intrusion detection datasets-CICIoT23-WEB, MQTT-IoT-IDS2020, and IoTID20-where it consistently achieves strong performance. Averaged across all three datasets, it improves accuracy by 6.88 percentage points over the best-performing traditional positional encoding, 3.69 points over the strongest feature-based model, 6.17 points over the leading time-aware alternatives, and 5.11 points over related models, while achieving near-zero false alarms and false negatives. To assess real-world feasibility, we deploy A-THENA on the Raspberry Pi Zero 2 W, demonstrating its ability to perform real-time intrusion detection with minimal latency and memory usage. These results establish A-THENA as an agile, practical, and highly effective solution for securing IoT networks.
Ioannis Panopoulos, Maria Lamprini A. Bartsioka, Sokratis Nikolaidis +3
National Technical University of Athens, Greece · Samsung AI Center, UK