Sortformer: A Novel Approach for Permutation-Resolved Speaker Supervision in Speech-to-Text Systems

Taejin Park, Ivan Medennikov, Kunal Dhawan, Weiqing Wang, He Huang, Nithin Rao Koluguri, Krishna C Puvvada, Jagadeesh Balam, Boris Ginsburg

Introduction

In multi-speaker Automatic Speech Recognition (ASR), models must simultaneously solve two complex tasks: transcribing the spoken words and attributing them to the correct speaker (diarization). Sortformer introduces Sort Loss, a novel training objective that resolves the notorious speaker permutation problem by ordering speakers based on their "arrival time" (when they first speak). By integrating this model into a multi-speaker speech-to-text system via sinusoidal speaker kernels, the authors achieve state-of-the-art diarization and transcription accuracy with negligible computational overhead.

The Permutation Problem in Multi-Speaker ASR

The primary bottleneck in multi-speaker ASR is the permutation problem: if two people speak in a recording, the model doesn't inherently know if the first output stream should be assigned to "Speaker A" or "Speaker B."

Traditionally, researchers use Permutation Invariant Training (PIT) or Permutation Invariant Loss (PIL). PIL calculates the loss for every possible permutation of speakers to find the best match with the ground truth. While effective, PIL becomes computationally expensive as the number of speakers grows. Furthermore, it is difficult to integrate into the standard cross-entropy loss frameworks used by modern Large Language Models (LLMs) and ASR systems. This paper seeks a way to make speaker supervision "permutation-resolved" so that multi-speaker training can function just like standard single-speaker training.

Comparison of standard Permutation Invariant Loss (PIL) and the proposed Sort Loss based on arrival time order.

The Sortformer Architecture and Methods

The authors propose a two-part solution: Sortformer (the diarization model) and a Multi-Speaker ASR (MS-ASR) architecture.

  1. Sortformer & Sort Loss: Instead of checking every permutation, Sortformer is trained to output speaker labels in the chronological order they first appear in the audio. This "arrival-time sorting" turns a complex permutation matching problem into a straightforward classification task. The authors also utilize a Hybrid Loss that combines Sort Loss with traditional PIL to handle edge cases where arrival times are ambiguous or difficult to estimate.
  2. Transformer Encoder with Positional Embeddings: Unlike previous end-to-end diarization models that are permutation-equivariant (where order doesn't matter), Sortformer explicitly uses positional embeddings. This gives the model a sense of time, allowing the Transformer's self-attention mechanism to naturally "learn to sort" speakers chronologically.
  3. Speaker Kernels: To bridge diarization and transcription, the authors introduce sinusoidal speaker kernels. The diarization probabilities from Sortformer are multiplied by these kernels and added to the ASR encoder's hidden states. This effectively "colors" the audio features with speaker identity information before they reach the decoder.
  4. Sorted Serialized Transcript (SST): The model outputs a single text stream where speaker tokens (e.g., <spk0>, <spk1>) are inserted before words, following the same arrival-time logic.
The proposed multi-speaker speech-to-text architecture integrating Sortformer and sinusoidal speaker kernels.

Key Insights

  • Neural Sorting: The most elegant insight of the paper is that providing a model with positional embeddings and a sorted objective allows the Transformer architecture to naturally perform "neural sorting." This eliminates the need for the factorial-complexity matching required by PIT.
  • Standardizing Supervision: By resolving permutations at the encoder level, the rest of the ASR pipeline can be trained using standard cross-entropy loss on tokens. This makes it significantly easier to add speaker-tagging capabilities to existing foundational models (like NVIDIA’s Canary).
  • Minimal Overhead: Because the sorting is baked into the attention mechanism and the speaker kernels are simple additive functions, the system adds less than 1% latency to the inference process compared to a standard ASR model.

Datasets and Results

The model was trained on a massive blend of 2,030 hours of real-world data (including Fisher, AMI, DIHARD3, and CALLHOME) and 5,150 hours of simulated mixtures.

  • Diarization Performance: Sortformer with Hybrid Loss achieved a Diarization Error Rate (DER) of 5.87% on CALLHOME (2-speaker), outperforming several established end-to-end neural diarization (EEND) baselines.
  • Transcription Accuracy: On the LibriSpeechMix (3-speaker) benchmark, the Sortformer-MS-Canary model achieved a Word Error Rate (WER) of 9.05%. For comparison, the previous state-of-the-art SOT-ASR achieved 24.0% on the same task.
  • Real-World Robustness: On the AMI test set (up to 4 speakers), the system reduced the WER from a baseline of 26.93% to 18.04%, demonstrating that the speaker kernels effectively help the model disentangle overlapping voices in natural, challenging settings.

Limitations and Future Work

While highly effective, the current experiments focus on scenarios with up to 4 speakers. As the "crowd" gets larger, the complexity of overlapping speech and the distinctness of sinusoidal kernels might degrade. Additionally, if two speakers start at the exact same millisecond, the "sort" order becomes arbitrary—a theoretical edge case the authors mitigate with Hybrid Loss.

Future directions include extending this framework to streaming ASR (where the model cannot look ahead to determine the final sort order) and integrating it into multimodal LLMs for more complex "who-said-what" reasoning tasks.

Summary updated

BibTeX
@inproceedings{park2025sortformer,
  author = {Taejin Park and Ivan Medennikov and Kunal Dhawan and Weiqing Wang and He Huang and Nithin Rao Koluguri and Krishna C Puvvada and Jagadeesh Balam and Boris Ginsburg},
  title = {{Sortformer: A Novel Approach for Permutation-Resolved Speaker Supervision in Speech-to-Text Systems}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=AyYjRvrbDx},
}
Figure