# A Long Short-Term Memory Network-Based Radio Resource Management for 5G Network
## 3 LSTM-RRM Method
### LSTM-Based Radio Resource Management  
In this 5G network, LSTM is used to accomplish the optimal RRM to improve the bit rate of the communication process. Generally, the LSTM is a special type of Recurrent Neural Network (RNN) that has the capacity for learning long-term dependencies and remembering information for longer periods of time. The LSTM network is arranged in a chain structure, and this LSTM network contains memory blocks, namely cells. In LSTM, two states are moved to the successive cell: cell state and hidden state. Here, the cell state is considered as a key chain of the data flow that allows the data to be transmitted unchanged during the decision-making process. Nevertheless, some linear transformations may occur in the LSTM network. Consequently, the data can be removed from or added to the cell state through the sigmoid gates. The gates of the LSTM are identical to the series or layer of matrix operations that has various individual weights. The long-term dependency problem is avoided by LSTM, due to the utilization of the gates to control the memorization process. The architecture of LSTM is shown in Figure 4.  
Initially, the information which is not essential is removed from the cell during the LSTM network construction. The result of the last LSTM unit (\(h_{t-1}\)) at time \(t-1\) and current input (\(X_{t}\)) at time \(t\) are given as input for the sigmoid function. Then, this sigmoid function is used to identify and remove the unwanted data. Moreover, this sigmoid function identifies the part of value which must be removed from the old output. This gate is named  
Figure 4: Architecture of LSTM cell.  
the forget gate \((f_{t})\), where the vector value between 0 and 1 is \(f_{t}\) and the respective number of cell states is \(C_{t-1}\).  
\[f_{t}=\sigma\Big{(}W_{f}[h_{t-1},\ X_{t}]+b_{f}\Big{)} \tag{1}\]  
where the sigmoid function is represented by \(\sigma\) and the weight matrices and bias of forget gate are represented by \(W_{f}\) and \(b_{f}\), respectively. Moreover, the input \(X_{t}\) considered for this RRM is the data rate value of UEs.  
The next step is to choose and save the information of the \(X_{t}\) at cell state as well as its updated cell state. This step has two different parts: sigmoid layer and \(tanh\) layer. At first, adding or removing the new information is decided using the sigmoid layer, and the value's importance level \((-1\ to\ 1)\) is decided by providing the weight to the values using the \(tanh\) layer. The new cell state is updated by multiplying the aforementioned values. The input gate output and updated cell state are represented in Equations (2) and (3), respectively. Next, the new memory is included in the old memory \(C_{t-1}\), which results in \(C_{t}\), as shown in Equation (4).  
\[i_{t}=\sigma(W_{i}[h_{t-1},X_{t}\ ]+b_{i}) \tag{2}\]  
\[N_{t}=tanh(W_{n}[h_{t-1},X_{t}\ ]+b_{n}) \tag{3}\]  
\[C_{t}=C_{t-1}f_{t}+N_{t}i_{t} \tag{4}\]  
where the cell states at time \(t\) and \(t-1\) are \(C_{t}\) and \(C_{t-1}\), respectively, and the weight matrices and bias of the cell state are represented as \(W\) and \(b\), respectively.  
Finally, the output value \((h_{t})\) is mainly dependent on the output cell state \((O_{t})\). Here, the sigmoid layer chooses which cell is required to deliver the output. Subsequently, the value generated in the cell state \((C_{t})\) using the \(tanh\) layer is multiplied with the result of the sigmoid gate \((O_{t})\), which results in a value between \(-1\) and \(1\). The sigmoid gate and cell output are represented in Equations (5) and (6), respectively.  
\[O_{t}=\sigma(W_{o}[h_{t-1},X_{t}\ ]+b_{o}) \tag{5}\]  
\[h_{t}=O_{t}\text{tanh}(C_{t}) \tag{6}\]  
where the weight matrices and bias of the output gate are denoted as \(W_{o}\) and \(b_{o}\), respectively.