## 3 Deep Learning-Based Methods
### Deep Learning-Based Classifiers
#### 3.2.2 Long Short-Term Memory (LSTM)  
A long short-term memory (LSTM) neural network architecture is a specific variation of recurrent neural networks (RNNs), capable of learning dependencies in the long run. This primarily distinguishes it from a feed-forward neural network, which maps an input vector into an output vector. The feature vector representation is crucial to establishing a high-accuracy vulnerability prediction model. Equation (5) computes the network h(t) output.  
\[h_{t}^{j}=\sigma_{t}^{j}\tanh\left(c_{t}^{j}\right) \tag{5}\]  
where C\(j\) refers to the memory amount of every LSTM \(j\) unit at time \(t\). \(\sigma\text{h}j\) demonstrates the output gate for LSTM unit \(j\) at time \(t\), managing the memory content exposure. The output gate is  
\[\sigma_{t}^{j}=\sigma(W_{0}X_{t}+U_{0}h_{t-1}+V_{0}c_{t})^{j} \tag{6}\]  
The standard sigmoid function is denoted by \(\text{W}_{0}\), \(\text{V}_{0}\), and \(\text{U}_{0}\), representing the weight, diagonal, and uniform matrices for the output gate, respectively. Every \(\text{X}_{t}\) refers to the  
Figure 3: The convergence of the sigmoid activation function.  
input at the time step during training. \(\text{h}_{t-1}\) contains information from the past unit at time step \(t-1\).  
\[c_{t}^{j}=f_{t}^{j}c_{t-1}^{j}+i_{t}^{j}\hat{\text{C}}_{t}^{j} \tag{7}\]  
\(\hat{\text{C}}\)(t) represents a new memory that is the memory unit's content, updated partially by the current memory and the new memory content to c(t). The novel memory content is found below. \(\text{W}_{\text{c}}\) and \(\text{U}_{\text{c}}\) are the weight and uniform matrices for the novel memory content.  
\[\hat{\text{C}}_{t}^{j}=tanh(W_{\text{c}}X_{t}+U_{\text{c}}h_{t-1})^{j} \tag{8}\]  
\(\text{F}^{j}\) modulates the current memory forgetting gate for LSTM unit \(j\) at time \(t\). The input gate modulates the degree of addition of new memory content to the memory cell for LSTM unit \(j\) at time \(t\). \(\text{W}_{t}\), \(\text{U}_{t}\), \(\text{V}_{\text{f}}\), \(\text{W}_{\text{i}}\), \(\text{U}_{\text{i}}\), and \(\text{V}_{\text{i}}\) represent the weight, uniform, and diagonal matrices for the forget and input gates.  
\[f_{t}^{j}=\sigma\Big{(}W_{f}X_{t}+U_{f}h_{t-1}+V_{f}c_{t-1}\Big{)}^{j} \tag{9}\]  
\[i_{t}^{j}=\sigma(W_{i}X_{t}+ih_{t-1}+V_{\text{i}}c_{t-1})^{j} \tag{10}\]  
LSTM can automatically learn syntactic and semantic features, representing dependencies in the long run. Long short-term memory (LSTM) is a recurrent neural network that maps an input vector sequence into an output vector sequence. At every step \(t\), the LSTM unit reads the input \(\text{W}_{t}\), the past output state \(\text{h}_{t-1}\), and the memory \(\text{c}_{t-1}\) and uses a set of model parameters to compute the output state \(\text{h}_{t}\).  
Although LSTM units usually display more powerful performance [24], GRU units are more computationally efficient since they have fewer parameters and require shorter training times.  
LSTM [25], introduced by [PERSON] and [PERSON], is a frequently employed model to detect anomalies in time series. LSTM represents a type of recurrent neural network (RNN) developed to analyze time series data. LSTM can model long-term dependencies in time series and thus detect anomalies.