Bayesian HMM clustering of x-vector sequences

An interactive reading of VBx: how a 20-year-old idea (an HMM whose states are speakers) combined with a modern speaker embedding and a PLDA prior produced state-of-the-art speaker diarization on CALLHOME, AMI and DIHARD II — with no learned parameters in the clustering step at all.

Based on Landini, Profant, Diez & Burget, Computer Speech & Language 71 (2022) 101254. Every figure carries a source badge: article for content taken directly from the paper (with section/equation/table references), toy example for illustrative data generated on this page, background for general knowledge not in the paper, and critical reading for my own assessment.

toy example The whole story in one picture: a conversation is cut into overlapping 1.5 s windows, each window becomes an x-vector, and VBx explains that sequence with a hidden Markov model whose states are speakers. The soft "responsibility" of each speaker for each window (γ, middle) is what the inference refines; the hard alignment at the bottom is the diarization output. Overlapped speech (hatched) is assigned to only one speaker — the model has no notion of overlap.
1 The problem

Who spoke when

Speaker diarization takes a recording and answers "who spoke when": it partitions the timeline into segments and assigns each segment an anonymous speaker label (speaker 1, speaker 2, …). Nothing is known about the speakers in advance — not their voices, usually not even how many there are. The output is typically written as an RTTM file: one line per segment with onset, duration and speaker label.

Four things make it hard background:

  • Unknown number of speakers. The system must decide how many voices there are. Over-estimating splits a speaker in two; under-estimating merges two people.
  • Overlapping speech. In meetings and phone calls people talk over each other. A segment can legitimately belong to two speakers at once.
  • Short turns. Back-channels ("mm-hm", "yeah") last a fraction of a second: too little audio to identify a voice reliably.
  • Domain shift. Telephone, far-field meeting microphones, YouTube, court rooms — channel and acoustics differ wildly from the data the models were trained on.

Two paradigms §1

The article positions VBx explicitly against the then-emerging end-to-end neural diarization (EEND) line of work. It is a modular clustering pipeline, and the authors are candid about what that buys and what it costs:

Modular x-vector clustering (this paper)
  • Assumes oracle VAD — speech/non-speech boundaries are given.
  • Cannot represent overlapped speech: each window belongs to exactly one speaker.
  • Handles any number of speakers; the count is inferred.
  • Works on long real recordings; won recent evaluations (DIHARD II).
  • Clustering step has no trained weights — only 3 scalar hyper-parameters.
End-to-end neural diarization (contrast, §1)
  • Does VAD and diarization jointly.
  • Can output overlapped speech natively.
  • At the time, restricted to a fixed number of speakers.
  • Mostly tested on artificially mixed short recordings.
  • Mostly did not reach state-of-the-art results (the paper cites Horiguchi et al., 2020).

What VBx is, in one sentence. Extract one 256-d x-vector every 0.25 s; pre-cluster them with agglomerative hierarchical clustering; then run variational Bayes inference in a Bayesian HMM whose states are speakers, whose emission distributions come from a PLDA model, and whose transitions encode "people tend to keep talking" — and read off the most likely state sequence.

The paper's own framing (§1): its goal is not to compare VBx against its more complex frame-level predecessor (Diez et al., 2020) but against the current state of the art, and to publish, for the first time, the derivation and update formulae for this simplified model together with training recipes and a standardised AMI evaluation protocol.

2 End-to-end pipeline

From waveform to RTTM

Click any block to expand what it does, its inputs/outputs, the relevant equations and why it is designed that way. Colours are kept consistent for the rest of the page: front-end, x-vector extractor, PLDA / transform, AHC initialisation, VBx inference. Tensor shapes are those stated in Table 1 and §3.2; T is the number of 10 ms frames in a window and N the number of x-vectors in a recording.

Front-end §3.1.1, §3.2per recording
↓
x-vector extractor — ResNet101 Table 1, §3.1.1per window, pre-trained, frozen
↓
Embedding post-processing and PLDA transform §2.3, Eqs 2–7, §3.2per recording, pre-trained, frozen
↓
Initialisation §3.2per recording
↓
VBx — variational Bayes inference in a Bayesian HMM §2, Eqs 14–25per recording, iterated to convergence
↓
Output §2.1, §3.4

Audio input

In
Single-channel recording. 16 kHz for AMI and DIHARD II; 8 kHz telephone speech for CALLHOME. For AMI the paper evaluates both Mix-Headset audio and the N1 microphone array beamformed with BeamformIt (§4.2).
Why two sample rates
Two separate x-vector extractors and PLDA models are trained, one per bandwidth, differing only in the Mel range: 20–7700 Hz (16 kHz) vs 20–3700 Hz (8 kHz) (§3.1.1).

Oracle voice activity detection

In / out
Recording → list of speech regions from the reference annotation.
Consequence
Because speech/non-speech is given, the false alarm term of DER is exactly zero and all of the non-speaker-error part of DER is missed speech caused by overlap (§3.4). Segments shorter than 0.1 s are discarded (§3.2).
Alternatives
background A system VAD (energy-based or neural) would introduce false alarms and misses; the paper lists replacing oracle VAD with a real VAD as future work (§6).

Sliding-window segmentation

In / out
Speech regions → sub-segments of 1.5 s with a 0.25 s shift (shorter for the tail of a region or for regions under 1.5 s) (§3.2).
Why
1.5 s is a compromise: long enough for a usable speaker embedding, short enough to localise speaker changes. The 0.25 s hop sets the temporal resolution of the diarization; consecutive windows share 83% of their audio, which is why consecutive x-vectors are strongly correlated — the reason the acoustic scaling factor FA exists (§2.5).

Log-Mel filterbank features

In / out
Waveform → 64 log Mel filterbank coefficients per 10 ms frame, 25 ms analysis window. A 1.5 s window gives T ≈ 150 frames; training uses 4 s segments, T = 400 (§3.1.1).
Shape
64 × T × 1, treated as a one-channel image by the first 2-D convolution (Table 1).

First convolution

Layer
Conv2D 3×3 with 32 output channels, stride 1: 64×T×1 → 64×T×32 (Table 1).
Why 2-D
The ResNet treats the time–frequency plane as an image, so local time–frequency patterns are learned by the same filters everywhere; this is the ResNet-based x-vector design of Zeinali et al. (2019) that the paper adopts.

ResNet101 trunk

Four stages of bottleneck blocks (1×1 → 3×3 → 1×1 convolutions), exactly the 3·4·23·3 block counts that define ResNet101 (He et al., 2016). Each stage after the first halves both frequency and time with stride 2 (Table 1):

StageBottleneck (channels)BlocksStrideOutput
ResNetBlock-11×1, 32 · 3×3, 32 · 1×1, 1283164 × T × 128
ResNetBlock-21×1, 64 · 3×3, 64 · 1×1, 2564232 × T/2 × 256
ResNetBlock-31×1, 128 · 3×3, 128 · 1×1, 51223216 × T/4 × 512
ResNetBlock-41×1, 256 · 3×3, 256 · 1×1, 1024328 × T/8 × 1024
Why ResNet
Depth with residual connections gives a much stronger extractor than the original TDNN x-vector network; the paper attributes a large part of its results to this extractor combined with the clustering (§1). background Alternatives in common use: TDNN/E-TDNN x-vectors, ECAPA-TDNN, smaller ResNet34 variants.

Statistics pooling

In / out
8 × T/8 × 1024 → mean and standard deviation over the time axis, stacked: 16 × 1024, flattened to 16384 (Table 1).
Why
This is the step that turns a variable-length sequence into a fixed-length vector, as in the original x-vector architecture (Snyder et al., 2018). Mean captures the average spectral "colour" of the voice; standard deviation captures its variability.
Alternatives
background Attentive statistics pooling, learnable dictionary encoding. Not explored in the paper.

Embedding layer

Layer
Linear 16384 → 256. The 256-d activation is the x-vector (Table 1, §3.1.1).
Training
Stochastic gradient descent with additive angular margin (AAM) loss over speaker identities; margin ramped up during the first two epochs, then one more epoch with fixed m = 0.2 (§3.1.1). The classification head is discarded after training.
Note
At diarization time this network is frozen. Nothing downstream back-propagates into it.

Centering, whitening, length normalisation

Operation
Subtract a global mean, decorrelate/scale to unit covariance (whitening), then scale each x-vector to unit length (Garcia-Romero & Espy-Wilson, 2011). The same processing is applied to the PLDA training data (§3.2).
Why
background Length normalisation makes the embedding distribution closer to the Gaussian assumptions of PLDA, which improves scoring substantially in speaker verification; the paper applies it as standard practice.

PLDA-derived transform (the "two-covariance" model)

The x-vectors are mapped into a space where the PLDA within-speaker covariance is the identity and the between-speaker covariance is diagonal (Λ), and simultaneously reduced from 256 to D = 128 dimensions (§2.3, §3.2):

\[ \mathbf{X} = (\tilde{\mathbf{X}} - \mathbf{1}\boldsymbol{\mu}^{\mathsf T})\,\mathbf{E} \qquad\qquad \boldsymbol{\Sigma}_{ac}\mathbf{E} = \boldsymbol{\Sigma}_{wc}\mathbf{E}\boldsymbol{\Lambda} \]
Eqs 2–3. Subtract the global mean μ, then multiply by E, the eigen-vectors of the generalised eigen-problem between between-speaker (Σac) and within-speaker (Σwc) covariances. Keeping only the D eigen-vectors with the largest eigen-values is exactly LDA dimensionality reduction. In the new space Σwc = I and Σac = Λ (diagonal), which later makes every matrix in the inference diagonal.
Why
With diagonal Λ, the precision matrices Ls in Eq. 17 are diagonal and inverting them is element-wise — the key efficiency gain over the frame-level BHMM where the equivalent matrix was full and frame-dependent (§2.5.1).
Not from the paper
The choice D = 128 is stated; why 128 and not 256 is not discussed.

Agglomerative hierarchical clustering (initialisation)

In / out
The N × N matrix of cosine similarities between all pairs of x-vectors → a hard cluster label per x-vector (§3.2).
Stopping rule
A similarity threshold, deliberately tuned to under-cluster (produce more clusters than true speakers). The same threshold is used for all datasets.
Why under-cluster
VBx can merge clusters by driving their prior πs to zero, but it can never create a new speaker: the inference cannot converge to more speakers than the initialisation offers (footnote 7). So the initialisation must err on the side of too many.
Baseline
When AHC is used alone as the diarization system (the "AHC" rows in the result tables), its threshold is instead tuned for best DER on the dev set.

Update q(ys): where is each speaker in embedding space?

\[ q^*(\mathbf{y}_s)=\mathcal N\!\left(\mathbf{y}_s\,\middle|\,\boldsymbol{\alpha}_s,\mathbf{L}_s^{-1}\right),\quad \boldsymbol{\alpha}_s=\frac{F_A}{F_B}\mathbf{L}_s^{-1}\sum_t\gamma_{ts}\boldsymbol{\rho}_t,\quad \mathbf{L}_s=\mathbf{I}+\frac{F_A}{F_B}\Big(\sum_t\gamma_{ts}\Big)\boldsymbol{\Lambda},\quad \boldsymbol{\rho}_t=\mathbf{V}^{\mathsf T}\mathbf{x}_t \]
Eqs 15–18. Given soft assignments γts, each speaker's latent vector gets a Gaussian posterior. Its mean αs is a responsibility-weighted average of the (projected) x-vectors, shrunk towards the origin by the prior; its precision Ls grows with the amount of speech attributed to the speaker, so speakers with lots of data are pinned down tightly. Only first-order statistics Σγtsρt are needed — no second-order statistics as in the frame-level model.

Update q(Z): forward–backward over speakers

\[ \gamma_{ts}=\frac{A(t,s)\,B(t,s)}{\bar p(\mathbf{X})},\qquad A(t,s)=\bar p(\mathbf{x}_t|s)\sum_{s'}A(t-1,s')\,p(s|s'),\qquad B(t,s)=\sum_{s'}B(t+1,s')\,\bar p(\mathbf{x}_{t+1}|s')\,p(s'|s) \]
Eqs 19–22. Standard HMM forward–backward, run once per VB iteration. A(0,s) = πs and B(N,s) = 1. The "emission" is not a plain likelihood but the expected log-likelihood under the speaker's uncertainty (Eq. 23, see §3 of this page). The output γts is a soft N × S alignment matrix — the object you will watch evolve in the live demo.

Update πs: automatic relevance determination

\[ \pi_s \propto \gamma_{1s}+\frac{(1-P_{loop})\,\pi_s}{\bar p(\mathbf{X})}\sum_{t=2}^{N}\sum_{s'}A(t-1,s')\,\bar p(\mathbf{x}_t|s)\,B(t,s),\qquad \sum_s\pi_s=1 \]
Eq. 24. πs is re-estimated as the expected number of times the chain enters speaker s (initial state plus transitions through the non-emitting node). A speaker that the data never calls for gets πs → 0 and is thereby removed from the model. This is how VBx estimates the number of speakers (§2.2, §2.5.3).

Evidence lower bound

\[ \hat{\mathcal L}=\ln\bar p(\mathbf{X})+\sum_s\frac{F_B}{2}\Big(D+\ln\big|\mathbf{L}_s^{-1}\big|-\mathrm{tr}\big(\mathbf{L}_s^{-1}\big)-\boldsymbol{\alpha}_s^{\mathsf T}\boldsymbol{\alpha}_s\Big) \]
Eq. 25. The objective being maximised. ln p̄(X) is a by-product of the forward pass; the bracket is minus the KL divergence between each speaker posterior and its standard-normal prior, scaled by FB. Because Ls is diagonal, the log-determinant is a sum of logs. Iterate until the ELBO stops increasing (§2.5.4).

Output

Decision
The diarization is the most likely state sequence; in practice the marginal argmax zt = argmaxs γts per x-vector (§2.1, §2.5.2). Consecutive x-vectors with the same label form a segment at 0.25 s resolution.
Scoring
DER (Eq. 26) and JER with the dscore tool, in three setups: forgiving (0.25 s collar, overlap excluded), fair (collar, overlap scored) and full (no collar, overlap scored) (§3.4).
article Layered pipeline reconstructed from §2, §3.1–3.2 and Table 1. Only the x-vector extractor and the PLDA model have trained parameters; the shaded VBx stage is a fixed-form inference algorithm with three scalar hyper-parameters (FA, FB, Ploop).
3 Every component in detail

The model, piece by piece

The pipeline above has two kinds of parts: a learned front half (extractor, PLDA) and a probabilistic model plus inference algorithm in the back half. This section goes through the probabilistic model in the order the paper builds it (§2.1 → §2.5). Notation follows the paper: X = {x1…xT} is the sequence of (transformed) x-vectors, Z = {z1…zT} the speaker label of each, Y = {y1…yS} the latent speaker vectors. (The paper reuses T for both the number of x-vectors and the number of frames in Table 1; here T means x-vectors.)

3.1 The HMM topology: speakers are states §2.2, Fig. 1, Eq. 1

An ergodic HMM with one state per speaker. With probability Ploop the current speaker keeps talking; otherwise the chain passes through a non-emitting node and picks the next speaker (possibly the same one again, a convenience that simplifies the updates — footnote 2) according to the priors πs.

article Reconstruction of Fig. 1 (HMM for 3 speakers, one state each, with a dummy non-emitting initial node). Hover a state to see its transition probabilities. The non-emitting node is also the initial state, so πs doubles as the initial-state distribution.
\[ p(s|s') = (1-P_{loop})\,\pi_s + \delta(s=s')\,P_{loop} \]
Eq. 1 — transition probability from speaker s′ to speaker s. Stay with probability Ploop; otherwise re-draw a speaker from π. Ploop is a tuned hyper-parameter that encodes typical turn length: with a 0.25 s hop, Ploop = 0.9 means an expected turn of 10 x-vectors ≈ 2.5 s before the chain even considers switching. The πs are not fixed: they are re-estimated from each recording (Eq. 24), and the paper imposes no prior on them (footnote 3).

What this buys. Smoothness in time. Plain clustering treats every x-vector independently and can flip speaker labels window by window; the HMM makes label changes expensive. What it costs. The model assigns each x-vector to exactly one state, so overlapped speech cannot be represented (§2.1).

3.2 Speaker-specific distributions from PLDA §2.3, Eqs 4–7

PLDA is the standard back-end for comparing x-vectors in speaker verification. VBx uses its simplest form, the two-covariance model: x-vectors of speaker s are Gaussian around a speaker mean, and speaker means are themselves Gaussian around a global mean. After the transform of Eqs 2–3, in the new space:

\[ p(\mathbf{m}_s)=\mathcal N(\mathbf{m}_s;\mathbf{0},\boldsymbol{\Lambda}),\qquad \mathbf{m}_s=\mathbf{V}\mathbf{y}_s,\quad \mathbf{V}=\boldsymbol{\Lambda}^{1/2},\qquad p(\mathbf{y}_s)=\mathcal N(\mathbf{y}_s;\mathbf{0},\mathbf{I}),\qquad p(\mathbf{x}_t|\mathbf{y}_s)=\mathcal N(\mathbf{x}_t;\mathbf{V}\mathbf{y}_s,\mathbf{I}) \]
Eqs 4–7. Each speaker is fully described by one latent vector ys with a standard-normal prior; V (diagonal, the square root of the between-speaker eigen-values) stretches it into the embedding space; and x-vectors scatter around Vys with identity covariance. Treating ys as a latent variable with a prior — rather than a point estimate — is what makes the HMM "Bayesian", and it means the whole PLDA model is embedded inside the HMM, so the HMM discriminates between speakers exactly as a PLDA verifier would.

Compared with its predecessor (Diez et al., 2020): that model worked on MFCC frames and modelled each speaker with a GMM constrained to an eigen-voice subspace (an i-vector-like model). Replacing "GMM over frames" with "single Gaussian over x-vectors" is the whole design change, and it collapses the update formulae (§2).

toy example The PLDA generative story in 2-D. Speaker means (large dots) are drawn from N(0, Λ) — the stretched grey ellipse; x-vectors (small dots) scatter around each mean with identity covariance (small circles). Drag the slider to change the between-speaker spread Λ: when Λ is small relative to the within-speaker spread, speakers overlap and diarization is harder. The paper's Λ is learned from thousands of speakers; here it is a knob.

3.3 The complete Bayesian HMM §2.4, Eqs 8–10

\[ p(\mathbf{X},\mathbf{Z},\mathbf{Y})=p(\mathbf{X}|\mathbf{Z},\mathbf{Y})\,p(\mathbf{Z})\,p(\mathbf{Y})=\prod_t p(\mathbf{x}_t|\mathbf{y}_{z_t})\;\prod_t p(z_t|z_{t-1})\;\prod_s p(\mathbf{y}_s) \]
Eq. 10 — the joint distribution. Three factors: emissions (each x-vector comes from its speaker's Gaussian, Eq. 7/8), transitions (Eq. 1/9, with p(z1|z0) meaning the initial probability π), and speaker priors (Eq. 6). The generative process is: draw a vector ys per speaker; walk the Markov chain; emit an x-vector at each step. Diarization is the inverse problem: given X, recover Z.

3.4 Inference: variational Bayes §2.5, Eqs 11–13

The posterior p(Z|X) requires integrating over all speaker vectors Y, which is intractable. VBx uses variational Bayes with the mean-field assumption q(Z, Y) = q(Z) q(Y), and maximises the ELBO, which the paper splits into three terms and then deliberately re-weights:

\[ \hat{\mathcal L}\big(q(\mathbf{Z},\mathbf{Y})\big)= F_A\,\mathbb E_{q(\mathbf{Y},\mathbf{Z})}\!\big[\ln p(\mathbf{X}|\mathbf{Y},\mathbf{Z})\big] + F_B\,\mathbb E_{q(\mathbf{Y})}\!\left[\ln\frac{p(\mathbf{Y})}{q(\mathbf{Y})}\right] + \mathbb E_{q(\mathbf{Z})}\!\left[\ln\frac{p(\mathbf{Z})}{q(\mathbf{Z})}\right] \]
Eq. 13 — the (modified) ELBO. Term 1: expected log-likelihood of the x-vectors. Term 2: −KL(q(Y)‖p(Y)), pulling speaker posteriors towards the prior. Term 3: −KL(q(Z)‖p(Z)), pulling alignments towards the HMM prior (i.e. towards smooth turns). The theoretically correct weights are FA = FB = 1. The paper sets them differently on purpose:
  • FA — acoustic scaling factor. Consecutive 1.5 s windows shifted by 0.25 s overlap heavily, so their x-vectors are far from independent; the likelihood term is over-confident by roughly that factor. FA < 1 down-weights it.
  • FB — speaker regularisation coefficient. Penalises complex speaker models; larger FB makes the inference drop more speakers (§2.5).
Only the ratio of the three terms matters, so a third factor would be redundant (footnote 4). These two numbers, plus Ploop, are the only quantities tuned per dataset (§3.2); the values are not given in the paper.

3.5 The emission term under uncertainty §2.5.2, Eq. 23

\[ \ln\bar p(\mathbf{x}_t|s)=F_A\Big[\boldsymbol{\rho}_t^{\mathsf T}\boldsymbol{\alpha}_s-\tfrac12\,\boldsymbol{\lambda}^{\mathsf T}\big(\mathbf{l}_s+\boldsymbol{\alpha}_s^{2}\big)-\tfrac D2\ln 2\pi-\tfrac12\mathbf{x}_t^{\mathsf T}\mathbf{x}_t\Big] \]
Eq. 23 (efficient form). The "likelihood" that the forward–backward algorithm uses is the expected log-likelihood under the speaker posterior q(ys). λ is the diagonal of Λ, ls the diagonal of Ls−1 (the speaker's posterior variance) and αs2 is element-wise. The term ρtᵀαs rewards x-vectors that point in the speaker's direction; the −½λᵀls term penalises speakers whose location is still uncertain. The last two terms are the same for every speaker and cancel in Eq. 19, so they are never computed.

3.6 The full algorithm §2.5.4

Initialise all γts from the AHC labels (§3.2) repeat update q(ys) for s = 1..S Eq. 15–18 for t = 1..T: compute A(t, s) for s = 1..S Eq. 20 (forward) for t = T..1: compute B(t, s) for s = 1..S Eq. 21 (backward) update γts for all t, s Eq. 19 update πs for s = 1..S Eq. 24 (ARD) evaluate ELBO Eq. 25 until the ELBO converges
article The VB inference loop as summarised at the end of §2.5.4. Each iteration is one forward–backward pass plus closed-form updates; all matrices are diagonal, so an iteration costs O(T·S·D) for the emissions and O(T·S²) for forward–backward. The number of iterations and the convergence tolerance are not reported.

background Alternatives to VBx for the clustering step (not evaluated in the paper, listed for orientation): plain AHC with PLDA or cosine scoring and a tuned threshold; spectral clustering of the similarity matrix; k-means with a speaker-count heuristic; frame-level VB resegmentation on MFCCs (the paper's own predecessor). VBx differs from all of these in jointly estimating speaker models, alignments and the number of speakers under a single probabilistic objective with explicit temporal smoothing.

4 Training

What is trained, and on what

This is where VBx differs most from an end-to-end system: nothing in the diarization model itself is trained on diarization data. The two trained components are trained on speaker-labelled verification corpora, with a classification objective. There is no permutation-invariant training because there is no network that outputs speaker tracks — the HMM is permutation-invariant by construction (speaker states are exchangeable).

4.1 x-vector extractor §3.1.1–3.1.2, Tables 2–3

  • Objective: additive angular margin (AAM) loss over speaker identities, SGD. Margin ramped up during the first two epochs, then one more epoch with fixed margin m = 0.2. Three epochs in total.
  • Examples: random 4 s segments (T = 400 frames); about 89 million examples (original + augmented), covering more than 60% of the speech in the corpora.
  • Augmentation: as in the Kaldi SRE16 recipe — four extra copies with added noise, music or reverberation.
  • Data selection: Kaldi energy-based VAD removes silence; speakers with fewer than 2 recordings and utterances with under 4 s of speech are dropped (≈4% of speech).
  • 8 kHz system: same data plus telephone corpora; all wide-band data is downsampled and passed through a randomly chosen telephone codec (AMR, G.711, G.726, GSM-FR, GSM-EFR). About 30% of DeepMine is discarded for being too short.
article Training corpora for the two extractors (Tables 2 and 3). Hover for exact numbers. Bars show hours of speech; the 8 kHz extractor sees roughly three times as much data and twice as many speakers.

4.2 PLDA §3.1.3

Trained on the same corpora as the matching extractor, with one x-vector per recording (recordings range from 4 s to several minutes). The paper notes an acknowledged mismatch: the PLDA is trained on long-recording x-vectors but applied to 1.5 s windows — and reports that this does not seem to hurt. No PLDA adaptation to the target domain is performed anywhere in the paper (§3.2), unlike the authors' earlier DIHARD challenge system.

4.3 What is tuned on the development sets §3.2, §3.3

QuantityHow setValue given?
FA, FB, PloopTuned per dataset on DIHARD II dev, AMI dev, and by 2-fold cross-validation on CALLHOME (one setting close to optimal on both halves, applied to the whole set)No
AHC stopping threshold (VBx initialisation)Tuned to under-cluster; a single value shared by all datasetsNo
AHC stopping threshold (AHC-only baseline)Tuned for best DER on each dev setNo
LDA dimension DFixed128
Window / hopFixed1.5 s / 0.25 s
Initial number of HMM speakers"Larger" than expected (§2.2); determined by AHCNo

critical reading Three tuned scalars is a small budget, and the same AHC threshold everywhere is a genuine robustness claim. But the values are not reported in the paper, so reproducing the numbers requires the released recipes rather than the text.

5 Inference, step by step

Watching VBx diarize a toy conversation

A 24-second toy conversation with three speakers, one silence gap and two overlap regions. The x-vectors here are 2-dimensional points generated from the PLDA model of §3.2, so everything below is produced by a faithful implementation of Eqs 15–25 running in your browser — not an animation of a pre-written answer. Step through to see how the output evolves from windows to responsibilities to segments.

toy example Reference speakers are A, B, C; hatched regions are overlapped speech. Hyper-parameters: FA = 0.3, FB = 1, Ploop = 0.9, AHC initialised with 5 clusters (all values chosen for the toy; the paper does not report its own).

How an unknown number of speakers is handled

Two mechanisms, in sequence (§2.2, §3.2): AHC is told to over-segment (it produced 5 clusters for 3 speakers above), then VB inference prunes. Pruning happens through πs: Eq. 24 re-estimates each prior as the expected number of entries into that state, which for a redundant cluster shrinks every iteration until it hits zero and the state can no longer be entered. The paper calls this automatic relevance determination (footnote 6). The lever that controls how aggressively this happens is FB.

How overlapping speech is handled

It is not. Each x-vector gets one state (§2.1). In an overlap region the window's embedding is a blend of two voices; the HMM assigns it to whichever speaker fits better (usually the one that was already talking, thanks to Ploop) and the second speaker's speech in that region is scored as missed. With oracle VAD this is the only source of missed speech, which is why the paper can compute Miss = DER − SER (§3.4).

6 Live model

Play with the Bayesian HMM

The same 2-D implementation, now with the knobs exposed. The left panel is embedding space: points are x-vectors coloured by their current most-likely speaker; large markers are the speaker posterior means αs with their posterior standard deviation (from Ls−1) as a ring. The right panels show the responsibility matrix γ over time, the speaker priors π and the ELBO. Things to try:

  • Raise initial clusters well above the true count, then watch π kill the extras one by one.
  • Push FB up: speakers get merged even when they are distinct. Push it down: redundant clusters survive.
  • Lower Ploop to 0.5: the temporal prior weakens and labels start to flicker.
  • Increase the within-speaker spread beyond 1: the model still assumes unit variance (Eq. 7) and becomes over-confident — FA < 1 partly compensates.
Embedding space (after PLDA transform)
Responsibilities γts over time (rows = HMM states; opacity = probability; dashed = true speaker changes)
Speaker priors πs (ARD)
ELBO per iteration (Eq. 25)
toy example D = 2, Λ = diag(4, 4), T = 80 x-vectors. State colours are the AHC cluster ids; a state whose πs drops below 10−3 is drawn grey as "dropped". Diarization accuracy is measured against the generating labels after the optimal state-to-speaker mapping.
7 Results

How well it works — and how it is measured

7.1 Diarization error rate §3.4, Eq. 26

\[ \mathrm{DER}=\frac{\mathrm{SER}+\mathrm{FA}+\mathrm{Miss}}{\mathrm{Total\_speech}} \]
Eq. 26. Time-weighted error after the best one-to-one mapping between hypothesised and reference speakers. SER (speaker error, "confusion"): speech attributed to the wrong speaker. FA (false alarm): non-speech attributed to a speaker, or a second speaker hypothesised where only one speaks. Miss: speech attributed to nobody — including the second speaker of an overlap when the system outputs only one. The denominator counts overlapped speech once per speaker, so two people talking for 1 s contribute 2 s. With oracle VAD, FA = 0 and Miss comes only from overlap.

JER is the secondary metric: it weights every speaker equally regardless of how much they spoke, so missing a speaker with little speech hurts JER much more than DER. It uses no collar and always scores overlap.

The paper scores every dataset under up to three setups, and argues the field should move to the hardest one:

SetupCollarOverlap scored?Purpose
forgiving0.25 snohistorical standard for CALLHOME and AMI; enables comparison to older work
fair0.25 syesall speech counts, but boundaries are forgiven (annotations are not frame-precise)
full0yesas in DIHARD and CHiME; the authors' recommended setup

A collar of 0.25 s means ±0.25 s around every reference boundary is not scored — which, on a corpus of short turns, can remove a large fraction of the audio (Table 5: between 13 309 s and 52 317 s of AMI speech is scored depending on the protocol).

DER anatomy on a toy example

correctmissed speechfalse alarmspeaker confusionnot scored (silence or collar or excluded overlap)
toy example Reference (top) vs hypothesis (bottom) for a 12-second clip with an overlap at 4.5–5.5 s. The hypothesis in its default state is what an oracle-VAD, no-overlap system like VBx produces when its clustering is perfect: the only error is the missed second speaker in the overlap. Toggle the collar and the overlap option to see how the three evaluation setups change the same system's DER; the other toggles inject the error types that VBx cannot produce (false alarms) or produces when clustering fails (confusion).

7.2 CALLHOME Table 4, §5.1

499 telephone conversations in six languages, 2–7 speakers (87% have 2 or 3), about 15 h of speech after VAD. Under the forgiving setup VBx reaches 4.42% DER, better than every published system the paper compares against. Scoring overlap (fair) raises it to 14.21% — almost all of the increase is the overlap the model cannot output — and removing the collar (full) raises it to 21.77%.

7.3 AMI Tables 5–6, §4, §5.2

AMI (100 h of meetings, 171 recordings, 3 sites) had no standard diarization protocol: published works mix three partitions, five sets of references, two audio types and several scoring setups. The paper replicates each competing protocol to compare fairly (Table 5), then proposes a new one (§4.2): the official Full-corpus-ASR partition (no speaker overlap between train/dev/eval), references derived from the v1.6.2 manual annotations using words only (vocal sounds such as laughter discarded), adjacent same-speaker words merged, pauses kept. Results under that protocol (Table 6) are in the chart above; the condensed literature comparison is below.

Partition · references · audioSetupScored speech dev/eval (s)SystemDev DEREval DER
Pyannote · Pyannote · Mix-Headsetforgiving29 200 / 29 609Bredin et al. (2020)–4.6
forgivingVBx2.142.17
Pyannote · Pyannote · Mix-Headsetfull54 051 / 52 317Bredin et al. (2020)–24.8
fullBullock et al. (2020)–23.8
fullVBx22.9522.85
Kaldi · force-aligned · beamformed arrayforgiving15 053 / 14 080Sun et al. (2020)16.415.4
forgivingVBx1.321.84
Kaldi · force-aligned · beamformed arrayfair16 241 / 14 886Sun et al. (2020)19.417.8
fairVBx4.964.67
Kaldi · Kaldi · Mix-Headsetforgiving18 743 / 18 219Maciejewski et al. (2018)4.8 (dev+eval pooled)
forgivingVBx2.143.02 (2.58 pooled)
Kaldi · Pyannote · Mix-Headsetfull35 495 / 33 953Raj et al. (2020a)–23.6
fullRaj et al. (2020b) — fusion of 3 systems with overlap handling21.620.5
fullVBx22.6323.47
Kaldi · Pyannote · Mix-Headsetno collar, no overlap22 812 / 21 911Raj et al. (2020b)7.75.2
no collar, no overlapVBx4.083.80
Kaldi no-TNO · work-specific · beamformed arrayforgiving14 545 / 13 309Pal et al. (2020), system A5.024.92
forgivingPal et al. (2020), system B6.212.87
forgivingVBx4.274.58
article Condensed from Table 5 (DER only; the table also reports SER). VBx is best in every protocol except two: Raj et al. (2020b) under the full setup, which fuses three systems with overlap handling and is beaten by VBx as soon as overlap is excluded from scoring; and one eval number from Pal et al. (2020) that the authors argue is an outlier (its dev DER is 6.21, more than double its eval DER, and it would not have been selected on dev).

7.4 DIHARD II Table 7, §5.3

192 dev / 194 eval recordings (≈18 h / 17 h) from many domains with 1–10 speakers. VBx obtains 18.19% / 18.55% DER (dev / eval, full setup). This is not the best number ever published: the authors' own challenge system (Landini et al., 2020) and Lin et al. (2020b) are lower, but both adapt to the DIHARD dev set and the former adds overlap handling and resegmentation. Against the same systems without dev-set adaptation (bracketed values in Table 7: 19.14 and 19.46 on eval), the un-adapted VBx is better. Note the JER column: VBx and AHC land on almost the same JER (≈43.9) despite a 5-point DER gap; the paper attributes this to tuning for DER, which does not reward keeping low-speech speakers alive.

critical reading There is a small internal inconsistency: §5.3 says the fair setup gives 11.75% / 12.41% DER, while Table 7 lists 12.23% / 12.29%. The charts use the table values.

7.5 Ablations

The paper contains no ablation study in the usual sense. The one controlled comparison is AHC-only vs AHC + VBx with the same x-vectors, PLDA and VAD, reported on every dataset and setup (the "AHC" rows). That comparison isolates the value of the Bayesian HMM step: it cuts speaker error roughly in half everywhere (e.g. CALLHOME forgiving 8.10 → 4.42; AMI Mix-Headset full SER 6.87 → 4.43; DIHARD II eval SER 13.89 → 8.85), while Miss — the overlap — is untouched because neither system can output overlap. The three evaluation setups act as a sensitivity analysis of the metric, not of the model.

8 Limitations and open questions

What the paper says, and what I would add

Stated in the article article

  • No overlap handling. Each x-vector belongs to one state (§2.1); overlapped speech is always missed, which costs ~10 absolute DER points on CALLHOME between forgiving and fair setups (§5.1).
  • Oracle VAD. All results assume ground-truth speech boundaries; combining with a real VAD is left as future work (§6), and the comparison to systems with their own VAD (Horiguchi et al., 2020, 15.29% on a CALLHOME subset) is not apples-to-apples (§5.1).
  • Cannot add speakers. Inference never converges to more speakers than AHC initialised (footnote 7).
  • Frame-independence assumption. Heavily overlapping windows violate the HMM's independence of observations; FA is a heuristic patch (§2.5).
  • PLDA mismatch. Trained on whole-recording x-vectors, applied to 1.5 s windows; reported as harmless but not analysed (§3.1.3).
  • DER vs JER. Tuning for DER does not give optimal JER; the two can disagree (§5.3).
  • No cross-dataset adaptation by design; adapted systems do beat it on DIHARD II (§5.3).
  • Evaluation hygiene. AMI comparisons in the literature are mostly invalid because protocols differ; the paper's proposed protocol is a contribution precisely because this was unsolved (§4).

My critical reading critical reading

  • Extractor vs clustering is not disentangled. The headline comparisons pit "ResNet101 x-vectors + VBx" against systems with different, often weaker, embeddings. The AHC baseline shows VBx helps on top of these x-vectors, but there is no experiment running VBx on a standard Kaldi x-vector, so the share of the gain due to the 8 540-hour ResNet101 is unknown. The conclusion's claim that VBx is "complementary" to new embeddings is plausible but untested here.
  • Hyper-parameters are tuned per dataset and not reported. FA, FB, Ploop differ per corpus; with no values in the text, the sensitivity of the results to them cannot be judged from the paper. A sweep plot would have been more informative than Table 5's protocol replications.
  • "State of the art" is conditional. On DIHARD II the claim holds only against un-adapted systems; on AMI, only against single systems without overlap handling. The abstract's wording is stronger than the result tables.
  • No variance or significance. Results are single runs on single splits; CALLHOME uses one hyper-parameter setting chosen to be "close to optimal" on both halves and then evaluated on the whole set, which is a mild form of test-set tuning. The dismissal of Pal et al.'s 2.87 as an outlier is reasonable but is an argument, not evidence.
  • The 0.25 s resolution floor. Segment boundaries can only fall on the x-vector grid; under the full (no-collar) setup this alone contributes error at every speaker change. The paper advocates the full setup but does not quantify this floor.
  • Open questions the paper invites: how far does FA deviate from 1 and could the window correlation be modelled rather than scaled away; can the HMM be extended with overlap states (two-speaker states) without breaking the diagonal-matrix efficiency; and what happens with a system VAD, where FA ≠ 0 and the π-pruning interacts with spurious speech.
9 Glossary

Terms used on this page

Speaker diarization Partitioning audio into speaker-homogeneous segments with anonymous labels ("who spoke when").
x-vector Fixed-length speaker embedding from a neural network with statistics pooling (Snyder et al., 2018); here 256-d from a ResNet101.
PLDA Probabilistic LDA: Gaussian model with separate between- and within-speaker covariances, used to compare embeddings.
Two-covariance model The simplest PLDA: speaker means ~ N(μ, Σac), embeddings ~ N(mean, Σwc).
LDA Linear discriminant analysis: projection maximising between- vs within-class scatter; here derived from PLDA parameters (Eq. 3).
Length normalisation Scaling each embedding to unit norm so the distribution better matches Gaussian PLDA assumptions.
AHC Agglomerative hierarchical clustering: start with one cluster per item, repeatedly merge the most similar pair until a threshold.
HMM / ergodic HMM Hidden Markov model; ergodic means any state can transition to any state.
Bayesian HMM HMM whose state-distribution parameters (here ys) are latent variables with priors rather than point estimates.
Variational Bayes (VB) Approximating an intractable posterior by maximising a lower bound (ELBO) over a tractable family.
Mean-field The VB assumption that the approximate posterior factorises, here q(Z)q(Y).
ELBO Evidence lower bound: log-likelihood minus KL terms; increasing it tightens the approximation.
Responsibility γts Posterior probability that x-vector t was produced by speaker s; a soft alignment.
Forward–backward Dynamic programming over an HMM that yields per-time state posteriors in O(T·S²).
ARD Automatic relevance determination: a Bayesian model's tendency to switch off unneeded components (here, speakers via πs → 0).
FA, FB, Ploop VBx's three tuned scalars: acoustic scale, speaker regularisation, self-loop probability.
AAM loss Additive angular margin softmax (Deng et al., 2019): classification loss that enforces a margin between classes on the unit sphere.
Statistics pooling Mean and standard deviation of activations over time; converts a sequence to a fixed-length vector.
VAD / oracle VAD Voice activity detection; "oracle" uses the reference speech/non-speech labels.
DER Diarization error rate: (miss + false alarm + speaker confusion) / total reference speech, after optimal speaker mapping.
SER Speaker error (confusion) component of DER.
JER Jaccard error rate: per-speaker Jaccard-based error averaged equally over reference speakers.
Collar Time window around reference boundaries excluded from scoring (0.25 s in forgiving/fair setups).
Forgiving / fair / full The paper's three scoring setups: collar + no overlap; collar + overlap; no collar + overlap.
RTTM Rich Transcription Time Marked: NIST text format listing segments (file, onset, duration, speaker).
Mix-Headset / beamformed AMI audio types: sum of close-talking headset mics vs. microphone-array audio enhanced with BeamformIt.
10 Key takeaways

If you remember six things

  1. VBx is a clustering algorithm, not a network. It is variational inference in a Bayesian HMM whose states are speakers and whose emissions are a PLDA model over x-vectors. Nothing in it is trained on diarization data.
  2. Three ingredients do the work: a strong frozen ResNet101 x-vector extractor, a PLDA prior that lets each speaker be summarised by one latent vector with a posterior, and an HMM transition structure (Ploop) that enforces temporal continuity.
  3. The number of speakers is found by pruning. AHC deliberately over-segments; the πs update (Eq. 24) drives unneeded speakers to zero. FB sets how eagerly.
  4. Everything is diagonal. The PLDA-derived transform makes Λ diagonal and Σwc = I, so speaker precisions Ls are diagonal and the whole iteration is first-order statistics plus one forward–backward pass.
  5. It wins on CALLHOME, AMI and DIHARD II without adaptation — 4.42% forgiving DER on CALLHOME, 2.10% on AMI Mix-Headset, 18.55% full DER on DIHARD II eval — but every number assumes oracle VAD and no overlap handling, and the AHC → VBx gain is on confusion only.
  6. Read the scoring setup before the number. The same CALLHOME system scores 4.42, 14.21 or 21.77% DER depending on collar and overlap; the paper's push for the "full" setup and a standard AMI protocol is as much a contribution as the model.