Concept - Label Switching and Label-Invariant Summaries
Summary
Concept note (no raw source). Mixtures, DP mixtures, LDA and IBP have exchangeable component labels, so the posterior is invariant under relabelling and component-indexed quantities are meaningless across draws. Diagnose and report only label-invariant functionals, or align labels explicitly (Hungarian algorithm, Stephens relabelling).
Main Content
Label switching
If the prior and likelihood are invariant to a permutation of component indices, then : the posterior has (at least) symmetric modes. An MCMC chain may jump between them (label switching) or sit in one, and different chains may sit in different ones (Stephens 2000, JRSSB; Jasra, Holmes, Stephens 2005, Stat. Sci.).
Consequences. Component-wise posterior means are averages over modes; /ESS on component parameters are inflated or misleading; trace plots show jumps; for the DP/stick-breaking prior the weights are only stochastically ordered, so there is no built-in ordering either.
Remedies.
- Label-invariant functionals (preferred): log-likelihood, posterior predictive density on a grid, number of occupied components , co-assignment matrix , (mixture-implied word or item distribution), region boundary probabilities.
- Point partition: minimise expected Binder or variation-of-information loss over and sampled partitions (Concept - DP Mixtures for Image Segmentation).
- Post-hoc relabelling: Hungarian algorithm to match each draw’s components to a reference by minimising a cost (L1 distance of component distributions, or negative overlap of cluster membership); Stephens’ KL-based relabelling minimises expected loss.
- Identifiability constraints (e.g. ): easy but can distort the posterior if components overlap.
Hungarian alignment (assignment problem)
Given a cost matrix between reference component and draw component , the permutation is found exactly in (Kuhn-Munkres); this resolves label switching for a fixed reference when the cost reflects component similarity.
Examples
Aligning topics across restarts or chains
Compare topic-word matrices from two fits by L1 distances and
linear_sum_assignment; see the runnable snippet in Blei 2003 - LDA Beyond Text Baskets and Sessions. For DP mixtures, compare label-free summaries; compute per draw and its histogram.
import numpy as np
def occupied(z): # K+ for one draw of assignments
return len(np.unique(z))
def coassign(Z): # Z: (draws, items) assignments
return (Z[:, :, None] == Z[:, None, :]).mean(0)Connections
MCMC Basics, Efficient MCMC, Monsters and Mixtures (non-identifiability in mixtures), Concept - Topic Model Evaluation and Stability.