以三元組損失微調時延神經網路語者嵌入函數之語者辨識系統(Time Delay Neural Network-based Speaker Embedding Function Fine-tuned with Triplet Loss for Distance-based Speaker Recognition)

Chih-Ting Yeh, Po-Chin Wang, Su-Yu Zhang, Chia-Ping Chen, Shan-Wen Hsiao, Bo-Cheng Chan, Chung-Li LuROCLING 2019

Abstract

Modern speaker recognition systems require robust "open-set" capabilities to identify individuals not seen during training. This research, presented at ROCLING 2019, explores a two-stage training strategy for Time Delay Neural Networks (TDNN). By first pre-training a model for classification using Softmax loss and subsequently fine-tuning it with Triplet Loss, the researchers optimize the geometric properties of speaker embeddings. The results demonstrate that this hybrid approach significantly improves performance, achieving a 29% relative reduction in Equal Error Rate (EER) on the VoxCeleb1 dataset and enabling effective speaker identification using simple Euclidean distance.

Introduction

In the field of speaker recognition, the goal has shifted from simple classification of a known group to "open-set" recognition. This involves extracting a digital "fingerprint" or embedding from a voice sample and comparing it against a database of enrolled users. The industry-standard framework for this task is the x-vector, which utilizes a Time Delay Neural Network (TDNN) to capture long-term temporal speech patterns.

While TDNNs are typically trained using Softmax loss for classification, this method does not explicitly optimize the geometric distance between embeddings. Ideally, recordings of the same speaker should be clustered closely in the high-dimensional embedding space, while recordings of different speakers should be far apart. This research addresses this gap by introducing a metric learning stage using Triplet Loss.

Feature Extraction and Preprocessing

The system processes raw audio into 30-dimensional Mel-Frequency Cepstral Coefficients (MFCCs). This pipeline involves several stages to ensure the signal is suitable for neural network processing, including pre-emphasis, framing, and spectral transformations.

The MFCC feature extraction pipeline used to prepare audio signals for the neural network.

To enhance robustness against real-world noise and acoustic variations, the researchers applied data augmentation using the MUSAN dataset and Room Impulse Responses (RIR) to simulate background noise and echoes.

Methodology: Two-Stage Training

The core contribution of this work is a two-stage training pipeline designed to refine the embedding space:

  1. Stage 1: Classification Pre-training: The TDNN is first trained using standard Cross-Entropy loss (Softmax). This stage allows the model to learn fundamental discriminative features for speaker identification across a large population.
  2. Stage 2: Triplet Loss Fine-tuning: The final classification layer is removed, and the network is fine-tuned using Triplet Loss to optimize the geometric distribution of the embeddings.

Triplet Loss and Negative Mining

In the second stage, the model processes triplets of data: an Anchor (Speaker A), a Positive (another sample of Speaker A), and a Negative (Speaker B). The loss function forces the network to minimize the distance between the Anchor and Positive while maximizing the distance to the Negative. To prevent the model from converging on trivial examples, the authors employed Semi-hard Negative mining, focusing on samples that are challenging but still solvable.

The TDNN architecture during the second stage of training, where Triplet Loss is used to fine-tune the speaker embeddings.

Experimental Results

The models were trained on the VoxCeleb2 dataset (5,994 speakers) and evaluated on the VoxCeleb1 test set. The results clearly demonstrate the synergy between classification pre-training and metric fine-tuning.

Training Method Equal Error Rate (EER) minDCF (Cost Function)
Softmax Only 9.64% 0.7174
Triplet Only 10.39% 0.8919
Softmax + Triplet 6.84% 0.6278

The combined approach achieved a 29% relative improvement in EER compared to the Softmax-only baseline. Furthermore, the optimized embedding space allowed for effective recognition using simple Euclidean distance, bypassing the need for complex back-end statistical models like Probabilistic Linear Discriminant Analysis (PLDA).

Conclusion

This research highlights the importance of combining global classification objectives with local metric learning. While Triplet Loss alone is insufficient for training from scratch, it serves as a powerful fine-tuning tool that significantly enhances the discriminative power of speaker embeddings. The resulting system provides a more robust and computationally efficient solution for distance-based speaker recognition in real-world environments.

Summary updated

BibTeX
@inproceedings{yeh2019time,
  author = {Chih-Ting Yeh and Po-Chin Wang and Su-Yu Zhang and Chia-Ping Chen and Shan-Wen Hsiao and Bo-Cheng Chan and Chung-Li Lu},
  title = {{以三元組損失微調時延神經網路語者嵌入函數之語者辨識系統(Time Delay Neural Network-based Speaker Embedding Function Fine-tuned with Triplet Loss for Distance-based Speaker Recognition)}},
  booktitle = {ROCLING},
  year = {2019},
}
Figure