A Lightweight Network Intrusion Detection System Based on Temporal Convolutional Networks and Attention Mechanisms
Main Article Content
Abstract
The proliferation of Internet of Things (IoT) devices has led to a significant increase in the number and complexity of cyberattacks, posing severe challenges to global cybersecurity and exposing the limitations of traditional signature-based intrusion detection systems (IDS) in addressing unknown or evolving threats. To tackle this issue, we propose TCNSE, a network intrusion detection model that integrates a Temporal Convolutional Network (TCN) with a Squeeze-and- Excitation (SE) module. The TCN effectively captures temporal dependencies in network traffic through dilated convolutions, while the SE module enhances feature representation by modeling inter-channel relationships. Our model maintains high detection accuracy with low computational complexity, making it suitable for deployment on resource-constrained IoT devices. We applied our model to the CIC-IDS 2018 dataset, implementing efficient data preprocessing and feature selection techniques that reduced the number of features from over 80 to 20. We also addressed class imbalance using hybrid sampling methods and Focal Loss. Experimental results demonstrate that the TCNSE model outperforms existing advanced intrusion detection models, achieving key performance metrics of 98.4% accuracy, 99.4% precision, 98.7% recall, and a 99.1% F1 score.