Abstract
Although traditional research methods for intrusion detection can effectively prevent and mitigate issues such as data leaks to avoid severe consequences, existing intrusion detection technologies encounter limitations, including low classification accuracy and high false positive rates, particularly when dealing with high-dimensional, complex network anomaly traffic data. Additionally, the common problem of class imbalance in intrusion detection datasets exacerbates these challenges. This paper introduces a novel approach to network intrusion detection classification, termed SGAN-RL, which integrates ResNet and LSTM models based on the semi-supervised generative adversarial network (SGAN) framework. This method utilizes SGAN to generate synthetic data resembling real intrusion detection data and continually trains the discriminator to produce high-quality data, thereby enhancing data distribution balance and quality. Moreover, a fusion intrusion detection classification model is presented, leveraging the strengths of ResNet and LSTM architectures to capture spatial and temporal features, respectively. This synergistic fusion enhances the model’s capacity for comprehensive data representation, resulting in improved performance in intrusion detection data classification tasks. Experiments conducted on intrusion detection datasets NSL-KDD, UNSW-NB15, and CIC-IDS2017 demonstrate that the proposed model enhances accuracy, precision, recall, F1-score, ROC-AUC, PR-AUC, respectively, showcasing its robust performance and reliability in network intrusion detection classification.
Introduction
According to a report released by the China Internet Network Information Center, as of June 2023, the number of internet users in China had surpassed 1.079 billion, marking an increase of 11.09 million compared to December 2022. This figure accounts for 76.4% of the total population. With the rapid expansion of internet users, ensuring information security and privacy poses significant challenges. Early detection and prevention of network intrusions have become increasingly crucial. The concept of intrusion detection technology was initially proposed by Anderson [1]. Existing computer and data network security have been augmented by an innovative transformation method [2], operating continuously in an “open” mode.
Depending on the source of the data they acquire, intrusion detection systems can be categorized into network-based (Network Intrusion Detection System, NIDS) and host-based (Host Intrusion Detection System, HIDS) systems [3–5]. Network-based intrusion detection systems monitor real-time network traffic, collecting packet information and scrutinizing their content to identify intrusive behavior within the network. Conversely, host-based intrusion detection systems monitor the operations or states of host systems to detect intrusion events.
Traditional machine learning methods primarily emphasize feature selection and decomposition, assessing the correlation between features to identify appropriate feature combinations. These methods demonstrate effectiveness in managing relatively small intrusion detection datasets with reasonable training speeds. For instance, classic machine learning techniques including decision trees [6], naive Bayes [7], random forests [8], support vector machines [9], and clustering [10] have been employed for network intrusion detection. However, these methods heavily depend on feature engineering and encounter challenges when confronted with datasets containing numerous features and high-dimensional data.
Deep learning, as a branch of machine learning, excels in various aspects including automatic feature learning from data, adaptation to complex data distributions, and scalability of models compared to traditional machine learning methods. Numerous researchers have applied deep neural network models such as Convolutional Neural Networks (CNNs) [11], Recurrent Neural Networks (RNNs) [12], and Long Short-Term Memory Networks (LSTMs) [13] to intrusion detection tasks. However, deep learning networks may encounter degradation in performance when the network depth reaches a certain level. Additionally, single-type neural networks struggle to simultaneously extract both temporal and spatial features.
To tackle the challenges posed by imbalanced intrusion detection datasets, gradient degradation in deep learning networks, and the inability to simultaneously consider spatial and temporal features, our approach involved utilizing data augmentation techniques to address the limitations of data scarcity and uneven data distribution. Subsequently, we employed a combination of LSTM and residual network architectures to effectively capture both spatial and temporal features in intrusion detection data while mitigating issues related to gradient degradation.
The main contributions of this paper are as follows: We proposed a framework for intrusion detection classification method named SCAN-RL, which integrates data augmentation techniques and a fusion model of deep learning. This approach enhances the richness of samples and the representational capability of the model by combining the powerful feature extraction ability of deep learning algorithms with the sample augmentation capability of data augmentation. Consequently, it improves the accuracy and robustness of the model for intrusion detection. We designed the Semi-supervised learning-based on Generative Adversarial Network (SCAN) for intrusion detection. By generating intrusion detection class sample data through this method and integrating it with the original dataset, the accuracy of multi-classification results of imbalanced data is enhanced. Moreover, an attention mechanism is incorporated into the model to elevate the weight of important features and reduce training time. We developed an RL model based on ResNet and LSTM. In this design, ResNet is employed to map data forward to deep networks, maximizing information retention. Additionally, the model incorporates convolution operations and LSTM within ConvLSTM networks to extract spatial and temporal features, respectively, thereby addressing the issue of degradation in deep learning networks. Following feature extraction in the fusion model, the features are inputted into the softmax function for classification. The efficiency of the proposed intrusion detection classification method SGAN-RL is validated using three distinct datasets: NSL-KDD, UNSW-NB15, and CIC-IDS2017. The results demonstrate that compared with traditional intrusion detection methods, the accuracy, precision, recall, F1-score, ROC-AUC, PR-AUC, and robust performance are improved and enhanced on the three datasets.
The structure of this paper is outlined as follows: Section 2 scrutinizes pertinent research concerning intrusion detection. Section 3 presents the preprocessing methods applied to network intrusion detection data. Section 4 elaborates on the proposed fusion classification method for network intrusion detection, incorporating data augmentation techniques. Section 5 outlines the comparative experiments and their corresponding evaluations. Section 6 delves into a discussion of the proposed method. Lastly, Section 7 offers conclusions drawn from the study and outlines potential avenues for future research.
Related work
Data preprocessing
In order to effectively integrate the fusion model utilized in this paper, preprocessing steps are essential for the dataset. This ensures better alignment with the model and facilitates the study of relationships within the data. The feature matrix of the original dataset before preprocessing, denoted as T1, is represented as shown in Equation (1).
In the feature matrix T1, a represents the feature vector, y represents the label vector, n denotes the number of features, and o represents the number of network traffic records. It’s important to note that different datasets may have varying numbers of features and different quantities of network traffic.
Each data point in the dataset corresponds to a network traffic record, with each record having different attribute descriptions. While the majority of features are numerical and based on either time-related traffic or host traffic, there are a few non-numerical character features present. However, in deep learning models, character features cannot be directly recognized and processed by neurons, thus necessitating their transformation into numerical features. In this paper, One-Hot encoding is selected to convert the character features and classification labels in the dataset into one-hot encoded binary vectors. In the feature matrix T1 of the original dataset, numerical features remain unchanged, while the character feature vectors are extracted to form a new feature matrix
In the character feature matrix
A feature a
i
is processed through One-Hot encoding to become a one-dimensional vector, where α represents the number of possible values for that feature. Following the rule in Equation (4), the character feature matrix
After the transformation, the two numerical feature matrices T1 and are horizontally concatenated to form a new feature matrix T2, as shown in Equation (6).
Following the one-hot encoding of the feature columns in the dataset, the correlation matrix is computed among numerical features, alongside the determination of Pearson correlation coefficients between specified numerical columns. This coefficient quantifies the magnitude and direction of the linear relationship between two variables, ranging from –1 to 1. A coefficient of 1 denotes a perfect positive correlation, while –1 signifies a perfect negative correlation, and 0 indicates no linear correlation. Calculate the correlation coefficient between each feature and the label feature in the dataset. Utilize the absolute values of these correlation coefficients to identify features exhibiting strong correlation, regardless of their positive or negative correlation. Subsequently, select features with a correlation with the label feature exceeding 0.3, considering both positive and negative correlations. This customizable threshold ensures the selection of moderately correlated features. To gain deeper insights into features with a stronger relationship with the label, arrange these highly correlated features in descending order based on their correlation coefficient values with the label feature. Retrieve the names (i.e., column names) of these highly correlated features. Construct a new dataset comprising solely the selected feature names. This new dataset exclusively retains the feature columns from the original dataset that are highly correlated with the label.
At this stage, redundant features in the dataset have been entirely eliminated.
Min-max normalization
The evaluation of different features within a feature vector often involves different units of measurement, which can significantly impact the results of data processing. In intrusion detection data standardization methods, the most effective approach is min-max normalization. The purpose of min-max normalization is to confine preprocessed data within a comparable range, thereby mitigating adverse effects caused by extreme sample data. This normalization technique maps all data such that the maximum value becomes 1 and the minimum value becomes 0, while the remaining values are scaled to fall within the interval between 0 and 1. After One-Hot encoding, a feature vector a
ij
in the feature matrix T2 undergoes min-max normalization, as illustrated in Equation (7).
After min-max normalization, the original vector a
ij
is replaced by the new vector
The distribution of sample categories in intrusion detection datasets is often imbalanced, which can have a significantly negative impact on the accuracy of classification results. An effective approach to address this issue is to perform random oversampling of the classes with fewer samples. This involves randomly selecting old samples from a smaller number of attack traffic instances multiple times, combining them with the existing samples, and then integrating them with other original data to form a new balanced dataset.
In the intrusion detection feature matrix
In the feature matrix
This paper employs a fusion model of ResNet and LSTM (RL) for network intrusion detection classification. It leverages the ResNet network’s capability to effectively address the problem of network degradation and the LSTM’s efficiency in handling temporal features to improve the accuracy issue in network intrusion detection classification and enhance robust performance. By integrating ResNet and LSTM, both spatial and temporal features are considered, thereby improving the predictive performance of the model on intrusion detection datasets.
The overall architecture of the model is illustrated in Fig. 1. Firstly, a data preprocessing module is employed to remove redundant features, process the data as necessary to fit the model’s dimensions and data format, and perform oversampling to address imbalanced data distributions. Secondly, the preprocessed training set is fed into ResNet and LSTM models for feature extraction separately. The extracted feature matrices are then fused, and the model is continuously trained. Finally, data augmentation is performed using the self-supervised generative adversarial network (SGAN) to enhance data balance. Additionally, an attention mechanism is incorporated into the SGAN-RL model to strengthen the learning of important features, further improving the accuracy of the model’s classification.

The refined network architecture diagram of model SGAN-RL.
The objective of the generator in the SGAN network used in this paper [23] remains consistent with the original GAN network, wherein it takes random noise as input and generates pseudo data realistic enough to be indistinguishable from real data. However, the discriminator in SGAN differs significantly from that of the original GAN network. Before employing the SGAN network, the preprocessing of the intrusion detection raw dataset involves utilizing the data preprocessing method proposed in Section 3 of this paper. The feature matrix T, obtained after One-Hot encoding and normalization of the intrusion detection dataset, serves as part of the input to the SGAN model discriminator.
The discriminator of the SGAN model proposed in this paper primarily receives three types of input. The first input is the pseudo samples T
F
generated by the generator using random noise S, as shown in Equation (11).
The latter two inputs are labeled real samples T from the training dataset and unlabeled real samples T0, as shown in Equations (12) and (13).
The purpose of employing the SGAN network is to generate data with a distribution similar to that of the original data and utilize this generated data to replace the original data.
The optimization objective function of SGAN is shown in Equations (14) and (15).
In Equation (14), G represents the generator in the SGAN model proposed in this paper, and D represents the discriminator. In Equation (15), the discriminator D tries to increase the value of the function V, while the generator Gtries to decrease the value of the function V, and they are in mutual opposition.
The SGAN network utilized in this paper comprises a generator and a discriminator. The generator constructed in this study consists of three convolutional blocks. Each convolutional block comprises one ConvTranspose transpose convolutional layer, one Batch Normalization layer, one LeakyReLU activation function layer, and one Dropout layer. Following the three convolutional blocks is a fully connected layer used to control the output dimension of the generator, followed by the output. Specifically, the structure of the SGAN generator is illustrated in Fig. 1(a). The SGAN generator algorithm is depicted in Algorithm 1.
Algorithm 1: SGAN generator algorithm
Input: random noise S = (t1, t2, …, t r ), label vector Y = (y1, y2, …, y s )
Output: T F ={ (e11, e12, …, e1r) (es1, e22, …, e2r) … (es1, es2, …, e sr ) }
(1) q1 ← Dense (S, Y)
(2) for each k ∈ [1, 3] do
(3) q1 ← Conv Transpose, BN layer, ReLU activation function, Dropout (q1)
(4) end for
(5) T F ← Dense (q1)
(6) return T F
The SGAN generator algorithm produces realistic synthetic data samples for intrusion detection through a generative model, notably augmenting the quantity of data for classes with small samples, thereby enhancing the overall accuracy of the method.
Discriminator
The discriminator comprises three convolutional blocks. The first convolutional block includes one Conv layer followed by an activation function layer, LeakReLU. The other two convolutional blocks consist of one Conv layer followed by a BN layer and an activation function layer, LeakReLU. In the classification output section, since the discriminator in this paper adopts the SGAN network concept to address the multi-classification problem of distinguishing real labels, it utilizes the softmax function. This function provides a probability distribution over a given number of categories. The higher the probability assigned to a specific class label, the more confident the discriminator is that the sample belongs to that class. To calculate the classification error, cross-entropy loss is employed to measure the difference between the output probabilities and the target one-hot encoded labels. Consequently, the output layer can both authenticate the input data and make classification predictions. The structural diagram of the SGAN discriminator is depicted in Fig. 1(b). The algorithm flow for the discriminator part of the intrusion detection data augmentation method based on the SGAN generative adversarial network proposed in this paper, responsible for distinguishing between mixed real data and fake data generated by the generator, is illustrated in Algorithm 2.
Algorithm 2: SGAN discriminator algorithm
Input: Generated intrusion detection pseudo samples T F , labeled intrusion detection real dataset T, unlabeled intrusion detection real dataset T0.
Output: R1 = {Real, Fake},
(1) q2← Conv, 64(T, T0, T F )
(2) for each k ∈ [1, 2] do
(3) q2← Conv, 64*k, BN layer, LeakReLU Activation function (q2)
(4) end for
(5) R1, R2← Softmax, sigmoid (q2)
(6) return R1, R2
In Algorithm 2, line 1 performs pre-convolution operations on three input matrices T, T0, T F Lines 2, 3, and 4 represent convolutional blocks with increasing channel sizes. Line 5 performs classification prediction using softmax and sigmoid functions.
The discriminator endeavors to distinguish between real and generated data. The discriminator and the generator engage in competition, driving the generator to continuously refine the generated intrusion detection data, making it increasingly closer to real intrusion detection data.
Feature extraction and fusion model
This paper proposes a ResNet-LSTM fusion model, referred to as the RL model. The model combines the advantages of ResNet and LSTM networks in model convergence and feature extraction, addressing the issues of gradient explosion in deep networks and effective feature extraction for intrusion detection data.
ResNet network model
This paper adopts the ResNet network [25] to address the problem of gradient explosion that arises as traditional convolutional neural networks deepen. Simultaneously, it effectively reduces the computational load of model convergence and mitigates overfitting issues.
The residual structure for intrusion detection, as shown in Equation (16), where x ij represents the feature vector in the intrusion detection dataset’s feature matrix used for feature extraction by the residual network, and x ij is the feature of a deeper layer network, whose relationship with the shallow layer network feature x ij can be represented by Equation (16).
The residual network part of the ResNet-LSTM model proposed in this paper is structured as shown in Table 1. The NSL-KDD dataset used in this study is transformed into a 122×1 dimensional data structure after preprocessing and One-Hot encoding. Due to the dimensionality of the data, the ResNet network section designed contains one pre-convolutional layer, each residual block contains two convolutional layers, and there are a total of six convolutional layers in three residual blocks.
Residual network structure
In the ResNet-LSTM model proposed in this paper, the residual network section consists of one pre-convolutional layer and 3 residual blocks. The structure of the residual blocks are as shown in Fig. 1(c) ResNet network. The pre-convolutional layer is followed by a Batch Normalization (BN) layer and an activation function. The first residual block includes two convolutional layers, one BN layer, and one activation function. The second and third residual blocks each contain two convolutional layers, two BN layers, two activation functions, and one pooling layer.
Algorithm 3: Feature extraction algorithm based on ResNet network
Input: Training dataset T = {(x11, …, x1r, y1) ,
(x21, …, x2r, y2) , …, (xs1, …, x sr , y s )}, The number of samples is s, and the number of features is r.
Output: Feature set Z1{ f1, f2 …… f n }
(1) p1← Conv1D, BN layer, ReLU activation function (T)
(2) shortcut ←p1
(3) p1←Conv1D, BN layer, ReLU activation function, Conv1D (p1)
(4) p1← add[shortcut, p1]
(5) for each k ∈ [2, 3] do
(6) shortcut ←MaxPooling1D(p1)
(7) p1← Conv1D, BN layer, ReLU activation function, Dropout (p1)
(8) p1← add[shortcut, p1]
(9) end for
(10) Z1← BN layer, ReLU activation function, Flatten (p1)
(11) return Z1
In Algorithm 3, lines 1 and 2 define the pre-convolutional block and the residual block shortcut. Lines 3 and 4 define the first residual block. Lines 5 to 9 define the second and third residual blocks. Line 10 represents the generation of feature set Z1.
Algorithm 3 employs the ResNet model as part of feature extraction. The algorithm incorporates batch normalization before the activation layer, which effectively enhances the convergence speed of the model.
Compared to traditional LSTM networks, ConvLSTM [25] features more advanced memory units C t . When feature vectors x ij from the intrusion detection feature matrix Tare inputted into the memory units, the memory unit records and accumulates them for the next feature vector entry. The memory unit is also controlled by several gates for input and output. When a feature vector x ij is inputted, the input gate is activated. If the feature vector x ij is to be forgotten during the process, the forget gate is activated. The final state H t received by the memory unit from the output of memory unit C t controls the extraction of the feature vector x ij through the output gate o t . The ConvLSTM network structure employs a convolutional structure when multiplying the saved state with parameters. The learned parameters are the weights of the convolutional kernel. The internal structure of the ConvLSTM is depicted in Fig. 1(d), similar to a traditional LSTM network.
The operation rules of ConvLSTM are illustrated in Equations (17) to (21).
After the feature vectors x ij from the intrusion detection dataset’s feature matrix Tundergo ConvLSTM feature extraction processing, the final state is stored in H t . The feature extraction algorithm based on LSTM networks, primarily responsible for extracting temporal features, is outlined in Algorithm 4.
Algorithm 4: Feature extraction algorithm based on LSTM networks
Input: Training dataset T = {(x11, …, x1r, y1) ,
(x21, …, x2r, y2) , …, (xs1, …, x sr , y s )}, The number of samples is s, and the number of features is r. Output: Feature set Z2 ={ g1, g2, …, g n }
(1) for each k∈[0,3] do
(2) p2← Conv1D, BN layer, ReLU activation function, Dropout (T)
(3) end for
(4) 256 ← lstm_output_size
(5) p2← ConvLSTM1D, Dropout (p2)
(6) Z2← BN layer, ReLU activation function, Flatten (p2)
(7) return Z2
In Algorithm 4, lines 1, 2, and 3 are used to construct four convolutional layers. Lines 4 and 5 are used to construct one ConvLSTM layer. Line 6 generates the feature set Z2 through Flatten.
Algorithm 4 utilizes the ConvLSTM model to extract long-term temporal and spatiotemporal features. The model consists of three convolutional layers and one ConvLSTM1D layer, extracting multi-level features of different depths.
The preprocessed intrusion detection dataset feature matrix Tis inputted into both the ResNet model and the LSTM model for feature extraction. After feature extraction by both models, the intrusion detection feature sets Z1 and Z2 are obtained. These feature sets are fused into feature set H using the concatenate function, as shown in Equation (22).
The ResNet model and LSTM model mentioned in this paper independently extract features and then fuse them using the concatenate function, as shown in Algorithm 5.
Algorithm 5: Fusion Model Algorithm
Input: Features Set Z1, Z2
Output: model, a set containing classifications H ={(f1, g1) (f2, g2) …… (f n , g n )}
(1) m← concatenate(Z1, Z2)
(2) predictions ← Softmax(m)
(3) model ← loss(categorical_crossentropy), optimizer(adam)
(4) return model
In Algorithm 5, line 1 indicates the fusion of feature sets Z1 and Z2 using the concatenate function. Lines 2 and 3 are used for training the model and saving the trained model. Algorithm 5 integrates features extracted by two models for classification, effectively addressing network degradation issues while fully capturing the temporal characteristics of the data.
Experimental dataset
The NSL-KDD dataset [26] is a simplified version of the KDD’99 dataset. The labels of the NSL-KDD dataset include 38 types of attacks categorized into 4 anomaly types: Denial of Service (DoS), Probe, Remote-to-Local (R2L), and User-to-Root (U2R) attacks.
The UNSW-NB15 dataset [27] was created by the IXIA PerfectStorm tool at the University of New South Wales laboratory to generate a mixture of real-world network traffic and network attack behavior. This dataset contains a total of eight types of attacks: Fuzzers, Analysis, Backdoor, DoS, Exploits, Generic, Reconnaissance, and Worms. This dataset consist of 257,673 records, each with 45 features.
The CIC-IDS2017 dataset [28], developed by the Department of Computer Science at the University of New Brunswick in 2017, is captured from a real network configuration. It consists of two segments: the first containing 4 computers and the second containing 10 computers that are under attack. This dataset spans 5 days of data collection, comprising 2,830,734 instances and over 80 features.
NSL-KDD dataset experiment
Experiment on the NSL-KDD dataset involves preprocessing the raw data by feature encoding and using random oversampling and undersampling to standardize the dataset input into the RL model. The algorithms are evaluated separately for binary and multiclass classification.
(1) Binary Classification
In the binary classification experiments, the effectiveness of the RL model proposed in this paper is validated by comparing it with traditional machine learning and deep learning models, as depicted in Table 2. It is evident that the RL fusion model proposed in this paper achieves superior performance, with accuracy, precision, recall, and F1-score reaching 99.32%, 99.06%, 98.67%, and 98.78%, respectively, significantly outperforming other methods.
Binary classification on NSL-KDD
Binary classification on NSL-KDD
(2) Multiclass Classification
In the multiclass problem, due to the small amount of data for some attack types in the dataset, the classification accuracy of this category is lower, which affects the overall classification accuracy.
From Table 3, it is evident that while other models exhibit higher accuracy in classifying majority class attacks, they encounter challenges in detecting attacks within classes with fewer samples. In contrast, the RL method proposed in this paper achieves a lowest detection rate of 96.78% for minority class attack traffic, ensuring a high level of detection. This underscores the effectiveness of the RL algorithm in accurately classifying specific attack classes in multiclass scenarios, demonstrating robustperformance.
Each attack classification in NSL-KDD
From Table 4, comparisons were made with other contemporaneous models in the multiclass experiment. The proposed RL algorithm achieves an accuracy, precision, recall, F1-score, ROC-AUC, and PR-AUC of 99.10%, 99.09%, 99.06%, 99.01%, 99.92%, and 81.27%, respectively, for multiclass classification on the NSL-KDD dataset, significantly outperforming other papers from the same period.
Multiclass classification on NSL-KDD
Table 5 illustrates that after data augmentation, SGAN-RL outperforms the other two models, indicating superior robustness of the RL model.
Multiclass classification on NSL-KDD (noise influence)
(1) Binary Classification Comparative
From Table 6, the accuracy, precision, recall, and F1-score of the RL model proposed in this paper are 99.29%, 98.56%, 95.55%, and 96.49%, respectively, which surpass those of other methods.
Binary classification on UNSW-NB15
Binary classification on UNSW-NB15
(2) Multiclass Comparative Experiment
From Table 7, it can be observed that the RL model outperforms the other two models in multiclass classification. It achieves superior accuracy in six out of nine categories, while the accuracy in the remaining three categories is comparable.
Each attack classification in UNSW-NB15
From Table 8, comparisons were made with other contemporaneous models in the multiclass experiment. The proposed RL algorithm achieves an accuracy, precision, recall, F1-score, ROC-AUC, and PR-AUC of 89.95%, 89.89%, 89.86%, 89.89%, 98.76%, and 33.22%, respectively, for multiclass classification, significantly outperforming other papers from the same period.
multiclass classification on UNSW-NB15
As shown in Table 9, after adding adversarial data samples, the recall rate of ResNet decreased by 7%, and the performance of LSTM models declined by over 5% in all four aspects. In comparison, the performance of the RL model remained stable, indicating its outstanding robustness and resistance to interference.
Multiclass classification on UNSW-NB15 (noise influence)
(1) Binary Classification Comparative
From Table 10, the accuracy, precision, recall and F1-score of the RL fusion model proposed in this paper are 99.79%, 99.47%, 99.69% and 98.57%, respectively, which are higher compared to other methods.
Binary classification on CIC-IDS2017
Binary classification on CIC-IDS2017
(2) Multiclass Comparative Experiment
From Table 11, it is evident that the RL model exhibits higher classification accuracy in 14 out of 15 categories, suggesting its superiority over the other two models in multi-class classification tasks.
Each attack classification on CIC-IDS2017
From Table 12, comparisons were made with other contemporaneous models in the context of multi-class classification. The proposed RL algorithm achieves an accuracy, precision, F1-score, ROC-AUC, and PR-AUC of 93.84%, 94.58%, 93.14%, 99.64%, and 84.68%, respectively, for multiclass classification, significantly outperforming other models.
Multiclass classification on CIC-IDS2017
As shown in Table 13, the three models were combined with adversarial generative networks and subjected to comparative experiments on the CIC-IDS2017 dataset. The RL model exhibited superior experimental results in terms of accuracy, precision, recall, and F1 score, indicating its enhanced robustness and stronger resistance to interference.
Multiclass classification on CIC-IDS2017(noise influence)
Through comparative experiments on the NSL-KDD dataset, it is observed that the proposed deep learning RL fusion algorithm significantly improves the accuracy, precision, and recall of intrusion detection data classification compared to classical machine learning classification algorithms such as decision trees, Logistic regression, etc. This is because deep learning networks inherently possess better feature extraction, data fitting, and classification prediction capabilities compared to shallow models, thus providing more accurate intrusion detection classification results.
Furthermore, the comparative experiments show that the deep learning RL fusion algorithm outperforms single-structure deep learning models such as CNN, LSTM, etc., with an increase of over 24%, 26%, and 25% in accuracy, precision, and recall, respectively, in binary classification, and also have improvements in multi-classification scenarios. This superiority is attributed to the RL fusion model combining the advantages of ResNet and LSTM. Specifically, ResNet residual networks transmit information from shallow layers through direct mappings and residual blocks, addressing overfitting and the vanishing gradient problem in deep networks. Additionally, the RL fusion model employs LSTM to extract time-related features from intrusion detection data, which, combined with spatial features extracted by residual networks, resolves the challenge of handling spatial-temporal dual features in datasets, thus enhancing overall intrusion detection accuracy.
The comparison experiments on three datasets using SGAN models have demonstrated that RL models exhibit better classification robustness and resistance to interference. For instance, in a multi-classification scenario, utilizing SGAN-based data augmentation techniques, RL models show an improvement in F1 score compared to other deep learning algorithms. This enhancement can be attributed to the RL model’s superior feature extraction capability built upon data augmentation. Additionally, attention mechanisms have been integrated into the classification model to amplify the importance of specific features, thereby further enhancing the accuracy of classification results for categories with fewer samples.
However, there is still room for improvement in the research on network intrusion detection. Although the algorithm’s robustness has been validated on three different datasets, there are still some limitations, especially given the increasingly diverse trends in attack types in the current network environment. Therefore, to enhance network security, there is an urgent need to utilize the latest, more comprehensive, and detailed datasets to train and evaluate models for predicting network attacks, ensuring that the models can accurately identify and classify different types of attack behaviors. By training on such datasets, we can better understand and address the various threats in the current network environment, effectively safeguarding the security of networks and systems. Additionally, as this method involves multiple sub-models with numerous parameters, the model training in this study was optimized through manual parameter adjustment, resulting in low training efficiency. Automated parameter tuning will be studied in the future to improve the effectiveness of model training.
Conclusion and future work
This paper addresses the current issues in the field of intrusion detection by proposing a data augmentation method based on SGAN semi-supervised generative adversarial networks. This data augmentation model comprising a generator and a discriminator is established, where preprocessed raw data and randomly generated noise are inputted into the generator together. The generated fake data and real data are then inputted into the discriminator for discrimination, engaging in continuous adversarial training. This process results in the generation of high-quality data of the same type, thereby achieving sample expansion and data augmentation. Additionally, we design a network intrusion detection RL model by combining ResNet and LSTM. With ResNet, information is transmitted from shallow layers through direct mappings and residual blocks, effectively addressing the overfitting issues encountered during intrusion detection experiments. LSTM is used to extract both time and spatial features from intrusion detection data for improving overall intrusion detection accuracy. As a result, significant improvements in accuracy, with the highest increase of 18.78%, are observed in multi-classification intrusion detection problems. Furthermore, the proposed fusion model with data augmentation also significantly enhances precision and recall rates, with the highest precision increase of 6.54% and recall increase of 18.73%. This approach is particularly useful for addressing attacks with minimal sample sizes but high intrusion risks.
For future work, our focus will be on enhancing the detection capabilities against the dynamic and varied attack methods observed in real-world network environments. We plan to explore fine-tuning paradigms using pre-trained models to expand the detection scope, thereby further improving model robustness. Additionally, we aim to implement automated hyperparameter tuning during model training to intelligently optimize the model and enhance its effectiveness. These efforts will contribute to the continued advancement of intrusion detection systems, ensuring their adaptability and reliability in complex network environments.
Footnotes
Acknowledgments
This work was supported by National Natural Science Foundation of China (no.62376240), S& T Program of Hebei (nos.226Z0701G, 236Z0702G, 236Z0304G), the Natural Science Foundation of Hebei Province (nos. F2022203026, F2022203089), Science Research Project of Hebei Education Department (no. BJK2022029) and Innovation Capability Improvement Plan Project of Hebei Province (no. 22567637H). The authors are grateful to the valuable comments and suggestions of the reviewers.
