With the rapid expansion of the Internet of Things (IoT) in industrial, medical, and smart city applications, ensuring network security has become a fundamental challenge. One of the primary issues in Intrusion Detection Systems (IDS) is the imbalance in training data and the scarcity of rare attack data, both of which reduce the accuracy of learning models. In this study, a two-layer method based on data augmentation and improved attack classification was proposed to enhance the accuracy of detecting rare threats in IoT. In the first layer, a contrastive learning-based encoder was designed to generate new samples for the minority class using partial differential equations. This approach extracts the shared latent features of minority class data and reflects them with maximum possible accuracy while maintaining the highest level of distinction from other classes. In the second layer, a Bidirectional Long Short-Term Memory (BLSTM) model with a propagation-based classifier was employed to process the augmented data and improve attack detection accuracy. Evaluation results on the NSL-KDD dataset demonstrated that the proposed method outperformed existing models by achieving a 2.22% improvement in accuracy, a 0.68% improvement in precision, a 5.09% improvement in recall, a 2.9% improvement in F1-score, and a 12.34% reduction in false alarms. These findings indicated an increase in the reliability of the proposed approach for detecting rare attacks and enhancing the performance of intrusion detection systems in IoT networks.
Mahdavinia et al. (Mon,) studied this question.