An Intrusion Detection System (IDS) is a critical component in safeguarding network security against increasingly complex cyberattacks. One of the main challenges in developing machine learning-based IDS is data imbalance, which reduces the model’s ability to detect attacks, particularly in the minority class. This study proposes improving the performance of deep learning-based IDS using a hybrid CNN-LSTM architecture combined with the prevalence ratio-based Selective SMOTE method, which is an oversampling approach performed selectively based on the imbalance level of each class. The dataset used is NSL-KDD, with preprocessing steps including categorical feature encoding and numerical feature normalization. Evaluation was conducted by comparing the baseline CNN–LSTM model and the CNN-LSTM with Selective SMOTE using the metrics accuracy, precision, recall, specificity, and F1-score. Experimental results show that the baseline model achieved an accuracy of 0.9947 with a macro recall of 0.8080, while the application of Selective SMOTE improved the macro recall to 0.8929 and the F1-score to 0.8515, particularly for minority classes such as U2R and R2L. Although accuracy decreased slightly to 0.9946, the specificity remained high at 0.9981 with a low false positive rate. These results indicate that the Selective SMOTE method is effective in improving attack detection sensitivity without significantly degrading the overall performance of the IDS system.
Copyrights © 2026