Interrelate Training and Searching: A Unified Online Clustering Framework for Speaker Diarization

Yifan Chen, Yifan Guo, Qingxuan Li, Gaofeng Cheng, Pengyuan Zhang, Yonghong Yan

Introduction

Speaker diarization, the process of partitioning an audio stream into segments according to speaker identity ("who spoke when"), is a critical component in applications ranging from meeting transcription to live captioning. While offline diarization systems benefit from having access to the entire recording to optimize speaker clusters, online systems must process audio in real-time or near-real-time. This constraint introduces significant challenges, particularly in maintaining accuracy without the benefit of global context.

Existing online diarization pipelines typically separate embedding extraction from the clustering process. This separation leads to two primary issues: a training-inference mismatch, where embedding models are optimized for identification rather than clustering, and the "new speaker" problem, where the system struggles to distinguish between a returning speaker and a novel participant in a live stream. This paper presents a unified framework designed to bridge these gaps by interrelating the training and searching phases.

Methodology

The proposed framework consists of two integrated components: Clustering-Guided Recurrent Training (CGRT) and Truncated Beam Searching Clustering (TBSC).

Clustering-Guided Recurrent Training (CGRT)

Traditional embedding extractors are often trained using classification losses that do not explicitly account for the geometric requirements of clustering. CGRT addresses this by incorporating the clustering algorithm directly into the training loop. The process follows a "prediction-correction" cycle:

  1. Prediction: The model generates embeddings for a sequence of audio segments, which are then grouped by a clustering algorithm.
  2. Correction: The resulting clusters are compared against ground-truth labels.
  3. Optimization: The system identifies two critical structural parameters: $l_{intra}$ (the minimum distance of an incorrectly assigned sample from a cluster center) and $l_{new}$ (the maximum distance of a correctly assigned sample from its center). These parameters are used to refine the loss function, effectively teaching the model the optimal spatial distribution for speaker clusters.

Truncated Beam Searching Clustering (TBSC)

In the inference phase, standard online systems often rely on "greedy" clustering, making immediate, irreversible decisions for each new audio chunk. TBSC instead employs a beam search strategy, maintaining multiple concurrent hypotheses (paths) regarding the speaker's identity.

  • Parameter Integration: TBSC utilizes the $l_{intra}$ and $l_{new}$ values learned during the CGRT phase to score and penalize specific paths.
  • Latency Management: To maintain online functionality, the search is "truncated." The system looks back over a fixed window ($T_0$) to finalize decisions, allowing for a small buffer (e.g., 2.5 seconds) to resolve ambiguities before committing to a result.

Experimental Setup and Results

The framework was trained on the CN-Celeb1 & 2 datasets, which provide over 1,300 hours of diverse Chinese speaker data. Evaluation was conducted on the AISHELL-4 dataset, a challenging benchmark featuring real-world meeting scenarios with 4 to 8 participants.

Performance was measured using the Diarization Error Rate (DER). The proposed system achieved a DER of 14.48% with a 2.5-second latency. This represents a significant improvement over the online baseline (Linear Forecasting Clustering, 17.66% DER) and, notably, slightly outperforms the standard offline baseline (Agglomerative Hierarchical Clustering, 14.57% DER).

Method Type DER (%)
LFC (Baseline) Online 17.66
AHC (Baseline) Offline 14.57
CGRT + TBSC (Ours) Online 14.48

Discussion and Key Insights

The success of this framework stems from treating training as a process of "parameter discovery." Rather than manually tuning thresholds for the search algorithm, the system learns the optimal metric space boundaries ($l_{intra}, l_{new}$) directly from data. This creates a more robust, fault-tolerant system where ambiguous audio segments can be resolved as more context becomes available within the beam search window.

By closing the performance gap between online and offline methods, this research demonstrates that interactive training—where the model "learns how it will be used"—is a powerful paradigm for real-time speech processing.

Limitations and Future Work

Despite its performance, the framework involves a trade-off between latency and accuracy; reducing the beam size or the truncation window ($T_0$) to achieve sub-second latency may lead to increased error rates. Additionally, the computational overhead of maintaining multiple search paths may pose challenges for deployment on resource-constrained edge devices. Future work is needed to evaluate the framework's robustness against highly overlapped speech, a common difficulty in multi-speaker environments that was not explicitly detailed in this study.

Summary updated

Abstract

For online speaker diarization, samples arrive incrementally, and the overall distribution of the samples is invisible. Moreover, in most existing clustering-based methods, the training objective of the embedding extractor is not designed specially for clustering. To improve online speaker diarization performance, we propose a unified online clustering framework, which provides an interactive manner between embedding extractors and clustering algorithms. Specifically, the framework consists of two highly coupled parts: clustering-guided recurrent training (CGRT) and truncated beam searching clustering (TBSC). The CGRT introduces the clustering algorithm into the training process of embedding extractors, which could provide not only cluster-aware information for the embedding extractor, but also crucial parameters for the clustering process afterward. And with these parameters, which contain preliminary information of the metric space, the TBSC penalizes the probability score of each cluster, in order to output more accurate clustering results in online fashion with low latency. With the above innovations, our proposed online clustering system achieves 14.48\% DER with collar 0.25 at 2.5s latency on the AISHELL-4, while the DER of the offline agglomerative hierarchical clustering is 14.57\%.
BibTeX
@inproceedings{chen2022interrelate,
  author = {Yifan Chen and Yifan Guo and Qingxuan Li and Gaofeng Cheng and Pengyuan Zhang and Yonghong Yan},
  title = {{Interrelate Training and Searching: A Unified Online Clustering Framework for Speaker Diarization}},
  booktitle = {Interspeech},
  year = {2022},
  url = {https://openreview.net/forum?id=Qe4oR83HCK},
}
Figure