From a Stability Question to a Resampling Analysis
A subgroup solution is a product of choices: which subjects are included, how each omics block is processed and combined, and how the clustering algorithm is run. A stability analysis asks a specific question: under a defined perturbation of the data, how much does the specified analysis pipeline change its subgroup assignments? The answer concerns robustness to that perturbation; it does not by itself establish that the subgroups are biologically meaningful or will reproduce in an independent cohort.
The earlier material on end-to-end stability established why the full analysis pipeline, rather than only the final clustering step, is the relevant object to perturb. Here we carry that idea through from a written protocol to subgroup-level summaries. The example uses hypothetical matched subjects, each with measurements from two omics blocks. A subject is the resampling unit: both of that subject’s omics profiles must be included or omitted together.
Before calculating any summary, specify what is held fixed and what is allowed to vary. A useful protocol states the target subjects, the resampling unit and scheme, the number of clusters, preprocessing and integration steps, clustering settings, the label-alignment rule, and the summaries to report. Resampling the two omics blocks independently would break the matched-subject structure and could create combinations of measurements that were never observed together.
Worked Example: Specifying the Resampling Protocol
Worked Example: Specifying the Resampling Protocol
Suppose a hypothetical data set contains 120 subjects, 60 from each of two cohorts. Every subject has both a transcriptomic and a proteomic profile. The analysis team wants to assess whether its three-cluster solution is sensitive to sampling variability while keeping the cohort composition represented in each resample.
Reference solution. Apply the stated pipeline to all 120 matched subjects and record the resulting reference labels, called A, B, and C. The reference is a comparison point, not a known truth.
Resampling scheme. Draw 100 subsamples without replacement. Each subsample contains 48 subjects from each cohort, for \(n=96\) subjects total. Each selected subject contributes both omics profiles. This preserves the matched design and fixes the cohort allocation across repetitions.
Pipeline. In each subsample, refit all data-dependent preprocessing and integration steps using only that subsample, then apply the same clustering method with \(K=3\) and the same stated initialization protocol. If feature selection, scaling, or dimension reduction is part of the intended analysis, it must be repeated within each subsample rather than learned once from all 120 subjects and carried into every fit. Otherwise information from omitted subjects would leak into the resampled pipeline.
Comparison. For each repetition, compare its labels with the reference labels only for subjects present in that subsample. Align the arbitrary cluster names before calculating label-based summaries. Record subgroup-level and subject-level results across all 100 repetitions.
This design targets sensitivity to 80% cohort-stratified subsampling under the specified pipeline. It does not measure sensitivity to a different preprocessing method, a different cluster count, or a new cohort unless those are separately examined.
Aligning Labels Before Comparing Partitions
Cluster names have no intrinsic meaning. A resampled cluster called X may contain the subjects assigned to reference cluster A, while resampled label Y corresponds to reference cluster C. Comparing the printed labels directly would count such a match as disagreement. When both solutions have the same fixed number \(K\) of clusters, align them by finding the one-to-one assignment that maximizes overlap among common subjects.
The justification is direct. Every common subject contributes one count to exactly one cell of the overlap table. Under an alignment \(\pi\), the number of agreements is \(\sum_a M_{a,\pi(a)}\); therefore, the number of disagreements is \(n_{\mathrm{common}}-\sum_a M_{a,\pi(a)}\), where \(n_{\mathrm{common}}\) is the number of common subjects. Maximizing overlap is thus equivalent to minimizing label disagreements among those subjects.
Worked Example: Finding the Maximum-Overlap Alignment
Worked Example: Finding the Maximum-Overlap Alignment
In a hypothetical resample, 12 subjects appear in both the reference and resampled solutions. The overlap counts are:
| Reference label | Resampled X | Resampled Y | Resampled Z |
|---|---|---|---|
| A | 1 | 3 | 0 |
| B | 0 | 1 | 3 |
| C | 3 | 0 | 1 |
Consider the assignment A–Y, B–Z, C–X. Its total overlap is \(3+3+3=9\). The other possible one-to-one assignments have totals 3, 4, 4, 0, and 4, so this is the maximum-overlap alignment. Thus, resampled Y is aligned to A, Z to B, and X to C.
The alignment yields 9 agreements among 12 common subjects, or \(9/12=0.750\); the remaining \(12-9=3\) subjects disagree with their reference labels. These figures describe this one resample only. Stability conclusions require summarizing results across the planned repetitions.
This calculation assumes both partitions use the same fixed \(K\) and that a one-to-one correspondence is meaningful for the comparison. If the number of clusters differs, forcing a one-to-one alignment can hide splits or merges. In that setting, use summaries designed for partitions with differing cluster counts, such as variation of information, or report the split-and-merge structure directly.
Summarizing Stability at the Subgroup and Subject Levels
Alignment makes label-based summaries interpretable, but no single number describes every aspect of stability. Two useful summaries answer different questions. For a reference subgroup \(G_a\), compare it within a resample to its aligned cluster \(H_{\pi(a)}\), restricting \(G_a\) to subjects actually sampled. Their Jaccard similarity is the size of their intersection divided by the size of their union. A value of 1 means exact agreement among the sampled subjects; lower values indicate more membership differences.
Here \(S_r\) is the set of subjects in resample \(r\), and \(\pi_r\) is its label alignment. The denominator includes sampled reference members and sampled members assigned to the aligned cluster, so both omissions from the reference subgroup and additions to it reduce the Jaccard value. Report the distribution across resamples, not just its mean: a mean can conceal a subgroup that is usually stable but occasionally changes sharply.
A subject-level retention rate gives another view. For reference subject \(i\) in cluster \(a\), count the repetitions in which \(i\) was included and assigned, after alignment, to \(a\). Divide by the number of repetitions in which \(i\) was included. This denominator matters: an omitted subject supplies no evidence about its resampled membership. Pairwise co-clustering is also useful: for a pair, divide the number of repetitions in which both subjects were included and assigned to the same cluster by the number of repetitions in which both were included. It describes reproducibility of that pair’s joint assignment under the resampling scheme.
Worked Example: Interpreting Subgroup and Subject Summaries
Worked Example: Interpreting Subgroup and Subject Summaries
Consider four hypothetical resamples and reference subgroup A, whose subjects are 1, 2, 3, and 4. After label alignment, the sampled reference members and corresponding resampled cluster are as follows:
- Resample 1: sampled reference members \(\{1,2,3\}\); aligned cluster \(\{1,2,3,5\}\).
- Resample 2: sampled reference members \(\{1,2,4\}\); aligned cluster \(\{1,2,4\}\).
- Resample 3: sampled reference members \(\{1,3,4\}\); aligned cluster \(\{1,3,5\}\).
- Resample 4: sampled reference members \(\{2,3,4\}\); aligned cluster \(\{2,3,4,6\}\).
The Jaccard values are \(3/4=0.750\), \(3/3=1.000\), \(2/4=0.500\), and \(3/4=0.750\), respectively. For example, in resample 3 the intersection is \(\{1,3\}\), of size 2, and the union is \(\{1,3,4,5\}\), of size 4. The mean across these four resamples is \((0.750+1.000+0.500+0.750)/4=0.750\). The values also show that the mean does not tell the whole story: resample 3 has substantially lower agreement than the other three.
Subject 4 appears in resamples 2, 3, and 4. It is in the aligned A cluster in resamples 2 and 4, so its retention rate is \(2/3=0.667\). Subjects 1 and 4 are jointly included in resamples 2 and 3; they are together in resample 2 but not resample 3. Their pairwise co-clustering proportion is therefore \(1/2=0.500\). The small number of repetitions here is only for illustration, not a basis for a reliable stability estimate.
Diagnostics, Alternatives, and Limitations
A stability summary is most useful when checked against the design and the underlying resampled partitions. Inspect subgroup sizes and overlap tables, the distribution of Jaccard values, and the inclusion denominators for subject-level rates. A very high overall agreement can be driven by a large subgroup while a smaller subgroup changes substantially. Conversely, a low score for a rare subgroup may reflect limited information about that subgroup; it should not be hidden by an overall average. Review unusually low-overlap repetitions for changes in preprocessing, convergence, or cluster sizes, and check whether the label assignment has near-tied alternatives.
The resampling scheme determines what perturbation the results address. Subsampling without replacement, as in the example, avoids duplicate subjects within a fit and directly evaluates reduced sample size. A bootstrap samples with replacement and can represent sampling variation differently, but duplicated subjects affect the fitting procedure and need deliberate handling when comparing memberships. Neither scheme is universally best; the choice should match the stability question and be stated explicitly.
Consensus co-clustering offers a complementary summary: for each pair, it estimates how often the pair is assigned together among repetitions in which both are observed. It avoids arbitrary cluster names and can reveal stable local relationships, but does not by itself provide a single aligned subgroup correspondence. Label-aligned Jaccard scores are easier to interpret for fixed-\(K\) subgroup retention, while partition-wide measures such as variation of information summarize differences between whole partitions. These summaries answer related, not interchangeable, questions.
Stability is conditional on the chosen subjects, pipeline, resampling scheme, and analysis settings. Stable clustering can still reflect batch structure or other non-biological variation, and a resampled reference comparison is not independent validation. A small number of repetitions gives a noisy summary; subgroup sizes, the distribution of scores, and uncertainty in the estimated summaries all matter. There is no universal Jaccard threshold that establishes a valid subtype.
- Mistake: “The resampled cluster is called B, so it matches reference cluster B.” Cluster names are arbitrary. Correction: align labels from overlap before using them in subgroup-specific summaries.
- Mistake: “A subject omitted from a resample counts as having lost its subgroup.” Omission is not a changed assignment. Correction: use only repetitions in which the subject was included as the denominator for its retention rate.
- Mistake: “High stability proves biological validity.” The repetitions test sensitivity to a chosen perturbation, not whether a subgroup is biologically meaningful. Correction: interpret stability alongside substantive evidence and independent evaluation.
Check Your Understanding
Try each question, then compare your reasoning with the solutions below.
- A subgroup has 6 sampled reference members; the aligned resampled cluster shares 4 of them and contains 10 subjects in total. What is its Jaccard similarity?
- A subject is included in 12 repetitions and retains its aligned reference label in 9. What is its retention rate, and what does it describe?
- Two subjects are jointly included in 9 repetitions and are assigned together in 7. Calculate their pairwise co-clustering proportion.
- Why must both omics profiles from a matched subject be resampled together?
Solutions. (1) The intersection has size 4. The union has size \(6+10-4=12\), so the Jaccard similarity is \(4/12=0.333\). (2) The retention rate is \(9/12=0.750\); it is the proportion of included repetitions in which the subject returns to its aligned reference subgroup, not the probability that the subgroup is true. (3) The proportion is \(7/9=0.778\), conditional on both subjects being present. (4) The omics measurements belong to the same subject. Resampling them independently would break their matching and assess an artificial data structure rather than perturbations of the observed subjects.