# Intrusion Detection Using Attention-Based CNN-LSTM Model

Ban Al-Omar, Zouheir Trabelsi

<figure><img src="image_1.png" /></figure>

## To cite this version:

Ban Al-Omar, Zouheir Trabelsi. Intrusion Detection Using Attention-Based CNN-LSTM Model. 19th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2023, León, Spain. pp.515-526, 10.1007/978-3-031-34111-3_43. hal-05449776

HAL Id: hal-05449776

https://inria.hal.science/hal-05449776v1

Submitted on 9 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
<figure><img src="image_3.png" /></figure>

ifip

International Federation for Information Processing

This document is the original author manuscript of a paper submitted to an IFIP
conference proceedings or other IFIP publication by Springer Nature. As such, there
may be some differences in the official published version of the paper. Such
differences, if any, are usually due to reformatting during preparation for publication or
minor corrections made by the author(s) during final proofreading of the publication
manuscript.
# Intrusion Detection Using Attention-Based
CNN-LSTM Model

Ban Al-Omar(✉) and Zouheir Trabelsi

United Arab Emirates University, Al-Ain, UAE
{700039223,Trabelsi}@uaeu.ac.ae

**Abstract.** With the rise of sophisticated cyberattacks and the advent of complex and diverse technological systems, traditional methods of intrusion detection have become insufficient. The inability to prevent intrusions poses a severe threat to the credibility of security services, which may result in the compromise of data confidentiality, integrity, and availability. To address this challenge, research has proposed the use of Artificial Intelligence (AI) and deep learning (DL) models to enhance the effectiveness of intrusion detection. In this study, we present an Intrusion Detection System (IDS) that utilizes attention-based Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) models. The attention mechanism of the model allows for the identification of significant features in network traffic data for more precise predictions. Using the benchmark dataset UNSW-NB15, we validate the robustness and effectiveness of our model, achieving a detection rate of over 95%. Our results emphasize the robustness and effectiveness of the proposed system, demonstrating the immense potential of AI and DL models in bolstering intrusion detection.

**Keywords:** Intrusion Detection · Attention Based · CNN-LSTM

## 1 Introduction

With the continuous rise of threats and attacks, ensuring the effectiveness of IDS on computer networks has become strenuous. The present-day systems' heterogeneous, dynamic, and complex attributes have intensified the difficulty of addressing multiple forms of attacks. Network intrusion detection can be classified into two modes according to the behaviour of intrusion detection: Anomaly-Based Intrusion Detection Systems and Signature-Based Intrusion Detection Systems (SIDS) [4,27].

The Anomaly-Based approach detects new attacks by establishing a model of normal activities within a system and identify potential attacks from behaviours that deviate from the established normal behaviour pattern. SIDS, on the other hand, uses matching techniques to detect known attacks. The SIDS extracts
packet payloads and whenever a behaviour signature matches one from a previous intrusion existing in the signature database, the behaviour is classified as an intrusion [2,19].

The IDS's effectiveness is evaluated by its ability to accurately detect actual intrusions. In practice, the IDS's efficacy is determined by its capacity to minimize the false-positive rate (FPR) rather than maximizing the true-positive rate (TPR), as described in [2].

The current IDS have many significant limitations. For example, rare normal behaviours are sometimes classified as abnormal behaviours by anomaly detection IDS. At the same time, the diversity in the implementation mechanisms of the operating systems makes building a unified pattern library very difficult, hence, decreasing the efficiency of SIDS [20]. Several ML and DL techniques have been studied for the design of IDS. In particular, these techniques are used as classifiers to classify whether events are benign or attacks. They are used as well to identify the type of attacks. The use of DL outperform the use of traditional IDS due to its capabilities in handling a large amount of data, and building models that can be generalized to be effective in new network environments and new forms of attacks [12,13].

The objective of this paper is to demonstrate the application of AT-CNN-LSTM in intrusion detection. The key contributions of this paper are:

1. Introduction of an efficient and lightweight deep learning model that leverages attention-based CNN-LSTM. LSTM has become popular in intrusion detection due to its ability to effectively model and learn from sequential data. Capturing patterns in sequential data using LSTM networks is crucial in intrusion detection as it enables the detection of complex and sophisticated attacks that occur over time and requires a temporal understanding of the network traffic data. CNN, on the other hand, can learn patterns in the spatial distribution of network traffic, such as spikes or dips in traffic volume, and use these patterns to identify potential attacks. When combined with LSTM networks, CNNs can help to improve the accuracy and reliability of intrusion detection systems [6].

2. The use of the attention mechanism in the proposed model to enhance the ability of the model to focus on relevant features in the input data while ignoring the noise and irrelevant information. This attention mechanism, combined with the ability of the hybrid CNN-LSTM model to handle both spatial and temporal features, leads to a more accurate and efficient intrusion detection system.

3. Validation of the proposed model on the standard UNSW2015-NB15 network security dataset and performance evaluation based on accuracy, precision, recall and F1-score.

The structure of this paper is as follows: Sect. 2 provides an overview of prior research. Section 3 outlines the model design. Model evaluation and discussion are presented in Sect. 4. The paper concludes with the key findings of our work in Sect. 5.
## 2 Related Works

A considerable amount of research has been published on potential ways to improve intrusion detection using ML and DL. This section highlights research that has employed deep learning in intrusion detection.

A. Aldallal in [1] developed an IDS also using recurrent neural networks based on GRU and improved LSTM to classify the network flows instances as benign or malevolent. The CICIDS 2018 benchmark dataset was used to evaluate the model. The proposed model outperformed the benchmarks by 12.045%.

The authors of [7] assessed the performance of two RNN models, namely LSTM and GRU, for intrusion detection using the NSL-KDD dataset. Their goal was to classify three attack types (DoS, Probe, and R2L) among benign connections. The results showed accuracies of 96% for Probe attacks, 92% for DoS attacks, and 88% for R2L attacks.

The authors of [9] developed a binary classification model using K-means and Random Forest (RF). They utilized CNN and LSTM to classify attacks into different types. The effectiveness of their proposed model was evaluated on two benchmark datasets, achieving an accuracy of 85.24% and 99.91%.

In [11], the authors addressed the class imbalance problem using the Difficult Set Sampling Technique (DSSTE) algorithm. They evaluated their model on NSL-KDD and CSE-CIC-IDS 2018 benchmark datasets, employing classical classification algorithms including RF, SVM, XGBoost, LSTM, AlexNet, and Mini-VGGNet. Experimental results showed that the DSSTE algorithm performed better.

In [13], the authors used a stacked autoencoder network for feature extraction, then support vector machine, random forest, decision trees and Naive Bayes for classification. The dataset UNB ISCX 2012 dataset is used to validate the proposed model and the maximum accuracy obtained is 90.2%.

In [14] the authors used a sequential autoencoder using LSTM to build an IDS model. The autoencoder was used for dimension reduction and feature extraction. The model was verified using the evaluation dataset ISCX IDS 2012.

The authors of [24] introduced an IDS model composed of recurrent neural networks with GRU, MLP, and softmax models, and evaluated their performance on KDD 99 and NSL-KDD datasets. The proposed model achieved an overall prediction rate of 99.42% on KDD 99 and 99.31% on NSL-KDD.

In recent times, the attention mechanism has gained considerable attention as a method for improving the performance of deep learning models. By selectively attending to different parts of the input, the model can better capture the important features that are critical for accurate predictions. The attention mechanism has been successfully applied in various domains such as natural language processing, computer vision, and speech recognition.

A study presented in [10] put forward an air pollution forecasting model that utilized an attention-based LSTM neural network. The model was found to perform better than other methods that were implemented without an attention layer.
The effectiveness of an attention mechanism and autoencoder for intrusion detection was investigated by the authors in [23]. The proposed model was evaluated using a real in-vehicle CAN bus message dataset and was found to outperform traditional machine learning algorithms.

In [25], the authors have used a multilayer attention mechanism intrusion detection model for power information network. The attention layer improved the detection rate by 1.99% compared to the no-attention layer.

# 3 Methodology

This section explains the steps for building the proposed intrusion detection system, including data preprocessing, CNN, LSTM, Self-Attention mechanism and model selection.

## 3.1 Data Preprocessing

UNSW-NB15 is one of the largest and most widely used benchmark datasets for evaluating intrusion detection systems [16–18, 20]. The dataset contains over two million network connection records and includes a wide range of attack types, including Backdoor, Denial of Service (DoS), Exploits, Fuzzers, Generic, Normal, Reconnaissance, Shellcode, and Worms [21].

Effective ML requires proper data preprocessing which includes extracting numerical and statistical features, reducing sparsity and making the data suitable for machine learning algorithms. In the case of the UNSW-NB15 dataset, missing values were removed, categorical features were converted to numerical values using one-hot encoding and features were normalized using Min-Max scaling. Additionally, Synthetic Minority Over-sampling Technique was applied to address the class imbalance and to ensure that the model gets a more balanced exposure to all classes during training [22, 28].

## 3.2 Convolutional Neural Network (CNN)

CNN is a type of neural network architecture that uses convolutional layers that apply a set of filters to the input in order to extract features at different scales and locations. These features are then pooled and passed through fully connected layers for classification or regression. The following is the equation for CNN Convolutional layer [15, 26]:

$$h_{i,j}^{l} = f\left(\sum_{m=1}^{M} \sum_{n=1}^{N} w_{m,n}^{l} x_{i+m-1,j+n-1}^{l-1} + b_{l}\right) \quad (1)$$

where $h_{i,j}^{l}$ is the activation at position $(i, j)$ in the feature map at layer $l$, $w_{m,n}^{l}$ are the learnable convolutional filters, $x_{i+m-1,j+n-1}^{l-1}$ are the activations in the feature map at layer $l-1$, $b_{l}$ is the bias term, and $f$ is the activation function.
## 3.3 Long Short-Term Memory (LSTM)

LSTM networks are an advanced type of Recurrent Neural Networks (RNNs) that are specifically designed to avoid the issue of vanishing or exploding gradients that traditional RNNs often face. LSTMs achieve this by providing gates within the basic unit of the network. These gates include the forget gate, input gate, and output gate, which allow the network to capture both long-term and short-term memories across time steps. The LSTM unit contains two memory cells: the memory cell $C_t$, which aggregates relevant information over time as long-term memory, and the candidate memory cell $\hat{C}_t$. The equations for the forward pass of the LSTM cell at a given time step $t$ are presented in various literature [5, 8, 26].

$$I_t = \sigma (X_t W_{xi} + h_{(t-1)} W_{hi} + b_i) \qquad (2)$$

$$F_t = \sigma (X_t W_{xf} + h_{(t-1)} W_{hf} + b_f) \qquad (3)$$

$$O_t = \sigma (X_t W_{xo} + h_{(t-1)} W_{ho} + b_o) \qquad (4)$$

$$\hat{C}_t = \tanh(X_t W_{xc} + h_{(t-1)} W_{hc} + b_c) \qquad (5)$$

$$C_t = F_t \odot C_{(t-1)} + I_t \odot \hat{C}_t \qquad (6)$$

$$h_t = O_t \odot \tanh(C_t) \qquad (7)$$

$$\hat{y}_t = f(W_h h_t + b_h) \qquad (8)$$

The LSTM node at time step $t$ is represented by vector values $I_t$, $F_t$, $O_t$, $C_t$, $h_t$, $y_t$, which correspond to the input gate, forget gate, output gate, cell state, LSTM block output, predicted output, respectively. The weights between the input layer and gates at time step $t$ are $W_{xi}$, $W_{xf}$, and $W_{xo}$. The weights between the hidden recurrent layer and gates are $W_{hi}$, $W_{hf}$, and $W_{ho}$, while the weights between the cell state and gates are $W_{ci}$, $W_{cf}$, and $W_{co}$. The biases of the input gate, forget gate and output gate are $b_i$, $b_f$, and $b_o$, respectively. The output, weights, bias, and activation function of the fully connected networks is represented by $\hat{y}$, $W_h$, $b_h$, and $f$. The activation functions used include the sigmoid function ($\sigma$), element-wise multiplication ($\odot$), and hyperbolic tangent function ($\tanh$) [8, 26].

## 3.4 Self-Attention Mechanism

The self-Attention mechanism is a type of attention mechanism that enables a model to focus on different parts of the input sequence and weigh their importance when making predictions [3]. The input sequence to the attention block is transformed into three vectors: the query vector, the key vector, and the value vector. The query vector is used to calculate the similarity between the input sequence and a particular element, the key vector is used to store the representation of the input sequence, and the value vector is used to store the output. The self-attention weight for position $i$ is computed as [15]:
$$ \alpha_i = \frac{\exp(g(h_i))}{\sum_{j=1}^{T} \exp(g(h_j))} \qquad (9) $$

where $h_i$ is the hidden state of the input sequence at position i, and $g$ is a function that computes the score between the query and the key. In self-attention, the query and key are both the hidden states of the input sequence.

The context vector for position i is then computed as:

$$ c_i = \sum_{j=1}^{T} \alpha_j h_j \qquad (10) $$

The context vector $c_i$ is then used as input to the feed-forward network.

## 3.5 Proposed Model

<figure><img src="image_4.png" /><figcaption>Fig. 1. The structure of the proposed model</figcaption></figure>

The full model architecture is shown in Fig. 1. The model takes as input a sequence of network traffic data represented as a matrix with three dimensions: the number of traffic samples, the number of time steps for each sample and the number of features for each time step. The training set consists of 309,391 traffic samples and the testing set consists of 132,597 traffic samples. The features include information such as protocol type, source and destination IP addresses, source and destination port numbers, Transport layer protocol (TCP, UDP, ICMP), IP protocol version (IPv4 or IPv6), Time-to-live (TTL) value of IP packets, packet length and fragmentation information, flags indicating whether packets are part of an established connection or a new connection, and Quality of Service (QoS) information.

In this model, the input is first passed through a 1D convolutional layer (conv1d) with 32 filters of size 3 and relu activation function, which applies a sliding window over the input sequence to extract local patterns or features. The output from the conv1d layer is then passed through an LSTM layer with 32 hidden units and return sequences=True argument, which allows the LSTM to output a sequence of hidden states instead of a single final state. The selection of the number of filters in the convolutional layer and the number of hidden units
in the LSTM layer was determined through a process of hyperparameter tuning, wherein various configurations were experimented with to find the optimal balance between model expressiveness and generalization performance.

The output is passed through a self-attention mechanism, which allows the model to focus on the most relevant parts of the input sequence for the current time step. The self-attention mechanism consists of three fully connected layers (key, value, and query), which project the LSTM outputs onto lower-dimensional spaces, followed by a dot product between the query and key to compute the attention weights. The attention weights are then normalized using a softmax activation function and applied to the value tensor to obtain the attention output.

The model then outputs a probability distribution over the possible network intrusion classes, represented as a matrix with dimensions of a number of samples and a number of possible network intrusion classes. The training and test sets are labelled with these classes, with the training set having 10 possible classes and the test set having the same 10 possible classes.

# 4 Results Analysis and Discussion

## 4.1 Setup Environment

The experimental procedure involved utilizing GPU for training the model on Google Jupyter notebooks. The environment specification comprises the processor type, which is Intel(R) Xeon(R) CPU @ 2.30 GHz, the GPU model, which is Tesla P100-PCIE-16GB, the system RAM, which is 13 GB, and the operating system, which is Linux 5.10.147+. Different batch sizes and epochs were applied during the training process. In order to prevent overfitting and conserve computational resources, an early stopping mechanism was implemented with a patience of 7 and a minimum delta of 0.001. The model is then compiled using the 'Adam' optimizer, binarycrossentropy loss function, and accuracy metric.

## 4.2 Results

Accuracy, precision, recall, and F1 score are adopted as the performance metrics for assessing the efficacy of the model. The confusion matrix in Fig. 2 is used to evaluate the performance of the classification model. The actual classes of attacks are compared to the predicted attack classes made by the model. The rows in the matrix represent the actual classes, while the columns represent the predicted classes.

The model has an overall accuracy of 92.2%, which means that the model is able to classify 92.2% of the samples correctly. The precision of the model is 95.04%, which means that out of all the samples that the model classified as positive, 95.04% were actually positive. The recall of the model is 90.56%, which means that out of all the positive samples in the dataset, the model was able to correctly identify 90.56% of them. The F1-score is 92.72%.
<figure><img src="image_5.png" /><figcaption>Fig. 2. AT-CNN-LSTM Confusion Matrix</figcaption></figure>

<table><caption>Table 1. Detection Rate of Attacks Categories</caption><thead><tr><td>Attack Category</td><td>Detection Rate</td></tr></thead><tbody><tr><td>Reconnaissance</td><td>87%</td></tr><tr><td>Backdoor</td><td>83%</td></tr><tr><td>DoS</td><td>67%</td></tr><tr><td>Exploits</td><td>71%</td></tr><tr><td>Fuzzers</td><td>93%</td></tr><tr><td>Generic</td><td>99%</td></tr><tr><td>Normal</td><td>100%</td></tr><tr><td>Analysis</td><td>8%</td></tr><tr><td>Shellcode</td><td>97%</td></tr><tr><td>Worms</td><td>99%</td></tr></tbody></table>
accuracy, precision, recall, and F1 score of the model indicates that the model is able to identify and classify network traffic with a high degree of accuracy while minimizing false positives and false negatives for each class. This indicates that the system is effective in detecting a wide range of attacks and thus minimizing the risk of disrupting legitimate network activity.

<figure><img src="image_6.png" /><figcaption>Fig. 3. At-CNN-LSTM: Epochs vs Accuracy</figcaption></figure>

Table 1 shows the detection rates for different categories of attacks. The table shows that the model is capable of accurately detecting a wide range of attacks. The model has a high detection rate for most of the attack categories, including Generic (99%) and Normal (100%). The model has also a high detection rate for Fuzzers (93%) and Worms (99%), which are two types of attacks that involve massive network scans and automated propagation. This indicates that the model is capable of detecting attacks that are carried out at a large scale. The model also has a reasonable detection rate for other types of attacks, such as Reconnaissance (87%), Backdoor (83%), Exploits (71%), and Shellcode (97%). These attacks can be particularly challenging to detect since they often involve sophisticated techniques that can evade traditional security measures. However, the model's high detection rates for these attack categories demonstrate its effectiveness in identifying such threats. The low detection rates for Analysis and
DoS attacks can be attributed to several factors. These attacks are known to involve different techniques that can be difficult to detect, as they may involve small and subtle changes in network traffic that can blend in with normal traffic. This is especially true for DoS attacks, which are designed to overwhelm network resources and can be challenging to distinguish from legitimate traffic. Furthermore, the performance of the model in detecting these attacks is highly dependent on the quality and quantity of training data available. The UNSW-NB15 dataset contains a limited number of examples of Analysis and DoS attacks, which affects the models' ability to learn the characteristics that distinguish these attacks from normal traffic effectively. As a result, the models may not be able to generalize well to new, unseen examples of these attacks.

The accuracy of the model is visualized against the number of epochs in Fig.

3. The two figure show that the accuracy of both the training data and the validation data increases over time until it reaches a plateau at 20.

# 5 Conclusion and Future Work

In conclusion, this study demonstrates the potential of deep learning models in intrusion detection systems. The proposed Attention Based CNN-LSTM model, utilizing the attention mechanism, shows promising results in detecting intrusions with over 95% precision. The results of the performance evaluation indicate that the model has high precision and recall scores, which further validate the robustness and effectiveness of the proposed system. The findings of this study provide a solid foundation for further research in developing advanced deep-learning models for intrusion detection.

**Acknowledgments.** This work was supported by the United Arab Emirates (UAE) University UAEU Program for Advanced Research (UPAR) Research Grant Program under Grant 31T122.

# References

1. Aldallal, A.: Toward efficient intrusion detection system using hybrid deep learning approach. Symmetry **14**(9), 1916 (2022)

2. Bakhsh, S.T., Alghamdi, S., Alsemmeari, R.A., Hassan, S.R.: An adaptive intrusion detection and prevention system for internet of things. Int. J. Distribut. Sens. Netw. **15**(11) (2021)

3. Cao, K., Zhu, J., Feng, W., Ma, C., Liu, M., Du, T.: Network intrusion detection based on dense dilated convolutions and attention mechanism. In: 2021 International Wireless Communications and Mobile Computing (IWCMC), pp. 463–468 (2021)

4. Deore, B., Bhosale, S.: Hybrid optimization enabled robust CNN-ISTM technique for network intrusion detection. IEEE Access **10**, 65611–65622 (2022)

5. Freire, P.J., Srivallapanondh, S., Napoli, A., Prilepsky, J.E., Turitsyn, S.K.: Computational complexity evaluation of neural network applications in signal processing (2022)
6. Gao, J.: Network intrusion detection method combining CNN and biLSTM in cloud computing environment. Comput. Intell. Neurosci. **2022**, 1–11 (2022)

7. Koniki, R., Ampapurapu, M.D., Kollu, P.K.: An anomaly based network intrusion detection system using LSTM and GRU. In: 2022 International Conference on Electronic Systems and Intelligent Computing (ICESIC), pp. 79–84. IEEE (2022)

8. Li, B., Gao, P., Li, X., Chen, D.: Intelligent attitude control of aircraft based on LSTM. IOP Conf. Ser.: Mater. Sci. Eng. **646**(1), 012013 (2019)

9. Liu, C., Gu, Z., Wang, J.: A hybrid intrusion detection system based on scalable k-means+ random forest and deep learning. IEEE Access **9**, 75729–75740 (2021)

10. Liu, D., Lee, S., Huang, Y., Chiu, C.: Air pollution forecasting based on attention-based LSTM neural network and ensemble learning. Exp. Syst. **37**(3) (2020)

11. Liu, L., Wang, P., Lin, J., Liu, L.: Intrusion detection of imbalanced network traffic based on machine learning and deep learning. IEEE Access **9**, 7550–7563 (2021)

12. Megantara, A.A., Ahmad, T.: A hybrid machine learning method for increasing the performance of network intrusion detection systems. J Big Data **8**(1), 142 (2021)

13. Mighan, S.N., Kahani, M.: A novel scalable intrusion detection system based on deep learning. Int. J. Inf. Secur. **20**(3), 387–403 (2021)

14. Mirza, A.H., Cosan, S.: Computer network intrusion detection using sequential LSTM neural networks autoencoders. In: 2018 26th Signal Processing and Communications Applications Conference (SIU), pp. 1–4. IEEE (2018)

15. Mohanty, S.N., Nalinipriya, G., Jena, O.P., Sarkar, A.: Machine Learning for Healthcare Applications. Wiley-Scrivener, Hoboken (2021)

16. Moustafa, N., Slay, J.: UNSW-nb15: A comprehensive data set for network intrusion detection systems (UNSW-nb15 network data set). In: 2015 Military Communications and Information Systems Conference (MilCIS), pp. 1–6. IEEE (2015)

17. Moustafa, N., Slay, J.: The evaluation of network anomaly detection systems: Statistical analysis of the UNSW-nb15 data set and the comparison with the kdd99 data set. Inf. Secur. J.: Glob. Perspect. **25**(1–3), 18–31 (2016)

18. Moustafa, N., Slay, J., Creech, G.: Novel geometric area analysis technique for anomaly detection using trapezoidal area estimation on large-scale networks. IEEE Trans. Big Data **5**(4), 481–494 (2019)

19. Panagiotou, P., Mengidis, N., Tsikrika, T., Vrochidis, S., Kompatsiaris, I.: Host-based intrusion detection using signature-based and ai-driven anomaly detection methods. Inf. Secur. **50**(1), 37–48 (2021). Copyright - Copyright ProCon Ltd. 2021; Last updated - 2021-11-02

20. Sarhan, M., Layeghy, S., Moustafa, N., Portmann, M.: Netflow datasets for machine learning-based network intrusion detection systems. J. Netw. Comput. Appl. **371**, 117–135 (2021)

21. Saurabh, K., et al.: Lbdmids: LSTM based deep learning model for intrusion detection systems for IOT networks. arXiv preprint arXiv:2206.10975 (2022)

22. Waqar, M., Dawood, H., Dawood, H., Majeed, N., Banjar, A., Alharbey, R.: An efficient smote-based deep learning model for heart attack prediction. Sci. Program. **2021**, 1–12 (2021)

23. Wei, P., Wang, B., Dai, X., Li, L., He, F.: A novel intrusion detection model for the can bus packet of in-vehicle network based on attention mechanism and autoencoder. Digit. Commun. Netw. S2352864822000700 (2022)

24. Xu, C., Shen, J., Du, X., Zhang, F.: An intrusion detection system using a deep neural network with gated recurrent units. IEEE Access **6**, 48697–48707 (2018)
25. Yang, H., Bai, Y., Chen, T., Shi, Y., Yang, R., Ma, H.: Intrusion detection model for power information network based on multi-layer attention mechanism. In: 2022 IEEE 10th Joint International Information Technology and Artificial Intelligence Conference (ITAIC), pp. 825–828 (2022)

26. Zhang, A., Lipton, Z.C., Li, M., Smola, A.J.: Dive into deep learning (2019)

27. Zhang, C., Jia, D., Wang, L., Wang, W., Liu, F., Yang, A.: Comparative research on network intrusion detection methods based on machine learning. Comput. Secur. **121**, 102861 (2022)

28. Zhang, Y., Zhang, H., Zhang, X., Qi, D.: Deep learning intrusion detection model based on optimized imbalanced network data. In: 2018 IEEE 18th International Conference on Communication Technology (ICCT), pp. 1128–1132 (2018)