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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparative Analysis of Transformer and LSTM Architectures for Cybersecurity Threat Detection Using Machine Learning

Jobanpreet Kaur, D. Shahi, Md Fakhrul Hasan Bhuiyan, Md Abdur Rob et al.
EAI Endorsed Transactions on AI and Robotics
Network Security and Intrusion Detection
article

Comparative Analysis of Transformer and LSTM Architectures for Cybersecurity Threat Detection Using Machine Learning

Jobanpreet Kaur, D. Shahi, Md Fakhrul Hasan Bhuiyan, Md Abdur Rob, Hammed Esa, Rakibul Hasan, Mani Prabha, Syed Nazmul Hasan, Md Samiun
article en

Abstract

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.

EAI Endorsed Transactions on AI and RoboticsVol. 4
Wycliffe College (CA), International American University (LC), Ohio University (US)
Openalex Percentile: Top 70%
Network Security and Intrusion Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.