journal article·2024-04-30Open access

Enhancing Network Attack Detection Accuracy through the Integration of Large Language Models and Synchronized Attention Mechanism

Yuzhe Bai, Min Sun, Liman Zhang, Yinong Wang, Sihan Liu, Yanqiu Liu, Jingling Tan, Yingqiu Yang, Chunli Lv

Applied Sciences· Volume 14· Issue 9

Abstract

In this study, we propose a novel method for detecting cyberattack behaviors by leveraging the combined strengths of large language models and a synchronized attention mechanism. Extensive experiments conducted on diverse datasets, including server logs, financial behaviors, and comment data, demonstrate the significant advantages of this method over existing models such as Transformer, BERT, OPT-175B, LLaMa, and ChatGLM3-6B in key performance metrics such as precision, recall, and accuracy. For instance, on the server log dataset, the method achieved a precision of 93%, a recall of 91%, and an accuracy of 92%; on the financial behavior dataset, it reached a precision of 90%, a recall of 87%, and an accuracy of 89%; and on the comment data dataset, it excelled with a precision of 95%, a recall of 93%, and an accuracy of 94%. The introduction of a synchronized attention mechanism and a newly designed synchronized loss function proved especially effective, enhancing the method’s ability to process multi-source data and providing superior performance in identifying complex cyberattack patterns. Ablation experiments further validated the crucial roles of these innovations in boosting model performance: the synchronous attention mechanism substantially improved the model’s precision, recall, and accuracy to 93%, 89%, and 91% respectively, far exceeding other attention mechanisms. Similarly, the synchronized loss showcased a significant advantage, achieving the best performance across all tested metrics compared to traditional cross-entropy loss, focal loss, and MSE. These results underscore the method’s ability to deeply mine and analyze semantic information and contextual relationships within text data as well as to effectively integrate and process multimodal data, thereby offering strong technical support for the accurate and efficient detection of cyberattack behaviors.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Network Security and Intrusion Detection · Topic Modeling · Software Engineering Research

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

China Agricultural University, Beijing 100083, China

Funding

National Natural Science Foundation of China

References (47)

Show source-provided references
1. Rapid Application Development (RAD) model method for creating an agricultural irrigation system based on internet of things10.1088/1757-899X/1098/2/022103 ↗
2. An international systematic review of cyberbullying measurements10.1016/j.chb.2020.106485 ↗
3. Wu, J., Zhang, C., Liu, Z., Zhang, E., Wilson, S., and Zhang, C. (December, January 28). Graphbert: Bridging graph and text for malicious behavior detection on social media. Proceedings of the 2022 IEEE International Conference on Data Mining (ICDM), Orlando, FL, USA.10.1109/ICDM54844.2022.00065 ↗
4. Phishing attacks: A recent comprehensive study and a new anatomy10.3389/fcomp.2021.563060 ↗
5. A review of rule learning-based intrusion detection systems and their prospects in smart grids10.1109/ACCESS.2021.3071263 ↗
6. A survey of attack detection approaches in collaborative filtering recommender systems10.1007/s10462-020-09898-3 ↗
7. Alraizza, A., and Algarni, A. (2023). Ransomware detection using machine learning: A survey. Big Data Cogn. Comput., 7.10.3390/bdcc7030143 ↗
8. Cyberattack Detection Framework Using Machine Learning and User Behavior Analytics10.32604/csse.2023.026526 ↗
9. EIDM: Deep learning model for IoT intrusion detection systems10.1007/s11227-023-05197-0 ↗
10. A deep learning-based intrusion detection approach for mobile Ad-hoc network10.1007/s00500-023-08324-4 ↗
11. Replay attack detection in smart cities using deep learning10.1109/ACCESS.2020.3012411 ↗
12. Financial cybercrime: A comprehensive survey of deep learning approaches to tackle the evolving financial crime landscape10.1109/ACCESS.2021.3134076 ↗
13. Chu, J., Sha, Z., Backes, M., and Zhang, Y. (2024). Conversation Reconstruction Attack Against GPT Models. arXiv.
14. Hu, Y., Zou, F., Han, J., Sun, X., and Wang, Y. (2023). Llm-Tikg: Threat Intelligence Knowledge Graph Construction Utilizing Large Language Model. arXiv, Available at SSRN 4671345.10.2139/ssrn.4671345 ↗
15. Xu, J., Stokes, J.W., McDonald, G., Bai, X., Marshall, D., Wang, S., Swaminathan, A., and Li, Z. (2024). AutoAttacker: A Large Language Model Guided System to Implement Automatic Cyber-attacks. arXiv.
16. Intrusion detection based on bidirectional long short-term memory with attention mechanism
17. An, H., Ma, R., Yan, Y., Chen, T., Zhao, Y., Li, P., Li, J., Wang, X., Fan, D., and Lv, C. (2024). Finsformer: A Novel Approach to Detecting Financial Attacks Using Transformer and Cluster-Attention. Appl. Sci., 14.10.3390/app14010460 ↗
18. Wang, Y., Ma, W., Xu, H., Liu, Y., and Yin, P. (2023). A lightweight multi-view learning approach for phishing attack detection using transformer with mixture of experts. Appl. Sci., 13.10.3390/app13137429 ↗
19. A survey on evaluation of large language models10.1145/3641289 ↗
20. Meng, Y., Zhang, Y., Huang, J., Xiong, C., Ji, H., Zhang, C., and Han, J. (2020). Text classification using label names only: A language model self-training approach. arXiv.10.18653/v1/2020.emnlp-main.724 ↗
21. ChatGPT for good? On opportunities and challenges of large language models for education10.1016/j.lindif.2023.102274 ↗
22. Recent advances in natural language processing via large pre-trained language models: A survey10.1145/3605943 ↗
23. Transformer in transformer
24. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017). Advances in Neural Information Processing Systems, Neural Information Processing Systems Foundation, Inc. (NeurIPS).
25. Devlin, J., Chang, M.W., Lee, K., and Toutanova, K. (2018). Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv.
26. Liu, X., Zheng, Y., Du, Z., Ding, M., Qian, Y., Yang, Z., and Tang, J. (2023). GPT understands, too. AI Open, in press.10.1016/j.aiopen.2023.08.012 ↗
27. Min, S., Lewis, M., Hajishirzi, H., and Zettlemoyer, L. (2021). Noisy channel language model prompting for few-shot text classification. arXiv.10.18653/v1/2022.acl-long.365 ↗
28. Ebrahimi, M., Zhang, N., Hu, J., Raza, M.T., and Chen, H. (2020). Binary black-box evasion attacks against deep learning-based static malware detectors with adversarial byte-level language model. arXiv.
29. He, S., Zhu, J., He, P., and Lyu, M.R. (2020). Loghub: A large collection of system log datasets towards automated log analytics. arXiv.
30. Hazell, J. (2023). Large language models can be used to effectively scale spear phishing campaigns. arXiv.
31. Liu, M., Li, K., and Chen, T. (2020, January 18–22). DeepSQLi: Deep semantic learning for testing SQL injection. Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, Virtual Event, USA.10.1145/3395363.3397375 ↗
32. Detection of cross-site scripting (XSS) attacks using machine learning techniques: A review10.1007/s10462-023-10433-3 ↗
33. Building resilient SMEs: Harnessing large language models for cyber security in Australia
34. Ronneberger, O., Fischer, P., and Brox, T. (2015). Proceedings of the International Conference on Medical Image Computing and Computer—Assisted Intervention, Munich, Germany, 5–9 October 2015, Springer.
35. Zhang, Y., Liu, X., Wa, S., Liu, Y., Kang, J., and Lv, C. (2021). GenU-Net++: An Automatic Intracranial Brain Tumors Segmentation Algorithm on 3D Image Series with High Performance. Symmetry, 13.10.3390/sym13122395 ↗
36. A review on the attention mechanism of deep learning10.1016/j.neucom.2021.03.091 ↗
37. Deepsbd: A deep neural network model with attention mechanism for socialbot detection10.1109/TIFS.2021.3102498 ↗
38. Muthukumar, S., and Ashfauk Ahamed, A. (2024). A novel framework of DDoS attack detection in network using hybrid heuristic deep learning approaches with attention mechanism. J. High Speed Netw., 1–27.10.3233/JHS-230142 ↗
39. DM3Loc: Multi-label mRNA subcellular localization prediction and analysis based on multi-head self-attention mechanism10.1093/nar/gkab016 ↗
40. Cross-site scripting detection with two-channel feature fusion embedded in self-attention mechanism10.1016/j.cose.2022.102990 ↗
41. Wen, P., He, C., Xiong, W., and Liu, J. (2021, January 4–6). SQL injection detection technology based on BiLSTM-attention. Proceedings of the 2021 4th International Conference on Robotics, Control and Automation Engineering (RCAE), Wuhan, China.10.1109/RCAE53607.2021.9638837 ↗
42. CCBLA: A lightweight phishing detection model based on CNN, BiLSTM, and attention mechanism10.1007/s12559-022-10024-4 ↗
43. Slam: A malware detection method based on sliding local attention mechanism10.1155/2020/6724513 ↗
44. Viggiato, M., and Bezemer, C.P. (2023). Leveraging the OPT Large Language Model for Sentiment Analysis of Game Reviews. IEEE Trans. Games, 1–4.10.1109/TG.2023.3313121 ↗
45. Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., and Azhar, F. (2023). Llama: Open and efficient foundation language models. arXiv.
46. Zhao, H., Jiang, L., Jia, J., Torr, P.H., and Koltun, V. (2021, January 11–17). Point transformer. Proceedings of the IEEE/CVF International Conference on Computer Vision, Virtual.10.1109/ICCV48922.2021.01595 ↗
47. Song, C.W., and Tsai, Y.T. (2024). Hyacinth6B: A large language model for Traditional Chinese. arXiv.