# Global-Local Self-Attention Based Transformer for Speaker Verification
## 4 Experiments
### Results  
In this section, we compare the proposed method with those of several excellent studies and analyze the results. An overview of the system performance is shown in Table 1, including VGG [26], TDNN [8; 9; 14], ResNet [6], Transformer [11; 12; 20], and our proposed architecture. According to the results of the VoxCeleb2 speaker verification task shown in Table 1, our model performed better in EER and MinDCF compared with the baseline systems based on VGG, TDNN, ResNet, and Transformer as feature extractors. This shows that enhancing the locality of Transformer can effectively improve performance. The det curve of our proposed method is shown in Figure 3.  
When performing local self-attention, we used fixed-size and non-overlapping sliding windows to divide the input features into several equal-length segments. To study the effect of different window sizes on model performance, we set the experimental window size according to the experience of previous work, such as [4]. Table 2 presents the results at different window sizes. Among the experimentally set window sizes, the best results were obtained in the EER and MinDCF indicators when the window size was 25 frames. Performance dropped when the window size became larger (30 frames) or smaller (20 frames). This shows that a reasonable window size improves performance, and when the window size is too large or too small, the model may not be able to capture the speaker information in the current segment well, resulting in performance degradation.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Architecture**} & \multirow{2}{*}{**Extractor**} & \multicolumn{2}{c}{**VoxCeleb2 Dev**} \\ \cline{3-4}  & & **EER (\%)** & **MinDCF** \\ \hline MHA [26] & VGG & 3.19 & 0.27 \\ X-vectora [8] & TDNN & 3.13 & 0.33 \\ Atten. Stats. [9] & TDNN & 2.59 [14] & 0.29 \\ [PERSON] et al. [6] & ResNet & 3.22 & - \\ SAEP [20] & Transformer & 5.44 & - \\ S-vectors 1 [11] & Transformer & 2.67 & 0.30 \\ MV [12] & CNN + Transformer & 2.56 & - \\ Our work & CNN + Transformer & 2.44 & 0.23 \\ \hline \hline \end{tabular}  
* Training dataset is VoxCeleb1 + 2.  
\end{table}
Table 1: Performance comparison with the VoxCeleb1 test set.  
Figure 3: The DET curve of our proposed method.  
We note that our work outperformed the numbers reported by all systems used for comparison. To investigate the impact of each part of the model, we performed an ablation study on the architecture introduced in Section 3. The results of the ablation experiments are given in Table 3.  
We conducted experiment (a) replacing the proposed attention with the original full self-attention and keeping everything else the same. The results showed that our method outperformed the original full self-attention. Our proposed method yielded relative improvements of 6.8% in EER and 4.1% in MinDCF. This suggests that enhancing the locality of the self-attention mechanism in Transformer can improve the model's performance on the speaker verification task. Experiment (b) clearly demonstrates the importance of the sub-block aggregation net described in Section 3. Aggregating different levels of features through the sub-block aggregation net leads to a relative improvement of 23% in EER and 17.8% in MinDCF. The results showed that aggregating features at different levels through sub-block aggregation net enables the model to obtain richer information, which is beneficial to obtain more robust speaker embedding in our proposed model. In experiment (c), we did not use LePE and kept the other configurations the same. The results showed a relative improvement of 3.5% in EER and 11.5% in MinDCF by introducing LePE. This suggests that further enhancing the locality of the model by positional encoding can effectively improve performance.