Why Quantify Assignment Uncertainty?
A cluster label is often reported as if it were certain: sample 12 belongs to cluster 2. In a Bayesian integrative clustering model, however, the observed omics data generally support several possible assignments. A sample may be assigned to cluster 2 in most posterior draws but to cluster 1 or 3 in others. Reporting only the most probable label conceals that uncertainty, which can matter when interpreting cluster profiles or deciding whether a sample has a stable classification.
This tutorial summarizes that uncertainty using posterior assignment probabilities and entropy. These are conditional summaries: they describe uncertainty in the latent assignment given the observed data and the specified model. They do not establish that the model is correctly specified, nor do they imply that cluster membership causes any clinical or molecular outcome.
Posterior Assignment Probabilities
The probabilities integrate uncertainty in the latent assignment and, in a Bayesian model, uncertainty in model parameters under the posterior. In practice, posterior draws often estimate them by counting assignments. If \(M\) posterior draws have comparable cluster labels, then
where \(I(\cdot)\) equals 1 when the statement is true and 0 otherwise. With equally weighted draws, this is the fraction of draws assigning sample \(i\) to cluster \(k\). If draws have unequal weights, use the corresponding normalized weighted fraction instead.
A necessary condition is that cluster \(k\) means the same thing across the draws being counted. Mixture-model labels can switch names without changing the represented partition. Thus, counting raw labels across posterior draws can produce meaningless probabilities if labels have not been aligned or otherwise given a consistent interpretation. An alignment procedure can match labels to a reference partition, but when the match is ambiguous, the resulting label-specific probabilities depend on that choice. Posterior co-clustering probabilities, which concern whether two samples share a cluster, avoid this label-naming problem; they answer a related but different question and do not by themselves provide probabilities for membership in named clusters.
The summaries below assume a specified set of \(K\) mutually exclusive and exhaustive cluster labels with comparable meaning across the posterior draws used. If the number of clusters varies, or if a cluster has no stable correspondence across draws, the analyst must define a meaningful reference or membership event before reporting label-specific probabilities. The formula for entropy does not solve that correspondence problem.
Worked Example: Calculating Entropy for One Sample
Suppose a hypothetical integrative clustering analysis has three consistently identified clusters. For one sample, its posterior assignment probabilities are \(q_{i1}=0.65\), \(q_{i2}=0.18\), and \(q_{i3}=0.17\). They are nonnegative and sum to \(0.65+0.18+0.17=1.00\), as required.
The sample's maximum-probability assignment is cluster 1, with probability 0.65. To summarize uncertainty across all three possibilities, calculate Shannon entropy using natural logarithms. Entropy is reported in nats.
Substituting the probabilities gives
The three positive contributions are \(-0.65\log(0.65)\approx0.2800\), \(-0.18\log(0.18)\approx0.3087\), and \(-0.17\log(0.17)\approx0.3012\) nats. Therefore \(H_i\approx0.2800+0.3087+0.3012=0.8899\) nats. Since the maximum entropy for three possible clusters is \(\log(3)\approx1.0986\), the normalized entropy is \(0.8899/1.0986\approx0.8100\). The sample has cluster 1 as its most probable assignment, but substantial uncertainty remains across the three possibilities.
What Entropy Measures
Entropy is low when most posterior probability is concentrated on one cluster and high when probability is spread over several clusters. Its minimum, 0 nats, occurs when one cluster has probability 1 and all others have probability 0. Its maximum, \(\log(K)\) nats, occurs when all \(K\) clusters have equal probability \(1/K\). Normalization expresses entropy relative to this maximum for the chosen number of clusters; it does not make different models or different cluster definitions automatically comparable.
A useful justification follows by comparing the assignment distribution \(q_i=(q_{i1},\ldots,q_{iK})\) with the uniform distribution \(u_k=1/K\). The Kullback-Leibler divergence from \(q_i\) to the uniform distribution is
Because \(D_{\mathrm{KL}}(q_i\|u)\geq0\), it follows that \(H_i\leq\log(K)\). Also, each term \(-q_{ik}\log(q_{ik})\) is nonnegative for \(0\leq q_{ik}\leq1\), so \(H_i\geq0\). Equality at the upper bound requires \(q_i\) to be uniform; equality at zero requires a probability of 1 on a single cluster.
The quantity \(\exp(H_i)\) can also be reported as the effective number of clusters for that sample. It is the number of equally probable clusters that would have the same entropy. It is a convenient transformation, not a literal count of clusters to which the sample belongs.
Worked Example: Estimating Probabilities From Posterior Draws
For a hypothetical sample, suppose 1,000 equally weighted posterior draws have already been aligned to three comparable cluster labels. The assignment counts are 760, 160, and 80. The estimated probabilities are \(760/1000=0.76\), \(160/1000=0.16\), and \(80/1000=0.08\). These are nonnegative and sum to 1.
The maximum-probability assignment is cluster 1, with estimated probability 0.76. The entropy estimate is
The contributions are approximately \(0.2086\), \(0.2932\), and \(0.2021\) nats, giving \(\widehat{H}_i\approx0.7038\) nats. Dividing by \(\log(3)\approx1.0986\) gives normalized entropy \(\widehat{H}_i^{*}\approx0.6407\). The effective number of clusters is \(\exp(0.7038)\approx2.022\). Thus, although cluster 1 is clearly the most probable assignment, the estimated uncertainty is equivalent in entropy to a distribution spread evenly across about two clusters.
These values are estimates from finite posterior draws, not exact posterior quantities. If draws are autocorrelated, the 1,000 saved draws do not contain the same information as 1,000 independent draws. Monte Carlo error in estimating \(q_{ik}\) is distinct from posterior uncertainty in \(z_i\); the frequency and entropy calculations do not remove either source of uncertainty.
Entropy Alongside Other Assignment Summaries
Entropy is complementary to, rather than a replacement for, the maximum posterior probability. The maximum reports the probability of the chosen label; entropy uses the entire assignment distribution. A simple margin, defined as the largest probability minus the second largest, provides another summary of how separated the leading assignment is from its closest competitor. No single number fully describes the posterior distribution.
Worked Example: Same Leading Probability, Different Uncertainty
Consider two hypothetical samples, each with three possible clusters and the same maximum assignment probability of 0.70. Sample A has probabilities \((0.70,0.20,0.10)\), while sample B has probabilities \((0.70,0.15,0.15)\). Both have maximum-probability assignment to cluster 1.
For sample A,
For sample B,
Sample B has slightly higher entropy because the probability outside its leading cluster is divided equally between two alternatives, rather than concentrated more heavily on one. Both normalized entropies are obtained by dividing by \(\log(3)\): they are approximately 0.7298 and 0.7453, respectively. The difference is modest, but the example shows why a maximum probability alone cannot describe how the remaining probability is distributed.
| Summary | What it describes | Important qualification |
|---|---|---|
| Maximum assignment probability | Posterior probability of the most probable cluster | Does not show how probability is divided among alternatives |
| Assignment entropy | Overall spread of the sample's posterior assignment distribution | Depends on the cluster set and is not a measure of model adequacy |
| Posterior co-clustering probability | Posterior probability that two samples share a cluster | Invariant to label switching, but is not a probability over named clusters for one sample |
Diagnostics, Interpretation, and Limitations
Before interpreting assignment uncertainty, check that each probability vector is valid: all entries must be between 0 and 1, and their sum should be 1 up to numerical rounding. Check how labels were made comparable across draws, especially when a model allows empty components or a varying number of clusters. If a component is absent in a draw, its assignment probability for that draw is zero only when that component has a defined, comparable identity in the chosen representation. An arbitrary label match should not be treated as a substantive result.
Entropy describes uncertainty in the modeled latent assignment conditional on the data and model. It does not measure whether the data fit the model, whether cluster labels are biologically meaningful, or whether a sample truly has a “mixed” biological identity. A high entropy may reflect genuinely overlapping evidence, weak information for that sample, an overly flexible cluster representation, or difficulties in the model or its label alignment. These possibilities require substantive and model-based investigation; entropy alone cannot distinguish them.
- Do not call a sample certain from its MAP label alone. Report the leading probability or the full probability vector when the uncertainty matters.
- Do not compare raw entropy values across different \(K\) without context. The maximum possible entropy changes with \(K\); normalized entropy helps describe the fraction of that maximum but does not eliminate differences in model definitions.
- Do not confuse posterior uncertainty with Monte Carlo error. More posterior draws can reduce simulation error in estimated probabilities, but they do not necessarily make the underlying posterior assignment more concentrated.
- Do not ignore label switching. Frequencies of arbitrary component numbers are not valid assignment probabilities unless the labels have a coherent correspondence across draws.
In practice, a useful report gives the maximum-probability cluster, its posterior probability, and either the full assignment vector or an entropy summary. When comparing samples, state the number of clusters and whether entropy is raw or normalized. For decisions that depend on a threshold, specify the threshold and its purpose rather than treating one probability cutoff as universal.
Specify the cluster set and ensure that cluster labels have comparable meaning across the posterior draws.
For equally weighted draws, compute the fraction assigning the sample to each cluster, then verify that the probabilities sum to one.
Report the leading assignment and probability, calculate entropy if useful, and state its units and normalization.
Consider whether the summary reflects posterior spread, finite-draw Monte Carlo error, or label correspondence problems; these are different issues.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A sample has assignment probabilities \((0.50,0.30,0.20)\). What is its maximum-probability assignment and its maximum assignment probability?
- Why can raw component-label frequencies across mixture-model draws be misleading?
- For \(K=3\), what is the maximum possible entropy, and which assignment distribution attains it?
- Explain why two samples with the same maximum assignment probability can have different entropies.
- What does a normalized entropy of 1 mean when \(K>1\), and what does it not establish?
Solutions. (1) The maximum-probability assignment is cluster 1, with probability 0.50. (2) Component numbers can switch labels across draws without changing the represented partition, so a raw count may combine different cluster identities; labels must be made comparable or a label-invariant summary used. (3) The maximum is \(\log(3)\approx1.0986\) nats, attained by \((1/3,1/3,1/3)\). (4) Entropy depends on every probability, not only the largest; different distributions of the remaining probability produce different sums of \(-q\log(q)\). (5) It means the assignment distribution is uniform across the specified \(K\) clusters, so entropy reaches \(\log(K)\). It does not establish that the model fits well, that the clusters are meaningful, or that the sample has a literal biological mixture of identities.