Transformer-based deep learning framework for network intrusion detection with context-aware traffic pattern modeling
This paper introduces a context aware transformer based network intrusion detection framework using publicly available benchmark traffic data. The framework introduces three domain-specific modifications to the standard transformer encoder, a partitioned multi-head attention mechanism with separate intra-group and inter-group heads that model dependencies within and across semantic feature groups, a learned positional encoding over feature indices initialized with group-identity vectors, and a gated aggregation module that selectively weights encoder outputs before classification. Evaluation Experimental results show a high rate of convergence where the training accuracy is 0.99 and validation accuracy is 0.97 in 50 epochs. The model achieves a recall of 97.37%, accuracy of 98.43%, precision of 94.05%, F1-score of 95.69%, and MCC of 0.956, which are better than traditional deep learning methods. The proposed model leads on recall and MCC, which are the domain-primary metrics in intrusion detection since a missed attack constitutes a security breach while a false alarm is operationally manageable. The correct classification and intrusion traffic classification rates stand at 98.8 and 97.4% respectively as demonstrated by confusion matrix analysis. The model also attains a value of 0.9417 and 0.9527 of normal and intrusion classes respectively at high precision-recall. The stability and comparative analysis verify that robustness has been improved with lower variance (0.008). The role of every architectural element is also proven by ablation outcomes. On the whole, the given framework can be taken as an efficient and credible solution to contemporary intrusion detection systems.
Authors
- N. Sathiya
- R. Madonna Arieth
- R. Jennie Bharathi
- M. Nirmala
Institutions
- Vel Tech Rangarajan Dr. Sagunthala R&D Institute of Science and Technology (IN)
Publication Details
- Journal
- Discover Artificial Intelligence
- Published
- 2026-10-07
- DOI
- https://doi.org/10.1007/s44163-026-02273-1
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00