Optimizing BiLSTM Network Attack Prediction Based on Improved Gray Wolf Algorithm
Abstract
:1. Introduction
1.1. Motivation
1.2. Related Studies
1.3. Contributions
2. Background
2.1. Improved Gray Wolf Optimization Algorithm
2.2. Bidirectional Long Short-Term Memory Network
3. BiLSTM Attack Prediction Model Based on Improved Gray Wolf Algorithm
3.1. Model
- The characteristics of normal network traffic have a certain regularity. When the change range of normal network traffic is abnormal, it can be judged that a network attack has occurred at this time. Literature [23] proposed the IPDCF, sampling the network at a time interval of , using Equation (6) for data statistics, using Equation (7) for normalization and other data preprocessing operations:Among them, is the i-th value in the time series and is the data packet.Among them, is the normalized value, is the original value, is the minimum value and is the maximum value;
- Sampling the data set at a time interval of and calculating the IPDCF value of each sampling. After times of sampling, time series is obtained and Equation (8) is used for time series modeling:Among them, is the length of the data set, ;
- The raw data set is divided into a normal traffic data set and attack traffic data set. The normal traffic data set is used for prediction model training and prediction performance testing and the attack data set is used for attack experiments. Using sliding window technology, a window with a length of 60 and a width of 1 is selected, set the step size to 10 and perform sliding interception on the original network traffic data to obtain the network traffic training set and test set;
- Initialize the parameters of the improved gray wolf algorithm. Randomly generate wolves, the total number , the maximum number of iterations , the dimension of the problem is the number of BiLSTM optimization parameters , the number of hidden layer units of BiLSTM , the forgetting rate and batch size correspond to the parameter coordinates of the individual positions of wolves, set the upper and lower limits , ;
- Initialize BiLSTM parameters and select a two-layer BiLSTM network. The number of hidden layer units , dropout rate and batch size of BiLSTM are initialized to , , , , the maximum number of iterations is 500 and the fitness function is the mean squared error between the predicted value and the real value. Equation (9) was used to calculate the individual fitness of wolves and the fitness was returned to IGWO,Among them, is the real value and is the predicted value;
- Normal network traffic time series input the model according to the window set in step (3) and train the model;
- Use Equation (9) to calculate the fitness of each gray wolf. is the expected value of the square of the difference between the real value and the predicted value. The greater the error, the greater the value. Select the three wolves with the smallest fitness, to search for GWO, update the position of other gray wolves to get the first candidate ;
- Use Equation (2) to search for DLH and generate another candidate for the new position of wolf . Equation (5) was used to compare the fitness of and and better candidates were selected. If the fitness of the selected candidate is less than , update with the selected candidate, otherwise remains unchanged in ;
- Determine whether to iterate to the maximum number of iterations. If , execute (10), otherwise , execute (6);
- Output the position coordinates of , that is, the optimal parameter combination of BiLSTM. input IGWO-BiLSTM training, obtain the optimized converged IGWO-BiLSTM network prediction model;
- By inputting the network attack data into the prediction model and comparing the normal network traffic with the attack network traffic, the attack can be predicted in a timely and accurate manner. The flow chart of IGWO-BiLSTM is shown in Figure 4, each component represents a specific practice in the forecasting process and together constitutes the forecasting operation process.
3.2. Threshold Selection
4. Experimental Simulation and Analysis
4.1. Data Set Selection
4.2. Feature Extraction and Analysis
4.3. Predictive Model Performance Comparison
4.3.1. ec_data Data Set Prediction Model Performance Display
4.3.2. DARPA99 Data Set Prediction Model Performance Display
4.4. Network Attack Detection and Analysis
4.5. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Roshan, K.; Zafar, A. Deep learning approaches for anomaly and intrusion detection in computer network: A review. In Cyber Security and Digital Forensics: Proceedings of ICCSDF; Springer: Singapore, 2021; Volume 73, pp. 551–563. [Google Scholar]
- Jian, S.J.; Lu, Z.G.; Du, D. Overview of network intrusion detection technology. J. Cyber Secur. 2020, 5, 96–122. [Google Scholar]
- Cheema, A.; Tariq, M.; Hafiz, A. Prevention Techniques against Distributed Denial of Service Attacks in Heterogeneous Networks: A Systematic Review. Secur. Commun. Netw. 2022, 2022, 8379532. [Google Scholar] [CrossRef]
- Black, S.; Kim, Y. An Overview on Detection and Prevention of Application Layer DDoS Attacks. In Proceedings of the IEEE 12th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 26–29 January 2022; pp. 791–800. [Google Scholar]
- Zheng, Y.; Li, Z.; Xu, X. Dynamic defenses in cyber security: Techniques, methods and challenges. Digit. Commun. Netw. 2022, 8, 422–435. [Google Scholar] [CrossRef]
- Lohrasbinasab, I.; Shahraki, A.; Taherkordi, A. From statistical-to machine learning-based network traffic prediction. Trans. Emerg. Telecommun. Technol. 2022, 33, e4394. [Google Scholar] [CrossRef]
- Fan, J.; Mu, D.; Liu, Y. Research on network traffic prediction model based on neural network. In Proceedings of the 2nd International Conference on Information Systems and Computer Aided Education (ICISCAE), Dalian, China, 28–30 September 2019; pp. 554–557. [Google Scholar]
- Laurenti, L.; Tinti, E.; Galasso, F. Deep learning for laboratory earthquake prediction and autoregressive forecasting of fault zone stress. Earth Planet. Sci. Lett. 2022, 598, 117825. [Google Scholar] [CrossRef]
- Siqueira, H.; Belotti, J.T.; Boccato, L. Recursive linear models optimized by bioinspired metaheuristics to streamflow time series prediction. Int. Trans. Oper. Res. 2023, 30, 742–773. [Google Scholar] [CrossRef]
- Alzahrani, S.I.; Aljamaan, I.A.; AI-Fakin, E.A. Forecasting the spread of the COVID-19 pandemic in Saudi Arabia using ARIMA prediction model under current public health interventions. J. Infect. Public Health 2020, 13, 919. [Google Scholar] [CrossRef] [PubMed]
- Huang, C.W.; Chiang, C.T.; Li, Q. A study of deep learning networks on mobile traffic forecasting. In Proceedings of the 2017 IEEE 28th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), Montreal, QC, Canada, 8–13 October 2017; pp. 1–6. [Google Scholar]
- Sebastian, K.; Gao, H.; Xing, X. Utilizing an Ensemble STL Decomposition and GRU Model for Base Station Traffic Forecasting. In Proceedings of the 2020 59th Annual Conference of the Society of Instrument and Control Engineers of Japan (SICE), Chiang Mai, Thailand, 23–26 September 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 314–319. [Google Scholar]
- Trinh, H.D.; Giupponi, L.; Dini, P. Mobile traffic prediction from raw data using LSTM networks. In Proceedings of the 2018 IEEE 29th Annual International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC), Bologna, Italy, 9–12 September 2018; Volume 25, pp. 1827–1832. [Google Scholar]
- Bi, J.; Zhang, X.; Yuan, H. A Hybrid Prediction Method for Realistic Network Traffic With Temporal Convolutional Network and LSTM. IEEE Trans. Autom. Sci. Eng. 2022, 19, 1869–1879. [Google Scholar] [CrossRef]
- Lu, S.; Zhang, Q.; Chen, G. A combined method for short-term traffic flow prediction based on recurrent neural network. Alex. Eng. J. 2021, 60, 87–94. [Google Scholar] [CrossRef]
- Ramakrishnan, N.; Soni, T. Network traffic prediction using recurrent neural networks. In Proceedings of the 17th IEEE International Conference on Machine Learning and Applications (ICMLA), Orlando, FL, USA, 17–20 December 2018; pp. 187–193. [Google Scholar]
- Siami-Namini, S.; Tavakoli, N.; Namin, A.S. The performance of LSTM and BiLSTM in forecasting time series. In Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, 9–12 December 2019; pp. 3285–3292. [Google Scholar]
- Nadimi-Shahraki, M.H.; Taghian, S.; Mirjalili, S. An improved grey wolf optimizer for solving engineering problems. Expert Syst. Appl. 2021, 166, 113917. [Google Scholar] [CrossRef]
- Lin, Z.; Sun, X.; Ji, Y. Landslide displacement prediction based on time series analysis and Double-BiLSTM Model. Int. J. Environ. Res. Public Health 2022, 19, 2077. [Google Scholar] [CrossRef] [PubMed]
- Ansari, M.S.; Bartos, V.; Lee, B. Shallow and Deep Learning Approaches for Network Intrusion Alert Prediction. Procedia Comput. 2020, 171, 644–653. [Google Scholar] [CrossRef]
- Ansari, M.S.; Bartoš, V.; Lee, B. GRU-based deep learning approach for network intrusion alert prediction. Future Gener. Comput. Syst. 2022, 128, 235–247. [Google Scholar] [CrossRef]
- Bartos, V.; Zadnik, M.; Habib, S.M.; Vasilomanolakis, E. Network entity characterization and attack prediction. Future Gener. Comput. Syst. 2019, 97, 674–686. [Google Scholar] [CrossRef] [Green Version]
- Cheng, J.; Luo, Y.; Tang, X.; Ou, M. DDoS attack detection method based on LSTM traffic prediction. J. Huazhong Univ. Sci. Technol. (Nat. Sci. Ed.) 2019, 47, 32–36. [Google Scholar]
Dataset Name | The Amount of Data | Data Unit | Statistical Interval |
---|---|---|---|
ec_data | 14,772 | Mb | 5 min |
DARPA99 | 19,800 | IPDCF | 1 min |
DARPA00 | 25 | IPDCF | 1 min |
No. | Network Traffic |
---|---|
1 | 3,562,279,127 |
2 | 3,710,215,571 |
3 | 3,877,469,703 |
4 | 3,876,354,871 |
5 | 4,582,542,581 |
6 | 5,016,336,869 |
No. | Time | Source | Destination | Protocol | Length |
---|---|---|---|---|---|
1 | 0.00000 | HewlettP_61:aa:c9 | HewlettP_61:aa:c9 | LLC | 54 |
2 | 0.346281 | 192.168.1.30 | 172.16.112.100 | SNMP | 146 |
3 | 0.347844 | 172.16.112.100 | 192.168.1.30 | SNMP | 159 |
4 | 1.499118 | HewlettP_61:aa:c9 | HewlettP_61:aa:c9 | LLC | 54 |
5 | 2.341313 | 192.168.1.30 | 172.16.112.100 | SNMP | 146 |
6 | 2.342837 | 172.16.112.100 | 192.168.1.30 | SNMP | 159 |
Method | RMSE | R2 | MAE |
---|---|---|---|
IGWO-RNN | 0.0483 | 0.6688 | 0.0443 |
IGWO-LSTM | 0.0529 | 0.4263 | 0.0326 |
IGWO-GRU | 0.0352 | 0.9313 | 0.0259 |
IGWO-BiLSTM | 0.0094 | 0.9905 | 0.0200 |
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. |
© 2023 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
Qiu, S.; Wang, Y.; Lv, Y.; Chen, F.; Zhao, J. Optimizing BiLSTM Network Attack Prediction Based on Improved Gray Wolf Algorithm. Appl. Sci. 2023, 13, 6871. https://doi.org/10.3390/app13126871
Qiu S, Wang Y, Lv Y, Chen F, Zhao J. Optimizing BiLSTM Network Attack Prediction Based on Improved Gray Wolf Algorithm. Applied Sciences. 2023; 13(12):6871. https://doi.org/10.3390/app13126871
Chicago/Turabian StyleQiu, Shaoming, Yahui Wang, Yana Lv, Fen Chen, and Jiancheng Zhao. 2023. "Optimizing BiLSTM Network Attack Prediction Based on Improved Gray Wolf Algorithm" Applied Sciences 13, no. 12: 6871. https://doi.org/10.3390/app13126871
APA StyleQiu, S., Wang, Y., Lv, Y., Chen, F., & Zhao, J. (2023). Optimizing BiLSTM Network Attack Prediction Based on Improved Gray Wolf Algorithm. Applied Sciences, 13(12), 6871. https://doi.org/10.3390/app13126871