A Transformer-based network intrusion detection system (t-NIDS) that integrates a Transformer encoder with contrastive learning to learn discriminative and robust feature representations for network traffic classification is proposed, suitable for practical deployment in real-world network intrusion detection environments.
Abstract
Network intrusion detection systems (NIDS) play a critical role in protecting modern communication networks against increasingly sophisticated cyber attacks. In this paper, we propose a Transformer-based network intrusion detection system (t-NIDS) that integrates a Transformer encoder with contrastive learning to learn discriminative and robust feature representations for network traffic classification. To improve representation learning under highly imbalanced data distributions, the proposed framework employs balanced sampling together with dropout-based view generation. Unlike conventional Transformer-based approaches that typically rely on high-dimensional embedding representations, the proposed framework achieves competitive detection performance using a compact embedding representation while maintaining a lightweight architecture. The proposed method was comprehensively evaluated on the CIC-IDS2017, CIC-DDoS2019, and NSL-KDD benchmark datasets. To improve the statistical reliability of the evaluation, all experiments were independently repeated ten times using randomly sampled training and testing datasets, and the average performance with standard deviation was reported. Experimental results demonstrate that the proposed framework consistently outperforms representative state-of-the-art methods, achieving average performance improvements of 6.63%, 5.06%, and 1.42% on the CIC-IDS2017, CIC-DDoS2019, and NSL-KDD datasets, respectively. In particular, the proposed method achieved a 112% improvement for the SQL Injection class on CIC-IDS2017 and a 17.43% improvement for the UDP class on CIC-DDoS2019. These results demonstrate that the proposed framework effectively captures complex traffic patterns while learning compact and discriminative feature representations with a lightweight Transformer architecture. Consequently, the proposed t-NIDS provides an effective balance between detection accuracy, computational efficiency, and robustness, making it suitable for practical deployment in real-world network intrusion detection environments.
An Enhanced Multi-Model Ensemble Network Intrusion Detection System (EME-NIDS), a deep meta-learning system that combines five different heterogeneous learning paradigms, including Convolutional Neural Networks, Dense Neural Networks, Transformers, XGBoost, and Random Forests is introduced.
ManFormer is designed and implements, a hybrid Transformer–Mamba classification architecture that integrates Transformer and Mamba for high-dimensional imbalanced classification tasks, and achieves good overall performance in high-dimensional imbalanced multi-class intrusion detection tasks.
Chang-Sheng Zhu, Tao Yue, Hong-Wei Bai et al.· Engineering Research Express· 0 citations
The revised framework extends this four-layer pipeline by explicitly integrating Explainable AI (XAI) and edge-oriented deployment as cross-cutting operational requirements by explicitly integrating Explainable AI (XAI) and edge-oriented deployment as cross-cutting operational requirements.
A. Havy, Muhammad Faishol Amrulloh· Jurnal Riset Informatika· 0 citations
A new graph-guided contrastive transformer-based intrusion detection system (GCT-IDS) which aims at improving detection accuracy and robustness and preserving real-time feasibility is presented.
Traditional Network Intrusion Detection Systems (NIDS) usually have high false-positive rates, low interpretability, and inefficiency in detecting offensive attack patterns in real-time. This paper will describe a dual-pipeline NID architecture which combines ensemble machine learning and hybrid deep learning models to...
Namash Kate, P. Suryavanshi, Mayank Patil· Boletim da Sociedade Paranae...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.