# Robust Deep Speaker Recognition: Learning Latent Representation with Joint Angular Margin Loss
## 5 Experiments
### Training and Testing Procedure  
The raw waveforms were split into chunks of 200 ms with an overlap of 10 ms, similarly to previous work [16]. In SincNet, the first 3 layers are convolutional layers, where the first is a sinc-based convolutional layer, and the two following layers are typical convolutional layers. Sinc-based convolution used 80 filters of length \(L=251\). The later layers had 60 filters of length \(L=5\). Input samples and all convolutional layers were normalized [48]. Three fully connected layers composed of 2048 neurons were applied with batch normalization [49]. Leaky_ReLU [50] was used as the activation function of all hidden layers. This study followed the same protocol as that of [16] to initialize the model parameters. In order to train the models, RMSprop was used as the optimization algorithm. Minibatches of 128 were used with a learning rate of \(10^{-2}\), alpha \(\alpha=0.95\), and epsilon \(\epsilon=10^{-7}\).  
Each configuration was trained on each dataset. During training, hyperparameters \(m\) and \(s\) were set to \(m=0.5\) and \(s=30\), similarly to [21]. For all our training configurations, \(s=30\) was considered,  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Model Name** & **Configuration** \\ \hline SincNet (baseline) & SincNet + softmax loss [16] \\ AM-SincNet (baseline) & SincNet + AM-Softmax loss [21] \\ AF-SincNet & SincNet + ArcFace loss (Section 4.2.1) \\ Ensemble-SincNet & SincNet + ensemble loss (Section 4.2.2) \\ ALL-SincNet & SincNet + combination of margin-based loss (Section 4.2.3) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Model-configuration details with reference to configuration names.  
but hyperparameter \(m\) was set by trying out different \(m\) values in the range of \(0.3\leq m\leq 0.75\) and using the optimal value. For Equation (9), \(m=0.5\). In Equation (10), \(m_{1}=4\), \(m_{2}=0.5\), and \(m_{3}=0.35\). The same setting was used for Equation (11). For Equations (9)-(11), \(s\) was set to 30.  
Two distinct kinds of evaluations were performed in this study. First, for speaker identification, the model was tested on the same distribution as that on which it was trained (e.g., test set of TIMIT, while the model was trained on the remaining set). For speaker verification, interdataset evaluation was performed. In this case, the model was tested on a different dataset/domain than the one on which it was trained (e.g., test set of TIMIT, while the model was trained on the training set of LibriSpeech). This was to demonstrate the ability to generalize on unseen data distributions. To further test the generalizability of the proposed models, interlanguage evaluation was performed using Bengali speech recognition, a more diverse task. As previously stated in Section 5.1, interlanguage evaluation was performed by using the large Bengali ASR dataset.  
For this study, Ubuntu 18.04 with 16 GB RAM and RTX 2060 SUPER with 8 GB RAM were used. All codes were implemented using the PyTorch [51] framework. All the codes are available at github ([[https://github.com/jongli747/robust-dsr](https://github.com/jongli747/robust-dsr)]([https://github.com/jongli747/robust-dsr](https://github.com/jongli747/robust-dsr))).