# Deep Learning for Predicting Traffic in V2X Networks
## 4 LSTM Deep Learning  
Many techniques are needed to increase the accuracy of traffic feature prediction to solve the problems of 5G mobile networks and not further reduce the effectiveness of the QoS system. So far, numerous ML methods have been developed to optimize the accuracy of traffic forecasts. One of the essential methods is deep learning (DL), a particular form of MLNN. ANNs are characterized by a series of networks within the loop and are more potent than conventional ANNs. Each net within the loop receives signals from the preceding net, executes a series of procedures, generates output data, and transmits information to the succeeding network. Conventional RNNs are unsuitable for cases where each object must be \"remembered\" over a long period; they are delayed when there is no link between past and future information. The influence of a hidden state or an input with a step t on the following states of the feedback network decreases rapidly. Among the solutions recently applied to DL, the most important is the modification and complexity of the configuration of the \"building block\" of the RNN. It becomes clear that instead of a single number influenced by all the following states, we can build a specific kind of cell wherein we model a \"long-term memory\" in one form or another, with the procedures starting from this \"memory cell\". These cells would have more than one set of weights; as with a typical neuron, learning becomes more challenging, but it is usually beneficial in training. Some applications require new data, while others require more historical data. A method for predicting events over time is called time series forecasting. By examining historical trends and assuming that future trends will be similar to historical trends, future events are predicted. It is used in many areas of science in various applications, such as control engineering, pattern recognition, resource allocation, signal processing, statistics, and weather forecasting. I/O time series rely on forecasting using models fitted to historical data to predict future observations over a period of time. The goal of time series forecasting is to predict future values over a period of time. It involves building models based on past data, drawing conclusions from them, and using them as a basis for future strategic decisions. Figure 1: V2X simulation using MATLAB. A type of RNN called an LSTM network [17; 19; 21; 22; 30] uses past inputs to predict the future output. LSTMs were developed primarily to address the problem of long-term dependence. LSTMs are robust in the time-series forecast as they can memorize historical information. This is important in our case because past V2X traffic is crucial for predicting future traffic data. LSTM outperforms conventional time series methods in improving prediction. It is also more competent and rapid at fitting data than conventional models. They also handle massive amounts of data better than traditional time series models. Long-term memory is almost their hypothetical behavior, not a thing they aim to make. A conventional recurrent neural network (RNN) contains a sequence of repeating units with a simple structure, e.g., a hyperbolic tangent layer (). The LSTM network's structure is depicted in Figure 2.  
The cell state, which runs across the upper part of the model, is the LSTM's main feature. With only a few serial correlations, it goes directly through the sequence, and the signals can be rotated without change. The gate structures allow the LSTM to remove or add data from the cell state, and these gates carefully control this capability. They consist of pointwise multiplication and the ANN sigmoidal layer (Equation (1)). The interval (0,1) limits the sigmoidal layer output to specify the components that have passed through the gate. There are three gates in the LSTM to protect and regulate the cell state. The output of the LSTM gates is equal to 0 or 1 since they have sigmoidal activation functions (Equation (1)).