Why Summarize Clustering With Pairwise Probabilities?
A clustering model can describe each sample with a latent cluster label. But the numeric values of those labels are arbitrary: relabeling every cluster leaves the partition unchanged. When posterior draws assign different numbers to the same underlying groups, comparing the labels directly can therefore be misleading. This issue is known as label switching; the earlier material on Label Switching and Identifiability in Mixture Posteriors explains why label-specific summaries can fail.
A label-invariant question is whether two samples belong to the same cluster. Its posterior probability can be estimated directly from posterior draws, regardless of how clusters are numbered in each draw. The resulting pairwise probabilities summarize posterior evidence about shared membership. They are useful summaries, but they do not automatically specify a valid single partition.
The estimate is the proportion of retained draws in which the pair is together. The event \(z_i=z_j\) is unchanged if the cluster labels in any draw are permuted. Thus, this estimate is unaffected by label switching. The matrix with entries \(\hat{p}_{ij}\) is often called a posterior similarity matrix. Its diagonal entries equal 1, it is symmetric, and every entry lies between 0 and 1. A value near 1 indicates strong posterior support for the pair sharing a cluster; a value near 0 indicates little support.
Estimating Pairwise Probabilities From Draws
For each pair, the calculation is an average of indicator values. No alignment of cluster labels across draws is needed. The draws must, however, represent the posterior distribution of interest: the model and sampling procedure must be appropriate, and the retained draws must adequately explore that distribution. If posterior computation has not explored relevant partitions, the empirical proportions can be misleading even though the formula is correct.
Worked Example: Building a Similarity Matrix From Ten Draws
Suppose a hypothetical analysis has four samples, A, B, C, and D, and ten equally weighted posterior partition draws. The observed partitions and their frequencies are as follows.
| Partition | Number of draws |
|---|---|
| AB | CD | 4 |
| ABC | D | 2 |
| A | BCD | 2 |
| ABCD | 1 |
| A | B | C | D | 1 |
The notation AB | CD means that A and B form one cluster, while C and D form another. For A and B, the pair is together in the four AB | CD draws, two ABC | D draws, and one ABCD draw. Therefore,
For A and C, only the two ABC | D draws and the one ABCD draw place them together, so \(\hat{p}_{AC}=3/10=0.300\). Applying the same count to every pair gives
For example, B and C are together in the two ABC | D draws, two A | BCD draws, and one ABCD draw, giving \(\hat{p}_{BC}=5/10=0.500\). The matrix summarizes pairwise posterior evidence; it does not claim that the clustering is uniquely determined.
The estimate is a Monte Carlo approximation to a posterior probability, not the probability that a particular fixed partition is correct. With independent draws, the approximate Monte Carlo standard error of \(\hat{p}_{ij}\) is \(\sqrt{\hat{p}_{ij}(1-\hat{p}_{ij})/M}\). Posterior simulation draws are often dependent, so this independent-draw expression can understate Monte Carlo error; dependence must be considered when judging numerical precision.
Constraints Implied by Partitions
Pairwise co-clustering events cannot vary arbitrarily. In every draw, if A is together with B and B is together with C, then A is together with C. This transitivity yields a useful probability constraint. Write \(E_{AB}\) for the event that A and B share a cluster, and define \(E_{BC}\) and \(E_{AC}\) similarly. The probability of the intersection of two events is at least the sum of their probabilities minus 1. Since \(E_{AB}\cap E_{BC}\) is contained in \(E_{AC}\),
The same argument applies to any three samples and any ordering of the pair. This is a necessary coherence condition, not a complete characterization of every possible posterior similarity matrix. It can nonetheless expose impossible proposed values or arithmetic errors.
Worked Example: A Feasible Matrix With an Inconsistent Threshold
Consider a hypothetical posterior over three samples A, B, and C. It assigns probability 0.200 to the partition ABC, 0.400 to AB | C, and 0.400 to A | BC. These probabilities sum to 1. A and B are together in the first two partitions; B and C are together in the first and third; A and C are together only in the all-together partition. Thus,
These values obey the transitivity bound: \(p_{AC}\geq p_{AB}+p_{BC}-1=0.200\). Yet a rule that declares a pair together whenever its probability is at least 0.500 joins A–B and B–C while separating A–C. That collection of pairwise decisions is not a partition: if A is with B and B is with C, all three must belong to the same cluster. The threshold rule has not produced a coherent clustering.
Joining connected pairs into a single connected component would produce ABC, a valid partition, but it would change the direct threshold decision for A–C. This example shows why thresholded similarities need an explicit rule for resolving conflicts; they are not automatically a complete partitioning procedure.
Choosing a Representative Partition
One principled summary is to choose a valid partition whose pairwise same-cluster indicators are close to the posterior similarity estimates. For a candidate partition \(c\), let \(I(c_i=c_j)\) indicate whether the candidate puts samples \(i\) and \(j\) together. The least-squares summary associated with Dahl’s method selects a posterior-draw partition that minimizes the sum of squared differences between its pair indicators and the posterior similarity matrix. A broader version minimizes over all possible partitions, whether sampled or not.
The minimization balances pairwise evidence while respecting the requirement that a partition be transitive. A minimum need not be unique; if several partitions attain the same minimum, each is an equally good summary under this criterion. This is a decision summary, not a replacement for the full posterior distribution over partitions.
Worked Example: Comparing Valid Summaries
Use the feasible three-sample probabilities from the preceding example: \(p_{AB}=0.600\), \(p_{AC}=0.200\), and \(p_{BC}=0.600\). Compute \(D(c)\) for the candidate partition AB | C. A and B are together, so their contribution is \((1-0.600)^2=0.160\). A and C are separate, contributing \((0-0.200)^2=0.040\), and B and C are separate, contributing \((0-0.600)^2=0.360\). Therefore,
For A | BC, the contributions are \(0.600^2=0.360\) for separate A and B, \(0.200^2=0.040\) for separate A and C, and \((1-0.600)^2=0.160\) for together B and C. Its distance is also 0.560. For A | B | C, all pairs are separate, so the distance is \(0.600^2+0.200^2+0.600^2=0.760\). For ABC, all pairs are together, so the distance is \(0.400^2+0.800^2+0.400^2=0.960\). The two valid partitions AB | C and A | BC tie for the smallest distance among these five possible partitions. The summary is therefore not unique.
This calculation also distinguishes the least-squares criterion from a threshold rule. The least-squares result selects a coherent partition and can report a tie; it does not assert that every pair in the selected partition has probability above a chosen cutoff.
Alternatives, Diagnostics, and Limitations
Different summaries answer different questions. A pairwise threshold makes the rule easy to communicate but can violate transitivity. A least-squares summary uses all pairwise probabilities jointly and returns a valid partition, but its result depends on the chosen distance and may be non-unique. Another option is the maximum a posteriori partition: the partition with the greatest posterior probability. In practice, selecting the most frequent sampled partition estimates this mode among the sampled partitions. It can be difficult to estimate reliably when posterior mass is spread across many distinct partitions, and it need not best represent average pairwise co-clustering.
| Summary | What it emphasizes | Main caution |
|---|---|---|
| Posterior similarity matrix | Pair-specific evidence of shared membership | Does not itself specify one partition |
| Pairwise threshold | Simple decisions for each pair | Decisions can violate transitivity |
| Least-squares partition | Valid partition close to pairwise probabilities | Can have multiple minimizers and depends on its loss |
| Most probable partition | Highest posterior mass on one complete partition | May poorly represent diffuse posterior uncertainty |
Several checks help identify problems. Confirm that the estimated matrix is symmetric, has ones on the diagonal, and has entries between 0 and 1. Check transitivity-based bounds for triples; violations beyond rounding indicate an error in pair counting or data handling. Inspect whether pairwise estimates are stable across adequately explored posterior draws or chains. A long run of nearly identical indicators may reflect dependence or poor exploration rather than overwhelming posterior certainty. These checks diagnose the estimated summary, but they do not establish that the underlying clustering model is appropriate for the multi-omics data.
Co-clustering probabilities also have limits. They describe posterior beliefs conditional on the specified model, prior, and observed data; they do not demonstrate biological causation or establish that a cluster has a particular biological meaning. Pairwise summaries can conceal uncertainty about the number of clusters and about competing global arrangements. A representative partition should therefore be reported as a convenient summary alongside the pairwise probabilities or other relevant posterior information, not as though it were the sole plausible answer.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In 20 posterior draws, a pair of samples is together in 13 draws. What is the estimated co-clustering probability?
- Suppose \(p_{AB}=0.75\) and \(p_{BC}=0.60\). What lower bound must \(p_{AC}\) satisfy?
- Why is \(p_{AB}=0.60,\ p_{BC}=0.60,\ p_{AC}=0.20\) compatible with partitions, even though thresholding at 0.50 gives inconsistent pair decisions?
- For \(p_{AB}=0.70,\ p_{AC}=0.20,\ p_{BC}=0.40\), calculate \(D(c)\) for AB | C.
- Does a least-squares representative partition imply that every pair it joins has a co-clustering probability above 0.50? Explain.
Solutions. (1) \(\hat{p}=13/20=0.650\). (2) The transitivity bound gives \(p_{AC}\geq 0.75+0.60-1=0.350\). (3) The values satisfy the bound exactly, and they can arise from posterior mass 0.200 on ABC, 0.400 on AB | C, and 0.400 on A | BC. The threshold decisions nevertheless fail transitivity. (4) In AB | C, A and B are together and the other pairs are separate, so \(D=(1-0.70)^2+0.20^2+0.40^2=0.09+0.04+0.16=0.290\). (5) No. The criterion minimizes a joint distance over valid partitions; it does not impose a separate probability cutoff on each joined pair.