Comparative Analysis of Transformer and LSTM Architectures for Cybersecurity Threat Detection Using Machine Learning
The growing prevalence of advanced persistent threats (APTs), zero-day exploits, and the rapid proliferation of IoT devices have exposed limitations in traditional cybersecurity approaches. In response, this study presents a comparative analysis of deep learning models—specifically Long Short-Term Memory (LSTM) and Transformer-based architectures—for cybersecurity threat classification from textual data. Leveraging a standardized dataset and consistent preprocessing pipeline, both models are evaluated across key performance metrics, including accuracy, precision, recall, and F1-score. The results demonstrate that Transformer models significantly outperform LSTM-based approaches, exhibiting superior capacity to capture long-range dependencies, handle complex threat narratives, and generalize to previously unseen data. These findings offer valuable insights into the practical application of modern deep learning techniques in cybersecurity and provide a foundation for designing more robust and adaptive threat detection systems.
Authors
- Jobanpreet Kaur
- D. Shahi
- Md Fakhrul Hasan Bhuiyan (ORCID: https://orcid.org/0000-0003-1012-3808)
- Md Abdur Rob
- Hammed Esa
- Rakibul Hasan (ORCID: https://orcid.org/0009-0001-7268-390X)
- Mani Prabha
- Syed Nazmul Hasan (ORCID: https://orcid.org/0009-0003-1089-8870)
- Md Samiun
Institutions
- Wycliffe College (CA)
- International American University (LC)
- Ohio University (US)
Publication Details
- Journal
- EAI Endorsed Transactions on AI and Robotics
- Published
- 2025-09-22
- DOI
- https://doi.org/10.4108/airo.9759
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00