## 4 Major Components of Network Slicing System
### Advanced Deep Learning Module  
In this section, we are going to explain the deep learning Model GAN and dataset used for training and testing purposes. GAN is a very famous deep learning model that is mostly used for image processing, video processing, and computer vision tasks but we have used the GAN model for predicting and forecasting resource utilization for the next period. It has two modules, namely, generator (G) and discriminator (D): one neural network will be used for generator and one for the discriminator part. The first part generator generates new data instances and the discriminator model acts like a decider whether the data is authentic (real) or generated [43; 44]. The pseudocode of GAN model is presented in Algorithm 1. In our system, we have used the LSTM (long-short term memory) model in the Generator part and CNN (convolutional neural network) model in the Discriminator part for the prediction of network resource utilization (CPU, RAM, etc.) is illustrated in Figure 7.  
LTSM (long short term memory) is a popular deep learning model mostly used for time series data analysis, prediction, traffic forecasting, natural language processing, and handwriting recognition. LSTM belongs to the RNNs family (Recurrent Neural Networks). RNN models can store and keep track of all the previous data points thats why they are the best choice for time series dataset operations. In our case, network traffic or resource utilization data is time series, LTSM is the best choice to use as a generative model to generate the resource utilization output data based on input dataset parameters. Moreover, for controlling, updating, forgetting, and storing the data every hidden node in the LSTM model has its gates or memory cell. There are three kinds of memory cells or gates for storing data dependencies in LSTM such as Forget \(F_{t}\), output \(O_{t}\) and input gate \(I_{t}\). The activation function for these gates is the sigmoid function and t is the current time. The working of each gate in the LSTM unit is illustrated below. \[I_{t}=\sigma(U_{t}x_{t}+W_{t}h_{t-1}+b_{i}) \tag{1}\]  
\[F_{t}=\sigma(U_{f}x_{t}+W_{f}h_{t-1}+b_{f}) \tag{2}\]  
\[A_{t}=tanh(U_{c}x_{t}+W_{c}h_{t-1}+b_{c}) \tag{3}\]  
\[C_{t}=I_{t}*A_{t}+F_{t}*C_{t-1} \tag{4}\]  
\[O_{t}=\sigma(U_{o}x_{t}+W_{o}h_{t-1}+V_{o}C_{t-1}+b_{0}) \tag{5}\]  
\[H_{t}=O_{t}*tanh(C_{t}) \tag{6}\]  
Figure 7: Design of GAN deep learning model. The function of the input gate in the LSTM unit is shown in Equation (1). Where \(U_{i}\) and \(W_{i}\) are the input weights and \(b_{i}\) is the bias value. Equation (2) represents the forget gate function where \(U_{f}\) and \(W_{f}\) are the weights parameters and \(b_{f}\) is the bias value. Equation (3) presents the function of intermediate cell state \(A_{t}\) where \(U_{c}\) and \(W_{c}\) are the weight parameters and \(b_{c}\) is the bias value. Equation (4) presents the function of cell state \(C_{t}\). Equation (5) presents the function of output gate \(O_{t}\) where \(U_{o}\), \(W_{o}\), and \(V_{o}\) are the weight parameters and \(b_{o}\) is the bias value. Equation (6) shows the function of the new hidden state \(H_{t}\). further, \((\sigma)\) and (tanh) are the activation functions in the LSTM unit. In all equations \(h_{t-1}\) shows the current time in hidden state. In Equations (4) and (6) \((*)\) operator is used as element wise multiplication operator. ```
1:Probability distribution for noise generation \(P_{g}(z)\) and probability distribution of training data \(p_{data}(x)\). 2:Output: Trained Generator (Gen) and discriminator (Dis) modules.