# Attention-Based LSTM Algorithm for Audio Replay Detection in Noisy Environments
## 5 Experiments and Results
### Results and Discussion
#### 5.3.2 Experiments in Noisy Environments  
Detailed EERs (%) of the CQCC-GMM baseline, traditional LSTM, and AB-LSTM with different frame lengths under different SNR environments are shown in Tables 4-7. The average EERs of the different frame lengths and the EERs of the bagging methods are also included. The average EERs of different SNR environments are shown in Table 8. Furthermore, Figure 8 illustrates the impact of SNR on EER. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Methods**} & \multicolumn{2}{c}{**EER \({}^{\text{a}}\) (\%)**} & \multicolumn{2}{c}{**EER \({}^{\text{b}}\) (\%)**} \\ \cline{2-6}  & _dev_ & _eval_ & _dev_ & _eval_ \\ \hline
**CQCC-GMM** & 48.53 & 47.52 & - & - \\ \hline \multirow{4}{*}{**Traditional LSTM**} & Frame = 100 & **20.58** & **37.78** & \multirow{4}{*}{20.62} & \multirow{4}{*}{38.13} \\  & Frame = 200 & 20.82 & 38.09 & & \\ \cline{1-1}  & Frame = 300 & 23.87 & 39.86 & & \\ \cline{1-1}  & Average & 21.76 & 38.58 & - & \\ \hline \multirow{4}{*}{**AB-LSTM**} & Frame = 100 & **18.00** & **33.17** & \multirow{4}{*}{18.26} & \multirow{4}{*}{33.31} \\  & Frame = 200 & 18.42 & 33.88 & & \\ \cline{1-1}  & Frame = 300 & 19.71 & 34.64 & & \\ \cline{1-1}  & Average & 18.71 & 33.90 & - & - \\ \hline \hline \end{tabular}  
* Bagging EER of segments. \({}^{\text{b}}\) Bagging EER of different length of frame.  
\end{table} 
Table 3: EER (%) results of the different network’s architectures in a clean background environment. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Network’s Architecture** & **Traditional LSTM** & **AB-LSTM** \\ \hline \(128\times 256\times 256\) & 25.74 & 21.95 \\ \(128\times 256\times 256\times 256\) & 22.61 & 19.03 \\ \(128\times 256\times 256\times 256\times 128\) & **20.32** & **16.86** \\ \hline \hline \end{tabular}  
\end{table} 
Table 3: EER (%) results of the different network’s architectures in a clean background environment. Figure 7: Loss curves of traditional long short-term memory (LSTM) and attention-based LSTM (AB-LSTM). \begin{table}
\begin{tabular}{c c c c c c} \hline \multirow{2}{*}{**Methods**} & \multicolumn{2}{c}{**EER \({}^{\text{a}}\) (\%)**} & \multicolumn{2}{c}{**EER \({}^{\text{b}}\) (\%)**} \\ \cline{3-6}  & \multicolumn{2}{c}{_dev_} & _eval_ & _dev_ & _eval_ \\ \hline \multirow{3}{*}{**Traditional LSTM**} & Frame = 100 & **19.00** & **36.43** & & \\  & Frame = 200 & 22.18 & 39.12 & 20.77 & 37.56 \\  & Frame = 300 & 24.66 & 40.05 & & \\  & Average & 21.95 & 38.53 & - & - \\ \hline \multirow{3}{*}{**AB-LSTM**} & Frame = 100 & **18.43** & **33.27** & & \\  & Frame = 200 & 19.62 & 34.06 & 18.83 & 33.29 \\ \cline{1-1}  & Frame = 300 & 19.74 & 34.85 & & \\ \cline{1-1}  & Average & 19.26 & 34.06 & - & - \\ \hline \end{tabular}
\end{table} 
Table 7: EER \({}^{\text{a}}\) (%) and EER \({}^{\text{b}}\) (%) for different methods when \(SNR=10\) dB. Compared with the baseline's EER of 30.60% for the evaluation set in the clean environment [3], the average EER of the four kinds of SNR in noisy environments increased to 45%. This implies that the noise in complex sound environments seriously affected the performance of the baseline system. As for traditional LSTM and the proposed AB-LSTM algorithm, the results of the experiments showed that the AB-LSTM algorithm performed better than the CQCC-GMM baseline for any frame length at any SNR level. It was also seen that the AB-LSTM algorithm achieved better EERs than the traditional LSTM for all parameter settings. The experiments conducted without the attention mechanism had an average EER of 38.06%, an 8.53% reduction with respect to the baseline system's EER of 46.59%. AB-LSTM obtained an average EER of 32.95% on the evaluation set, which was 13.64% and 5.11% lower than the EER for the baseline system and the traditional LSTM, respectively. The improvement in the EER using the AB-LSTM algorithm, compared to the baseline and traditional LSTM, might be attributed to the attention mechanism, which made the model focus adaptively on the distinguishing utterance information.