## 3 Proposed Adaptive Deep Learning  
The proposed ADL algorithm consists of a data pre-processing module, a neural network pre-training module and a classifier module. In the data pre-processing module, the original dataset is normalised to generate a standard dataset. In the neural network pre-processing module, the algorithm is used to train the model and adjust the parameters to obtain a highly adaptive network model. The classifier module used high-dimensional data features to train a classifier to determine the intrusion data type on the test dataset. With the proposed ADL algorithm, we extract data features through hidden layer neurons and change the distribution and structure of the data. The data features after each hidden layer are more accurate and essential. Transfer learning is embedded in the model so that it can be used for new tasks and improve the generalisation of the model. Next, deep belief networks (DBNs) enable compressed coding of raw data to accurately represent data features. A DBN consists of a multilayer Boltzmann machine network and a supervised back propagation network. The proposed algorithm combines DBNs to infer the appropriate number of hidden layers and the number of neurons per hidden layer for the neural network based on the original input data, allowing the pre-trained model to better match the size of the dataset and reduce the number of hidden layers. Too few hidden layers lead to under-reporting, while too many hidden layers lead to over-fitting. In the proposed ADL algorithm, parameters are used to control the training speed of the model and the accuracy of classification prediction. As shown in Figure 2, by adjusting the hidden layer, different data characteristics will be generated and transfer learning is adopted as shown in Figure 3. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Works** & **Learning Type** & **Key Techniques** & **Datasets** \\ \hline
[5] & Supervised &
\begin{tabular}{c} Particle swarm optimisation \\ based neural network \\ \end{tabular} & KDD99 and NSL-KDD \\ \hline
[13] & Supervised & \
\begin{tabular}{c} Work embedding-based \\ deep learning \\ \end{tabular} &
\begin{tabular}{c} Intrusion Detection \\ Evaluation Dataset \\ (ISCX2012) \\ \end{tabular} \\ \hline
[14] & Semi-supervised &
\begin{tabular}{c} Long short-term memory and \\ extreme gradient boosting with \\ genetic algorithm \\ \end{tabular} & NSL-KDD \\ \hline
[18] & Unsupervised &
\begin{tabular}{c} Nonsymmetric deep \\ autoencoder \\ \end{tabular} & KDD99 and NSL-KDD \\ \hline
[20] & Supervised & Support vector machine &
\begin{tabular}{c} Intrusion Detection \\ Evaluation Dataset \\ (CIC-IDS2017) \\ \end{tabular} \\ \hline
[21] & Unsupervised & \
\begin{tabular}{c} Feature extraction using \\ symbolic dynamic filtering \\ \end{tabular} &
\begin{tabular}{c} Data from testbed \\ from Matpower \\ \end{tabular} \\ \hline
[22] & Supervised & \
\begin{tabular}{c} Long short-term memory \\ with stacked autoencoders \\ \end{tabular} &
\begin{tabular}{c} State Grid Corporation \\ of China Dataset \\ \end{tabular} \\ \hline
[26] & Supervised & Federated Learning & \
\begin{tabular}{c} KDD99, NSL-KDD and \\ CIDDS-001 datasets \\ \end{tabular} \\ \hline This work & Supervised &
\begin{tabular}{c} Adaptive deep learning \\ using deep belief network \\ \end{tabular} & NSL-KDD \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of machine learning based intrusion detection techniques. As explained in Algorithm 1, by the proposed ADL algorithm, the number of hidden layers and the number of neurons are determined by the dimensionality of the original training data and the parameter \(\theta\), which balances training time, output accuracy and convergence speed. The range of \(\theta\) is set from 0 to 1, with a step size of 0.1. The ADL algorithm defines the number of neurons in each hidden layer of the deep neural network. The neurons before the output layer are the dimensions of the neurons in the highest layer.