Enhanced Intrusion Detection for ICS Using MS1DCNN and Transformer to Tackle Data Imbalance
Abstract
:1. Introduction
- Proposal of the Weight-Dropped Transformer (WDTransformer): An enhanced Transformer encoder architecture that incorporates dynamic sparsity using DropConnect, a generalized regularization method that probabilistically removes weight connections during training;
- Development of a hybrid dual-channel feature extraction model: This model combines multi-scale one-dimensional convolutional neural networks (MS1DCNN) and the WDTransformer. The MS1DCNN module extracts fine-grained temporal features across multiple scales, while the WDTransformer module emphasizes capturing global dependencies with improved regularization;
- Creation of a custom dataset for PLC network security in ICSs: This dataset encompasses diverse attack scenarios such as SYN-Flood, DDoS, ARP, and Nmap attacks to ensure realistic and comprehensive evaluation.
2. Related Works
3. Methodology
3.1. SMOTE and Borderline-SMOTE
- For each sample in the minority class set, find its nearest neighbors and count the number of minority class samples among them;
- If there are zero minority class samples, label the sample as noise, indicating that it is surrounded entirely by majority class samples. If the majority of neighbors are minority samples, label it as a safe sample, as it resides within a minority cluster. If fewer than half of the neighbors are minority samples, label it as a borderline sample, suggesting that it lies in a potential boundary region that requires special attention;
- Apply the SMOTE algorithm to the samples marked as borderline, generating synthetic samples to balance the dataset.
3.2. MS1DCNN
3.3. Weight-Dropped Transformer
3.4. Combination Loss Function
4. Proposed Model
4.1. Data Collection
4.2. Data Pre-Processing
- Handling Missing Values: Features with a high proportion of missing values were removed to minimize their negative impact on the model. For features with fewer missing values, numerical values were imputed with the mean, and categorical values were imputed with the mode;
- Handling Outliers: The parsed data were carefully inspected for errors, and entries with format inconsistencies, logical errors, or content anomalies were removed or corrected;
- Data Normalization: To balance each feature’s contribution to model predictions and enhance overall accuracy, all data were normalized using the z-score method, as presented in the formula below:
- Label Encoding and One-Hot Encoding: For categorical features, such as target labels, label encoding was initially applied to transform categorical labels into numerical format. Subsequently, One-Hot encoding was applied to these numerical labels, transforming each label into a binary vector, where a single element is set to 1 and the remaining elements are 0;
- Data Deduplication: Duplicate samples in the dataset were identified and removed to mitigate bias and reduce the risk of overfitting caused by redundant data.
4.3. Data Oversampling
4.4. MS1DCNN WDTransformer Module
4.5. Performance Metrics
- Accuracy represents the proportion of correctly predicted samples to the total number of samples:
- Precision represents the proportion of correctly predicted positive samples out of all predicted positives:
- Recall represents the proportion of actual positive samples that are correctly predicted:
- F1-Score represents the harmonic mean of recall and precision, representing a balance between the two:
- False Negative Rate (FNR) represents the proportion of actual positive samples incorrectly predicted as negative:
- False Positive Rate (FPR) represents the proportion of actual negative samples incorrectly predicted as positive:
5. Experiments and Results
5.1. Experimental Environment
5.2. Experimental Results and Analysis
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Zhao, X.; Zhang, L.; Cao, Y.; Jin, K.; Hou, Y. Anomaly Detection Approach in Industrial Control Systems Based on Measurement Data. Information 2022, 13, 450. [Google Scholar] [CrossRef]
- Gamage, S.; Samarabandu, J. Deep learning methods in network intrusion detection: A survey and an objective comparison. J. Cloud Comput. 2020, 169, 102767. [Google Scholar] [CrossRef]
- Ozkan-Okay, M.; Samet, R.; Aslan, Ö.; Gupta, D. A Comprehensive Systematic Literature Review on Intrusion Detection Systems. IEEE Access 2021, 9, 157727–157760. [Google Scholar] [CrossRef]
- Lampe, B.; Meng, W. Intrusion Detection in the Automotive Domain: A Comprehensive Review. IEEE Commun. Surv. Tutor. 2023, 25, 2356–2426. [Google Scholar] [CrossRef]
- Heidari, A.; Jabraeil Jamali, M.A. Internet of Things intrusion detection systems: A comprehensive review and future directions. Clust. Comput. 2023, 26, 3753–3780. [Google Scholar] [CrossRef]
- Qazi, E.U.H.; Faheem, M.H.; Zia, T. HDLNIDS: Hybrid Deep-Learning-Based Network Intrusion Detection System. Appl. Sci. 2023, 13, 4921. [Google Scholar] [CrossRef]
- Javeed, D.; Saeed, M.S.; Ahmad, I.; Kumar, P.; Jolfaei, A.; Tahir, M. An Intelligent Intrusion Detection System for Smart Consumer Electronics Network. IEEE Trans. Consum. Electron. 2023, 69, 906–913. [Google Scholar] [CrossRef]
- Zheng, X.R.; Yang, S.; Wang, X.J. SF-IDS: An Imbalanced Semi-Supervised Learning Framework for Fine-Grained Intrusion Detection. In Proceedings of the ICC 2023—IEEE International Conference on Communications, Rome, Italy, 28 May–1 June 2023. [Google Scholar]
- Feng, G.; Jiang, S.; Hu, X.; Ma, M. New Research Progress on Intrusion Detection Techniques for the Internet of Things. NetInfo Secur. 2024, 2, 167–178. [Google Scholar]
- Yang, Z.Y.; He, L.; Yu, H.; Zhao, C.C.; Cheng, P.; Chen, J.M. Detecting PLC Intrusions Using Control Invariants. IEEE Internet Things J. 2022, 9, 9934–9947. [Google Scholar] [CrossRef]
- Mohammadpour, L.; Ling, T.C.; Liew, C.S.; Aryanfar, A. A Survey of CNN-Based Network Intrusion Detection. Appl. Sci. 2022, 12, 8162. [Google Scholar] [CrossRef]
- Almiani, M.; AbuGhazleh, A.; Al-Rahayfeh, A.; Atiewi, S.; Razaque, A. Deep Recurrent Neural Network for IoT Intrusion Detection System. Simul. Model. Pract. Theory 2020, 101, 102031. [Google Scholar] [CrossRef]
- Yang, Y.; Tu, S.; Ali, R.H.; Alasmary, H.; Waqas, M.; Amjad, M.N. Intrusion Detection Based on Bidirectional Long Short-Term Memory with Attention Mechanism. Comput. Mater. Contin. 2023, 74, 801–815. [Google Scholar] [CrossRef]
- Halbouni, A.; Gunawan, T.S.; Habaebi, M.H.; Halbouni, M.; Kartiwi, M.; Ahmad, R. CNN-LSTM: Hybrid Deep Neural Network for Network Intrusion Detection System. IEEE Access 2022, 10, 99837–99849. [Google Scholar] [CrossRef]
- Hassan, M.M.; Gumaei, A.; Alsanad, A.; Alrubaian, M.; Fortino, G. A hybrid deep learning model for efficient intrusion detection in big data environment. Inf. Sci. 2020, 513, 386–396. [Google Scholar] [CrossRef]
- Jin, K.; Zhang, L.; Sun, Y.; Zheng, X. A Network Traffic Intrusion Detection Method for Industrial Control Systems Based on Deep Learning. Electronics 2023, 12, 4329. [Google Scholar] [CrossRef]
- Yao, R.; Wang, N.; Chen, P.; Ma, D.; Sheng, X. A CNN-Transformer Hybrid Approach for an Intrusion Detection System in Advanced Metering Infrastructure. Multimed. Tools Appl. 2023, 82, 19463–19486. [Google Scholar] [CrossRef]
- Wu, Z.; Zhang, H.; Wang, P.; Sun, Z. RTIDS: A Robust Transformer-Based Approach for Intrusion Detection System. IEEE Access 2022, 10, 64375–64387. [Google Scholar] [CrossRef]
- Long, Z.; Yan, H.; Shen, G.; Zhang, X.; He, H.; Cheng, L. A Transformer-based network intrusion detection approach for cloud security. J. Cloud Comput. 2024, 13, 5. [Google Scholar] [CrossRef]
- El-Ghamry, A.; Darwish, A.; Hassanien, A.E. An optimized CNN-based intrusion detection system for reducing risks in smart farming. Internet Things 2023, 22, 100709. [Google Scholar] [CrossRef]
- Li, Y.; Xu, Y.; Liu, Z.; Hou, H.; Zheng, Y.; Xin, Y.; Zhao, Y.; Cui, L. Robust detection for network intrusion of industrial IoT based on multi-CNN fusion. Measurement 2020, 154, 107450. [Google Scholar] [CrossRef]
- Booij, T.M.; Chiscop, I.; den Hartog, F.T.H. ToN_IoT: The Role of Heterogeneity and the Need for Standardization of Features and Attack Types in IoT Network Intrusion Data Sets. IEEE Internet Things J. 2022, 9, 485–496. [Google Scholar] [CrossRef]
- Yu, S.J.; Zhai, R.; Shen, S.G. Deep Q-Network-Based Open-Set Intrusion Detection Solution for Industrial Internet of Things. IEEE Internet Things J. 2024, 11, 12536–12550. [Google Scholar] [CrossRef]
- Thakkar, A.; Lohiya, R. Fusion of Statistical Importance for Feature Selection in Deep Neural Network-Based Intrusion Detection System. Inf. Fusion 2023, 90, 353–363. [Google Scholar] [CrossRef]
- Wu, T.; Fan, H.H.; Zhu, H.J.; You, C.Z.; Zhou, H.Y.; Huang, X.Z. Intrusion Detection System Combined Enhanced Random Forest with SMOTE Algorithm. EURASIP J. Adv. Signal Process. 2022, 2022, 39. [Google Scholar] [CrossRef]
- Sun, Y.; Que, H.K.; Cai, Q.Q.; Zhao, J.M.; Li, J.R.; Kong, Z.M.; Wang, S. Borderline SMOTE Algorithm and Feature Selection-Based Network Anomalies Detection Strategy. Energies 2022, 15, 4751. [Google Scholar] [CrossRef]
- Gan, B.Q.; Chen, Y.Q.; Dong, Q.P.; Guo, J.L.; Wang, R.X. A Convolutional Neural Network Intrusion Detection Method Based on Data Imbalance. J. Supercomput. 2022, 78, 19401–19434. [Google Scholar] [CrossRef]
- Ma, W.; Gou, C.; Hou, Y. Research on Adaptive 1DCNN Network Intrusion Detection Technology Based on BSGM Mixed Sampling. Sensors 2023, 23, 6206. [Google Scholar] [CrossRef]
- Tan, Z.; Guo, X.; Li, J.; Guo, Y.; Pan, J. Multi-Scale Convolutional Neural Network Model for Pipeline Leak Detection. J. Hydraul. Eng. 2023, 54, 220–231. [Google Scholar]
- Islam, M.M.; Ahmad, T.; Truscan, D. An Evaluation of Transformer Models for Early Intrusion Detection in Cloud Continuum. In Proceedings of the 2023 IEEE International Conference on Cloud Computing Technology and Science (CloudCom), Naples, Italy, 4–6 December 2023. [Google Scholar]
Class Name | Training Set (80%) | Testing Set (20%) |
---|---|---|
Normal | 120,000 | 30,000 |
SYN-Flood | 82,024 | 20,506 |
DDos | 72,581 | 18,146 |
Nmap | 1953 | 489 |
ARP | 1924 | 481 |
Scapy | 994 | 248 |
Total | 279,476 | 69,870 |
Class Name | Before Oversampling (%) | After Oversampling (%) |
---|---|---|
Normal | 42.93% | 33.57% |
SYN-Flood | 29.35% | 22.95% |
DDos | 25.97% | 20.31% |
Nmap | 0.70% | 9.29% |
ARP | 0.70% | 9.15% |
Scapy | 0.36% | 4.73% |
Total | 100% | 100% |
Method | Accuracy | Precision | Recall | F1-Score | FNR | FPR |
---|---|---|---|---|---|---|
1DCNN | 0.8598 | 0.8436 | 0.8519 | 0.8534 | 0.1120 | 0.0752 |
Transformer | 0.8746 | 0.8441 | 0.8539 | 0.8533 | 0.1019 | 0.0651 |
1DCNN–Transformer | 0.9056 | 0.9030 | 0.9033 | 0.9058 | 0.0910 | 0.0255 |
MS1DCNN–WDTransformer | 0.9511 | 0.9514 | 0.9511 | 0.9512 | 0.0489 | 0.0098 |
Method | Accuracy | Precision | Recall | F1-Score | FNR | FPR |
---|---|---|---|---|---|---|
SVM | 0.8746 | 0.8441 | 0.8539 | 0.8533 | 0.0905 | 0.0610 |
XGBoost | 0.8769 | 0.8745 | 0.8635 | 0.8754 | 0.0956 | 0.0589 |
Attention-based CNN–LSTM | 0.9126 | 0.9188 | 0.9128 | 0.9130 | 0.0683 | 0.0300 |
CNN–GRU | 0.9290 | 0.9318 | 0.9222 | 0.9317 | 0.0685 | 0.0297 |
DBN | 0.9330 | 0.9320 | 0.9290 | 0.9328 | 0.0675 | 0.0292 |
MS1DCNN–WDTransformer | 0.9511 | 0.9514 | 0.9511 | 0.9512 | 0.0489 | 0.0098 |
Method | Accuracy | Precision | Recall | F1-Score | FNR | FPR |
---|---|---|---|---|---|---|
SVM | 0.8559 | 0.8254 | 0.8003 | 0.8116 | 0.1997 | 0.0453 |
XGBoost | 0.8806 | 0.8401 | 0.8208 | 0.8305 | 0.1792 | 0.0384 |
Attention-based CNN–LSTM | 0.9253 | 0.9123 | 0.9004 | 0.9064 | 0.0996 | 0.0280 |
CNN–GRU | 0.9301 | 0.9205 | 0.9152 | 0.9173 | 0.0848 | 0.0246 |
DBN | 0.9002 | 0.8903 | 0.8850 | 0.8877 | 0.115 | 0.0302 |
MS1DCNN–WDTransformer | 0.9587 | 0.9606 | 0.9572 | 0.9606 | 0.0468 | 0.0012 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, Y.; Zhang, L.; Zheng, X. Enhanced Intrusion Detection for ICS Using MS1DCNN and Transformer to Tackle Data Imbalance. Sensors 2024, 24, 7883. https://doi.org/10.3390/s24247883
Zhang Y, Zhang L, Zheng X. Enhanced Intrusion Detection for ICS Using MS1DCNN and Transformer to Tackle Data Imbalance. Sensors. 2024; 24(24):7883. https://doi.org/10.3390/s24247883
Chicago/Turabian StyleZhang, Yuanlin, Lei Zhang, and Xiaoyuan Zheng. 2024. "Enhanced Intrusion Detection for ICS Using MS1DCNN and Transformer to Tackle Data Imbalance" Sensors 24, no. 24: 7883. https://doi.org/10.3390/s24247883
APA StyleZhang, Y., Zhang, L., & Zheng, X. (2024). Enhanced Intrusion Detection for ICS Using MS1DCNN and Transformer to Tackle Data Imbalance. Sensors, 24(24), 7883. https://doi.org/10.3390/s24247883