Transformer-based network intrusion detection systems (NIDS) have shown strong potential for detecting multi-stage cyberattacks, yet most methods construct input sequences using fixed temporalization schemes rather than treating sequence construction as a systems design decision. In flow-based intrusion detection, timestamp-based windowing often fragments related attack activities while merging unrelated communications, reducing the behavioral context available to transformers. We present a unified pipeline abstraction that decomposes transformer-based NIDS into four design dimensions (traffic representation, temporalization, transformer backbone, and prediction aggregation) and propose session-coherent temporalization, which constructs sequences from communication sessions instead of fixed time windows. Experiments on three complementary intrusion detection datasets show that temporalization is the dominant factor governing transformer performance: session-coherent temporalization more than doubles Macro-F1 over timestamp-based windowing, enabling lightweight transformers to achieve up to 0.95 Macro-F1 at substantially higher inference throughput than pretrained models. We further vary the transformer size from 0.65M to 3.38M parameters and find that larger transformer models provide no measurable accuracy improvement despite substantially higher computational cost, while zero-shot cross-dataset evaluation shows only modest gains under domain shift. These results indicate that preserving communication-session semantics, rather than scaling transformer capacity, is the key to accurate and efficient transformer-based intrusion detection.
FedSecureFormer: A Fast, Federated and Secure Transformer Framework for Lightweight Intrusion Detection in Connected and Autonomous Vehicles
Department of Computer Science and Information Systems, BITS Pilani, Pilani Campus(计算机科学与信息系统系,比斯汉学院);Department of Systems and Computer Engineering, Carleton University(系统与计算机工程系,卡尔顿大学)
Self-Supervised Transformer-based Contrastive Learning for Intrusion Detection Systems
Dept. of Electrical and Computer Engineering, University of Thessaly(电气与计算机工程系,希腊塞萨洛尼基大学);Centre for Research and Technology Hellas, CERTH(希腊研究中心与技术中心,CERTH)
A Novel Unified Lightweight Temporal-Spatial Transformer Approach for Intrusion Detection in Drone Networks
Department of Computer Science and Engineering, Jahangirnagar University(贾杭吉纳大学计算机科学与工程系);Department of Computer Science and Engineering, Bangladesh Army University of Science & Technology(孟加拉国陆军科学技术大学计算机科学与工程系);State University of Bangladesh, Department of Computer Science and Engineering(孟加拉国国立大学计算机科学与工程系);Skill Morph Research Lab., Skill Morph(Skill Morph研究实验室)
ExAI5G: A Logic-Based Explainable AI Framework for Intrusion Detection in 5G Networks
organization= Faculty of Information Technology;Electrical Engineering, University of Oulu , addressline= , city= Oulu , postcode= 90570 , state= , country= Finland
SE-Enhanced ViT and BiLSTM-Based Intrusion Detection for Secure IIoT and IoMT Environments
LSEA Lab., Faculty of Technology University of MEDEA Medea 26000, Algeria;LSEA Lab, Faculty of Science University of MEDEA Medea 26000, Algeria;Department of Computer Engineering Gazi University Ankara, Turkey;Department of Management Information Systems Gazi University Ankara, Turkey