## 2 Proposed Methods for Speaker Recognition
#### 2.1.4 LSTM Model  
It is discussed that RNNs utilize their feedback connections to store representations of recent input incidents [22]. However, traditional backpropagation through time or real-time recurrent learning lead to the gradient exploding or vanishing when error signals flow backward in time. To improve error backflow, a novel recurrent network architecture is proposed with an appropriate gradient-based learning algorithm that is LSTM [22]. In the case of noisy input sequences, LSTMs learn to bridge time intervals exceeding 1000 steps without loss of short-timelag capabilities. LSTMs are efficient gradient-based algorithms achieved for an architecture-enforcing constant. They are neither exploding nor vanishing because error flows through internal states of special units. Therefore, the performance of LSTM-based models for processing time series data is better than that of RNN-based models. The LSTM model architecture in the LSTM-MFCC-TL method is shown in Figure 4, and the relevant model parameters are listed in Table 1. A feature vector with a size of \((512,\,39)\) after feature preprocessing is used as the input, the LSTM architecture is used as the central part of the model, and the dropout layer is used to prevent the model from overfitting. Then, the flattened layer is used to flatten the two-dimensional vector of size \((512,\,128)\) into a one-dimensional vector of \((1,\,512\times 128)\) after the LSTM and dropout layers. Finally, a dense layer with 128 neurons is used as the output of the LSTM model, and the output is a feature vector of \((1,\,128)\). Figure 4: LSTM model architecture diagram in LSTM-MFCC-TL method. Figure 3: Cluster training method architecture diagram. In neural network technology, the neural network is divided into input, hidden, and output layers. In the input layer, we take the preprocessed MFCC feature vector of size \((512,\,39)\) as input, where 512 is the number of frames of a fixed size during preprocessing. For the hidden layer, we use the LSTM with the number of neurons as \(U\) and then connect the dropout layer to freeze the data with the ratio of \(D\) to prevent the model from overtraining. Figure 5 shows a schematic of the LSTM architecture, highlighting that the LSTM model maintains the memory selection of each time step in the LSTM path, so that the LSTM retains the characteristics of long-term memory. In Figure 5, \(L\) represents the internal structure of the LSTM. When entering the next time step, part of the memory selection of the current time step is retained in the path. This effect is possible because LSTM has four unique gates: an input information gate (\(h_{t}\)), a forget gate (\(f_{t}\)), an input gate (\(i_{t}\)), and an output gate (\(o_{t}\)). The architecture of the LSTM model is shown in Figure 6. The calculation of each gate valve in Figure 6 can be represented by the calculation of \(g_{t}\), which is as follows:  
\[g_{t}=activation\big{(}w_{g}x_{t}+u_{g}y_{t-1}+b_{g}\big{)}, \tag{6}\]  
where \(g_{t}\) is the output gate valve of the \(t\)th time step, and activation is the activation function of the gate valve; \(w_{g}x_{t}\) is the information (\(x_{t}\)) and the weight value (\(w_{g}\)) assigned to the \(t\)th time step for each gate; \(u_{g}y_{t-1}\) is a prediction value (\(y_{t-1}\)) and a weight value (\(u_{g}\)) assigned to the \(t-1\)th time step for each gate valve; and \(b_{g}\) is the residual value for each gate valve. We then organize the equations of the entire LSTM model as follows:  
\[\left\{ \begin{array}{l}f_{t}=\sigma\Big{(}w_{f}x_{t}+u_{f}y_{t-1}+b_{f}\Big{)} \\ i_{t}=\sigma(w_{i}x_{t}+u_{i}y_{t-1}+b_{i})\\ h_{t}=\tanh(w_{h}x_{t}+u_{h}y_{t-1}+b_{h})\\ o_{t}=\sigma(w_{o}x_{t}+u_{o}y_{t-1}+b_{o})\\ c_{t}=f_{t}c_{t-1}+i_{h}h_{t}\\ y_{t}=o_{t}\tanh(c_{t})\\ \end{array}