Hybrid ResNet-1D–BiGRU with Multi-Head Attention for Cyberattack Detection in Industrial IoT Environments

Afrah Gueriani, Hamza Kheddar, Ahmed Cherif Mazari · 2026

Read Hybrid ResNet-1D–BiGRU with Multi-Head Attention for Cyberattack Detection in Industrial IoT Environments by Afrah Gueriani, Hamza Kheddar, Ahmed Cherif Mazari (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-06481.txt.

Introduction

Gueriani, Kheddar, and Mazari build a hybrid deep learning model for Industrial IoT intrusion detection. It mixes ResNet-1D, BiGRU, and multi-head attention for spatial-temporal cues and attention weighting. SMOTE handles class imbalance during training on EdgeHoTset. The model reached 98.71 percent accuracy on EdgeHoTset, with inference latency of fractions of a millisecond per instance. On CICIoV2024, it reached nearly 100 percent accuracy and F1-score, with no false positives and fractions of a millisecond per instance. Across all metrics and sets, it outperformed prior methods.

Catalog record

CREATORAfrah Gueriani, Hamza Kheddar, Ahmed Cherif Mazari
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE23677
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.06481

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Hybrid ResNet-1D–BiGRU with Multi-Head Attention for Cyberattack Detection in Industrial IoT Environments Afrah Gueriani, Hamza Kheddar, Ahmed Cherif Mazari Abstract 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 Edge-IIoTset 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. I Introduction The rapid advancement and extensive deployment of IoT devices have transformed modern life, enhancing convenience and fostering the development of interconnected systems. However, this technological progress also introduces substantial challenges, particularly the increasing vulnerability of IoT devices to cyber threats [ 9 ] . Additionally, the relentless refinement of hacking techniques has given rise to novel and highly sophisticated cyber intrusions, creating complex and unforeseen security challenges [ 13 ] . The IIoT, which extends IoT to industrial applications, faces even greater risks due to its critical role in sectors like manufacturing, healthcare, and energy. This necessitated the development of advanced and robust security measures, including Network Intrusion Detection Systems (NIDSs) (discussed in [ 17 ] ), to identify and alert against attacks and malware at an early stage. Artificial Intelligence (AI), which refers to machines emulating intelligent human behavior [ 21 ] , has increasingly emerged as a pivotal component in the domain of network security and intrusion detection [ 24 ] . This study introduces an innovative hybrid framework that integrates ResNet-1D, BiGRU, and Multihead-Attention mechanisms which is discussed in [ 20 ] to enhance intrusion detection. Additionally, the use of the SMOTE technique addresses data imbalance in EdgeIIoTset dataset, ensuring more accurate classification. The proposed ResNet-1D-BiGRU-MHA capture spatial and temporal dependencies in IIoT network traffic. The rationale behind selecting this combination is grounded in their complementary strengths in feature extraction, sequence modeling, and attention-based weighting. ResNet-1D is employed as the initial feature extraction component due to its ability to efficiently capture hierarchical representations in sequential network data. ResNet-1D, in contrast to traditional CNNs, uses residual connections to address the vanishing gradient issue, enabling deeper networks to learn without seeing a drop in performance [ 28 ] . Addionaly, BiGRU for temporal dependency modeling is incorporated to model long-term dependencies by reducing computational complexity and allowing the model to learn attack patterns that may depend on both past and future network behavior [ 3 ] . However, MHA is integrated to dynamically assign different levels of importance to various features in the time series data. Even while IDS research has advanced significantly, there are still a number of issues that limit the usefulness of current models, especially in IIoT systems. Security teams are overloaded with false alarms due to the high false positive rates (FPR) of many IDS models. Conversely, false negatives pose a critical risk by allowing sophisticated cyberattacks to go undetected. In real-world cybersecurity datasets, attack samples are often much rarer than normal traffic, leading to class imbalance issues. Many existing models fail to effectively learn from minority-class attacks, causing reduced detection accuracy for rare but critical threats like in [ 29 , 12 ] . This paper’s remaining sections are arranged as follows: The preliminary findings, which include a review of the pertinent background and associated studies, are presented in Section II . The suggested method and the dataset preprocessing procedures are explained in Section III . Section IV reports on extensive tests conducted to evaluate the model’s performance. A summary of the paper’s main conclusions and some avenues for further research are provided in Section V . II Literature Review DL approaches have proven highly effective in addressing cybersecurity threats, outperforming traditional centralized machine learning models, particularly in detecting advanced attacks. To further improve performance, researchers are increasingly adopting hybrid and concatenated DL architectures. Z. Xia et al. [ 26 ] propose a PSO-GA-optimized ResNet-BiGRU-based intrusion detection method aimed at enhancing network security. To further improve accuracy, genetic algorithm (GA) and particle swarm optimization (PSO) are employed for hyperparameter tuning. Experiments were demonstrate superior performance on three different dataset namely KDD99, UNSW-NB15, and CIC-IDS 2017 compared to existing methods. In [ 15 ] , D. Javeed et al. introduce an explainable and resilient IDS specifically designed for Industry 5.0 environments. The proposed model integrates BiLSTM and BiGRU architectures to enhance detection accuracy. Using the CICDDoS2019 dataset, the system effectively detects and eliminates cyber-threats in interconnected industrial systems. In [ 27 ] , Y. Xiang et al. propose a hybrid DL model combining ResNet and biGRU for effective intrusion detection in IoT environments. Numerous experiments show that the model performs better than current techniques, achieving better detection rates and robustness on three benchmark IoT datasets namely: NBaIoT, PreIoT, and UNSW-NB15. In [ 10 ] , the authors investigated the feasibility of developing a DNN-GRU model enhanced with Multi-Head Attention. The experimental results demonstrated the superiority of the proposed model, achieving accuracy rates of 98.22% and 99.78% on medical and industrial datasets, respectively. In their subsequent works [ 11 , 6 ] , the same authors employed SHAP with multiple GRU-BiLSTM-MHA-based IDS combinations to analyze and rank feature importance, with the aim of reducing computational cost. Evaluated on the same datasets before and after the application of balancing techniques, the proposed architecture achieved high accuracy across domains, demonstrating strong generalization capability and adaptability under both settings. A Vision Transformer-BiLSTM architecture was also investigated in [ 7 ] for the development of an advanced IDS method. The experimental results demonstrated that the proposed ViT-BiLSTM model outperformed many existing approaches across multiple evaluation metrics. III Proposed Methodology This section presents a background of attention mechanism, then discuss the suggested model, a ResNet-1D-BiGRU-MHA hybrid, will take up this section. This architecture is created to recognize and classify benign and dangerous traffic in a dataset of novel environments. - Attention Mechanism: The self-attention mechanism is a powerful and highly efficient approach commonly used in modern deep learning architectures, especially in models that process sequential data such as text, audio, or time series. Three vectors; the query, key, and value vectors; represent each component of the input sequence in this technique. Throughout the training process, these vectors are discovered and improved. The core idea is to determine the degree of attention an element (represented by the query) should allocate to another element (represented by the key) by computing a compatibility score, which guides the weighted aggregation of the corresponding value vectors. In order to ensure that the scores total up to one, this score is usually calculated by taking the dot product of the query and key vectors, then adding a scaling factor and performing a softmax operation [ 25 ] . See Equation 1 in in [ 22 ] for a thorough description of the attention mechanism: \small\mathrm{Attention(Q,K,V)}=softmax\left(\frac{Q\times K^{T}}{\sqrt{d_{q}}}\right)\times V (1) Where:

Read the complete text