Introduction
In modern Speech-to-Text (STT) systems, transcribing a single speaker is largely a solved problem. However, multi-speaker environments—where individuals often talk over one another—present a significant challenge known as the "permutation problem." Correctly assigning words to the right speaker in overlapping speech is computationally complex and often leads to system failure. NVIDIA researchers have introduced Sortformer, a novel architecture that simplifies multi-speaker Automatic Speech Recognition (ASR) by training models to sort speakers by arrival time.
The Permutation Problem
When training models for multiple speakers, researchers traditionally face the challenge of matching predicted speaker labels to ground truth. If a model predicts Speaker A and Speaker B, but the ground truth labels them as Speaker 1 and Speaker 2, determining the correct mapping is difficult. Permutation Invariant Loss (PIL) is the standard solution, calculating loss for every possible mapping. While effective for standalone diarization, PIL is computationally expensive and difficult to integrate into token-based ASR pipelines used in modern Large Language Models (LLMs).
The Sortformer Approach
Sortformer addresses this "integration gap" by replacing complex permutation-matching with a simple "Sort Loss" based on speaker arrival times.
Instead of evaluating every possible permutation, Sortformer forces the output of speaker labels in the order they first appear in the audio. This transforms a complex matching problem into a straightforward sequence task, allowing the model to learn "neural sorting" through its attention mechanism.
Architecture and Training
The Sortformer system bridges the gap between acoustic timestamps and text tokens using a multi-component architecture.
- Hybrid Loss: The model utilizes a weighted combination of Sort Loss and PIL. This allows the system to benefit from structured chronological ordering while maintaining the robust error correction of PIL during early training phases.
- Sinusoidal Speaker Kernels: To associate audio features with specific speakers, the researchers use sinusoidal kernel functions—similar to positional embeddings—to "tag" encoder states. These tags guide the ASR decoder in identifying which speaker is associated with which acoustic feature.
- Sorted Serialized Transcript (SST): Transcripts are formatted with speaker tokens (e.g.,
<spk0>,<spk1>) sorted by arrival time. This enables the entire system to be fine-tuned using standard cross-entropy loss, making multi-speaker ASR training functionally equivalent to single-speaker training.
Key Results
The Sortformer approach demonstrates significant improvements in both diarization and transcription accuracy:
- Diarization Performance: On the DH3 dataset, Sortformer achieved a Diarization Error Rate (DER) of 14.76%, a substantial improvement over the MSDD baseline of 29.40%.
- Transcription Accuracy: In the LibriSpeechMix 3-speaker task, the Sortformer-MS-Canary model reached a Word Error Rate (WER) of 9.05, compared to the previous state-of-the-art of 20.2.
- Efficiency: Despite its multi-speaker tracking capabilities, Sortformer adds only 0.78% to total processing time, making it highly suitable for production environments.
Conclusion
Sortformer represents a major step forward in bridging the gap between diarization and ASR. By leveraging arrival-time sorting and speaker kernels, it simplifies the training process and significantly boosts performance in overlapping speech scenarios. Future work will focus on adapting this architecture for real-time streaming applications and expanding its use to speaker-specific translation and summarization.
Summary updated