[Paper Review] A Comparison of Metric Learning Loss Functions for End-To-End Speaker Verification
This paper systematically compares six metric learning loss functions for end-to-end speaker verification using the VoxCeleb dataset, evaluating performance, training time, and robustness. It finds that the additive angular margin loss outperforms all others in accuracy, robustness, and efficiency, enabling a truly end-to-end system with minimal back-end processing when combined with SincNet and x-vector architecture.
Despite the growing popularity of metric learning approaches, very little work has attempted to perform a fair comparison of these techniques for speaker verification. We try to fill this gap and compare several metric learning loss functions in a systematic manner on the VoxCeleb dataset. The first family of loss functions is derived from the cross entropy loss (usually used for supervised classification) and includes the congenerous cosine loss, the additive angular margin loss, and the center loss. The second family of loss functions focuses on the similarity between training samples and includes the contrastive loss and the triplet loss. We show that the additive angular margin loss function outperforms all other loss functions in the study, while learning more robust representations. Based on a combination of SincNet trainable features and the x-vector architecture, the network used in this paper brings us a step closer to a really-end-to-end speaker verification system, when combined with the additive angular margin loss, while still being competitive with the x-vector baseline. In the spirit of reproducible research, we also release open source Python code for reproducing our results, and share pretrained PyTorch models on torch.hub that can be used either directly or after fine-tuning.
Motivation & Objective
- To address the lack of fair, systematic comparisons among metric learning loss functions in speaker verification.
- To evaluate the performance, training efficiency, and robustness of multiple loss functions in a unified end-to-end framework.
- To identify the optimal loss function for building a truly end-to-end speaker verification system with minimal back-end complexity.
- To promote reproducibility by releasing open-source code and pretrained PyTorch models.
Proposed method
- The study uses a unified end-to-end architecture combining SincNet for raw audio feature learning and x-vector for embedding extraction.
- Six loss functions are evaluated: cross entropy, congenerous cosine loss, additive angular margin loss, center loss, contrastive loss, and triplet loss.
- Training employs data augmentation via random background noise from the MUSAN dataset with SNR between 10–20 dB.
- For classification-based losses, a batch size of 128 from 128 different speakers is used; for contrast-based losses, batches include 20 or 40 speakers with 2–3 utterances per speaker.
- Hyperparameters such as learning rate, margin, and weighting coefficients are tuned via grid search and reported in Table 1.
- Performance is evaluated using equal error rate (EER) on the VoxCeleb 1 test set, with and without adaptive s-norm score normalization.
Experimental results
Research questions
- RQ1Which metric learning loss function yields the highest speaker verification accuracy on the VoxCeleb 1 dataset?
- RQ2How do different loss functions compare in terms of training time and convergence speed?
- RQ3To what extent do margin-based losses improve robustness to domain shift compared to standard classification losses?
- RQ4Can a fully end-to-end system using a single metric loss replace the complex back-end pipeline of traditional x-vector systems?
Key findings
- The additive angular margin loss achieves the lowest EER on VoxCeleb 1, significantly outperforming all other loss functions.
- With adaptive s-norm score normalization, the additive angular margin loss achieves performance competitive with the standard x-vector baseline using handcrafted features.
- The additive angular margin loss shows the highest robustness, as the improvement from score normalization is not statistically significant, indicating inherent generalization.
- Contrastive and additive angular margin losses are the only ones for which the performance gain from score normalization is not statistically significant, suggesting better domain generalization.
- The congenerous cosine loss and contrast-based losses (contrastive and triplet) show slower convergence, with models still improving after 200 hours of training.
- The additive angular margin loss is the only loss function that achieves superior performance across all criteria: accuracy, robustness, and training efficiency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.