Choosing a Cluster Count Is a Diagnostic Decision
A clustering algorithm can often produce a partition for several candidate values of \(K\), the number of clusters. The question is not simply which value gives the largest score. A useful choice should be interpretable in the chosen distance representation, should not depend excessively on a few fragile assignments, and should not conceal important limitations such as tiny groups. These considerations can point in different directions.
This tutorial combines three diagnostics: silhouette widths, cluster sizes, and agreement across resampled runs. Each asks a different question. Silhouettes assess how well cells fit their assigned cluster relative to alternatives; cluster sizes reveal the scale of the groups being formed; resampling agreement assesses whether assignments are reproducible under a specified perturbation. None, alone or together, proves that the groups are distinct biological populations.
Silhouette Widths and Their Conditions
A silhouette near 1 means the cell is, on average, closer to its own cluster than to its nearest alternative cluster. A value near 0 indicates little separation by this distance measure; a negative value means the cell’s average dissimilarity to another cluster is smaller than its average dissimilarity to its assigned cluster. These are geometric descriptions, not biological interpretations by themselves.
For nonnegative, finite dissimilarities and a defined positive denominator, \(s(i)\) lies between \(-1\) and \(1\). If \(b(i)\ge a(i)\), then \(0\le b(i)-a(i)\le b(i)=\max\{a(i),b(i)\}\), so \(0\le s(i)\le1\). If \(a(i)>b(i)\), then \(-a(i)\le b(i)-a(i)<0\) and the denominator is \(a(i)\), giving \(-1\le s(i)<0\). If both means are zero, the displayed ratio is undefined; that case must be handled explicitly rather than silently reported as an ordinary value.
The mean silhouette for a candidate partition is the mean of its cell-level widths, using the stated singleton convention if applicable. It is a compact summary, but can hide a weak or tiny cluster: a large group may dominate the overall mean. Cluster-specific means and the distribution of widths therefore matter alongside the overall mean.
Worked Example: Calculating a Cell’s Silhouette
Suppose a hypothetical cell has mean dissimilarity \(a(i)=2.4\) to the other cells in its assigned cluster. Its mean dissimilarities to two alternative clusters are 5.0 and 3.0, so the nearer alternative gives \(b(i)=3.0\). The cell is not a singleton, and the denominator is positive.
Substitution gives $$ s(i)=\frac{3.0-2.4}{\max\{2.4,3.0\}} =\frac{0.6}{3.0}=0.20. $$
The positive value indicates that, under this dissimilarity, the cell is somewhat closer on average to its assigned cluster than to its nearest alternative. It does not establish that the cell belongs to a distinct cell type; that conclusion requires evidence beyond this geometric summary.
Cluster Sizes and Resampling Agreement
Cluster sizes are basic but essential context. For each candidate \(K\), report the number or proportion of cells assigned to every cluster, not just the smallest size. A small cluster may represent a meaningful rare population, a technical artifact, or a subdivision of a continuum. Size alone cannot distinguish these explanations. It does show when a high overall silhouette is being achieved alongside a very small group that deserves focused scrutiny.
Resampling agreement asks whether assignments persist when the data or analysis is perturbed in a defined way. For example, one can compare the reference partition with partitions from cell subsamples, restricting both to cells present in each resampled run. Cluster labels are arbitrary, so agreement should compare co-membership—whether two cells are placed together—not whether their cluster labels have the same names.
This raw agreement is easy to interpret, but it can be high when most pairs are apart in both partitions, especially with many small clusters. It should therefore be read with cluster-wise diagnostics and with the partition sizes in view, not as a self-sufficient measure. Matching clusters across runs can help describe which groups recur, while pairwise comparisons avoid dependence on the arbitrary numeric labels.
The resampling design also determines what “stable” means. Cell subsampling probes sensitivity to which cells were included; feature perturbation probes sensitivity to the selected features; changing preprocessing probes a different source of variation. A stability value is meaningful only when the perturbation, clustering procedure, cell matching, and comparison rule are stated. When runs have different cell sets, comparisons use only the common cells, so very small overlaps provide weak evidence and should be flagged.
Worked Example: Computing Pairwise Agreement
Consider four hypothetical cells, 1 through 4. In the reference partition, cells 1 and 2 form one cluster and cells 3 and 4 form another. In a resampled partition, cells 1, 2, and 3 form one cluster, while cell 4 forms the other. All four cells occur in both runs, so \(m=4\) and there are \(\binom{4}{2}=6\) comparable pairs.
The pairs \((1,2)\) and \((1,4)\), \((2,4)\) have the same status in both partitions: the first pair is together in both, and the latter two are apart in both. The other three pairs, \((1,3)\), \((2,3)\), and \((3,4)\), change together-or-apart status. Thus, $$ \text{agreement}=\frac{3}{6}=0.50. $$
Only half the pairs retain their status in this run. This is evidence of assignment sensitivity for this comparison, not a probability that either partition is correct. If only one cell had been comparable, there would be no cell pairs and this fraction would be undefined.
A Defensible Comparison Across Candidate Counts
Before comparing values, hold the analysis choices that define them as consistent as possible: use the same cell representation and distance for silhouettes, apply the same clustering procedure and resampling scheme, and specify in advance how singleton silhouettes and incomplete cell overlap are handled. If the representation or distance changes across \(K\), a score difference can reflect that change rather than the cluster count. The candidate partitions should also be nonempty, and silhouette calculations require \(K\ge2\).
The following hypothetical summaries illustrate a practical comparison. The silhouette values are overall means; cluster-specific summaries would still be inspected. The agreement entries are mean pairwise co-membership agreement across resampled runs, computed on each run’s common cells. Minimum size is the smallest number of cells in any cluster in the reference partition.
| Candidate \(K\) | Mean silhouette | Minimum cluster size | Mean resampling agreement |
|---|---|---|---|
| 2 | 0.41 | 96 | 0.91 |
| 3 | 0.47 | 8 | 0.78 |
| 4 | 0.44 | 7 | 0.83 |
The \(K=3\) partition has the highest mean silhouette, but its smallest cluster has only 8 cells and its resampling agreement is the lowest of the three. The \(K=4\) partition does not improve on \(K=3\) in silhouette, still has a small minimum cluster, and has only modestly higher agreement. The \(K=2\) partition has a lower mean silhouette but substantially higher agreement and no very small group in this summary.
If the analysis objective is a robust, coarse partition, these diagnostics support choosing \(K=2\) as the more defensible working choice. This is not a universal rule that the largest cluster sizes or stability score should win. If a rare population is a primary target, the 8-cell group at \(K=3\) may merit investigation, but these summaries alone do not validate it; its assignments and the consequences of the resampling design require scrutiny. A defensible report explains the objective and trade-off rather than claiming that one statistic has discovered the uniquely correct number.
Worked Example: Making the Trade-Off Explicit
Suppose the goal is to obtain groups for a downstream analysis that needs assignments reproducible under cell subsampling. Using the table above, compare \(K=3\) with \(K=2\). The silhouette gain is \(0.47-0.41=0.06\), while mean agreement falls by \(0.91-0.78=0.13\), and the minimum cluster size falls from 96 to 8 cells.
Those arithmetic differences do not define a universal penalty or decision threshold. They make the trade-off explicit: \(K=3\) separates cells more strongly on average by the chosen distance, but produces a small cluster and less reproducible pair assignments under the stated resampling scheme. Given the stated objective, choosing \(K=2\) is defensible. If the small group is scientifically important, it is reasonable to retain \(K=3\) as a candidate for additional validation rather than dismissing it solely because of its size.
Diagnostics, Alternatives, and Limitations
Several checks help reveal when a summary is misleading. Inspect the full silhouette distribution and cluster-specific means; a favorable overall mean can coexist with many negative widths in one group. Check cluster sizes and whether small groups persist across runs. Examine the number of common cells in each resampling comparison, since agreement from a narrow overlap may not represent the full data. Also verify that conclusions are not merely consequences of the chosen distance or representation. Earlier material on distance geometry and preprocessing sensitivity is relevant because these choices can change the apparent separation.
The diagnostics answer different questions, so agreement among them is informative but not conclusive. A partition can be reproducible because the algorithm repeatedly finds the same structure in the observed representation; that does not establish that the structure corresponds to distinct biological populations. Conversely, a real but rare group can be difficult to recover consistently when few cells represent it. As emphasized in the earlier material on stable clusters that are not necessarily true clusters, stability is evidence about reproducibility under a perturbation, not a test of biological truth.
Alternatives or supplements include cluster matching and cluster-wise stability summaries, which reveal whether particular groups recur; co-association summaries, which describe how often pairs are grouped together across runs; and variation of information, which compares whole partitions through their differences in information content. These alternatives have different scales and sensitivities, and none removes the need to define the perturbation and interpret the result in context. A raw pairwise agreement score is particularly simple, but its tendency to count many jointly separated pairs can make it appear reassuring when group structure is imbalanced.
A common mistake is to select the \(K\) with the largest mean silhouette and call it the true number of cell populations. The reasoning fails because the silhouette is conditional on the chosen distance and representation, averages can obscure small or poorly fitting groups, and the largest value among candidates is not a biological validation procedure. The correction is to compare the candidate partitions using all three diagnostics, inspect cluster-level details, state the analysis objective, and describe the remaining uncertainty.
Specify the representation, dissimilarity, candidate values of \(K\), resampling design, and rules for singleton and incomplete-overlap cases.
Compare overall and cluster-specific silhouette widths alongside every cluster’s size; investigate negative widths and very small groups.
Compare co-membership on common cells across runs, report the amount of overlap, and consider whether raw agreement could be inflated by many apart pairs.
Explain which trade-offs matter for the intended analysis and state that the selected partition is a supported working choice, not proof of a true biological taxonomy.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- A cell has \(a(i)=4\) and \(b(i)=3\). Calculate its silhouette and interpret the sign.
- Why is a silhouette width not defined by the stated formula for a one-cluster partition?
- Two partitions are compared on \(m=1\) common cell. Can pairwise co-membership agreement be calculated? Explain.
- A candidate count has the highest mean silhouette but a very small cluster and lower resampling agreement. What should be examined before selecting it?
- In one sentence, distinguish what resampling agreement supports from what it does not establish.
Solutions. (1) \(s(i)=(3-4)/\max\{4,3\}=-1/4=-0.25\). The negative value means the cell is, on average, closer to another cluster under this dissimilarity than to its assigned cluster. (2) There is no alternative cluster, so \(b(i)\), the minimum mean dissimilarity to another cluster, cannot be calculated. (3) No. There are \(\binom{1}{2}=0\) pairs, so the fraction has a zero denominator and is undefined. (4) Inspect cluster-specific silhouette distributions, the small cluster’s assignments and persistence across runs, the number of common cells, and whether the resampling and distance choices suit the objective. The score alone does not settle the choice. (5) Resampling agreement supports reproducibility under the specified perturbation, but does not establish that the clusters are biologically true populations.