In Defence of Metric Learning for Speaker Recognition

Joon Son Chung, Jaesung Huh, Seongkyu Mun, Minjae Lee, Hee-Soo Heo, Soyeon Choe, Chiheon Ham, Sunghwan Jung, Bong-Jin Lee, Icksang Han

Abstract

Recent trends in speaker recognition have favored classification-based loss functions over metric learning. This paper challenges this shift through an extensive benchmark involving 20,000 GPU-hours. We introduce the Angular Prototypical loss, a refinement of prototypical networks that utilizes cosine similarity and consistent batching. Our results demonstrate that when properly tuned, metric learning objectives not only match but often exceed the performance of state-of-the-art classification methods like AAM-Softmax (ArcFace) in open-set speaker verification tasks.

Introduction

Speaker recognition systems frequently operate in "open-set" environments, where the model must verify identities not present in the training set. This requires learning a robust embedding space where intra-class variance is minimized and inter-class variance is maximized. Historically, the field has moved toward classification-based losses (e.g., Softmax variants) due to their ease of implementation and strong performance. Metric learning approaches, such as Triplet loss, have been sidelined due to perceived training instability and sensitivity to hard-negative mining. This study provides a rigorous "apples-to-apples" comparison to re-evaluate the potential of metric learning.

Methodology

Network Architectures

We evaluate performance across three primary architectures: VGG-M-40, Thin ResNet-34, and a newly proposed Fast ResNet-34. The Fast ResNet-34 is designed for computational efficiency, significantly reducing Multiply-Accumulate operations (MACs) while maintaining competitive performance.

Network architectures and computational complexity.

Loss Functions and Angular Prototypical Loss

We compare standard classification losses (Softmax, AM-Softmax, AAM-Softmax) against metric learning objectives (Triplet, GE2E, Prototypical).

Our proposed Angular Prototypical loss improves upon standard Prototypical networks in two key ways:

  1. Cosine Similarity: We replace Euclidean distance with an angular-based metric featuring learnable scale and bias, providing scale invariance.
  2. Batch Consistency: We ensure each speaker prototype is formed from a fixed number of utterances, aligning training more closely with test-time evaluation.

Experimental Setup

Models were trained on the VoxCeleb2 development set (5,994 speakers) and evaluated on the VoxCeleb1 test set. To ensure a strict open-set evaluation, there is no speaker overlap between the training and testing datasets.

Results and Discussion

Performance Comparison

The comprehensive evaluation across various objectives and architectures reveals that metric learning, particularly the Angular Prototypical loss, achieves superior results.

Comparison of EER (%) for different loss functions and architectures.

As shown in the table, Angular Prototypical loss achieved the lowest Equal Error Rate (EER) of 2.21% on the Thin ResNet-34 architecture, outperforming the best-tuned AAM-Softmax (2.36%).

Key Insights

  • Hyperparameter Sensitivity: Classification losses like AAM-Softmax are highly sensitive to margin ($m$) and scale ($s$) parameters. Suboptimal tuning can lead to performance inferior to basic metric learning.
  • Batch Size and Hard Negatives: Metric learning performance scales positively with batch size, as larger batches facilitate the discovery of more informative hard negatives.
  • Curriculum Learning: For both AAM-Softmax and Triplet loss, a curriculum learning strategy—gradually increasing task difficulty—was essential for training stability.

Conclusion

This work demonstrates that metric learning remains a powerful and competitive paradigm for speaker recognition. By introducing the Angular Prototypical loss and conducting a fair comparison, we show that the perceived superiority of classification-based losses may be a result of insufficient tuning or suboptimal batching in previous metric learning implementations. Our findings and released code provide a foundation for further exploration of distance-based objectives in biometric verification.

Summary updated

BibTeX
@inproceedings{chung2020defence,
  author = {Joon Son Chung and Jaesung Huh and Seongkyu Mun and Minjae Lee and Hee-Soo Heo and Soyeon Choe and Chiheon Ham and Sunghwan Jung and Bong-Jin Lee and Icksang Han},
  title = {{In Defence of Metric Learning for Speaker Recognition}},
  booktitle = {Interspeech},
  year = {2020},
  doi = {10.21437/interspeech.2020-1064},
}
Figure