Tutorials › Multi-Omics Data Integration › Bootstrap Assessment Of Subgroup Stability

Stability of Discovered Subgroups · Tutorial 479 of 597

Bootstrap Assessment Of Subgroup Stability

Use subject-level bootstrap replicates to assess how consistently discovered subgroups recur, while tracking duplicate draws, omitted subjects, and the limits of the resulting stability summaries.

Advanced 11 min read

What You'll Learn

  • Draw bootstrap samples at the subject level and represent repeated draws with multiplicities.
  • Calculate how often subjects are omitted and how many distinct subjects appear in each replicate.
  • Summarize subgroup recurrence while accounting for duplicate copies and omitted members.
  • Separate sampling instability from variation caused by the clustering algorithm.
  • Choose and interpret a recurrence rule without treating it as a universal standard.
  • Diagnose when bootstrap stability summaries are unreliable or misleading.

Why Bootstrap Subgroup Stability Needs Care

A cluster solution can look clear in the observed data and still depend strongly on which subjects happened to be measured. A subject-level bootstrap assesses this dependence by repeatedly drawing subjects with replacement, reclustering each resampled data set, and recording what happens to the discovered groups. The central bookkeeping issue is that a bootstrap replicate contains repeated copies of some subjects and omits others. Copies are not new independent people, and an omitted subject cannot be treated as if its subgroup membership had been observed in that replicate.

The earlier material on choosing a resampling unit establishes why resampling must follow the independent observational unit. Here, assume that the \(n\) subjects are the appropriate units. Each subject has one row of integrated omics features for the clustering analysis. The aim is to assess stability to subject sampling, not to compare different numbers of clusters or feature sets.

Definition: In a subject-level bootstrap replicate \(b\), draw \(n\) subjects independently with replacement from the \(n\) observed subjects. Let \(W_{ib}\) be the number of times subject \(i\) is drawn. The replicate contains \(n\) rows counting copies, but only \(U_b=\sum_{i=1}^{n} I(W_{ib}>0)\) distinct subjects. Reclustering means fitting the same specified clustering procedure to the replicate’s rows and recording its group assignments.

What the Bootstrap Resamples

The standard subject bootstrap assumes that subjects are independent draws from a population of interest and that the observed subjects are representative enough for resampling to approximate sampling variation. Subjects should be exchangeable for this purpose: no subject should have a different resampling probability unless the design explicitly calls for one. If several omics records belong to the same person, resample the person as a unit and keep that person’s records together.

To isolate subject-sampling variability, keep the clustering specification fixed across replicates: for example, the chosen number of clusters, distance, and feature set. Random initialization is a separate source of variation. Use a controlled initialization strategy, such as a fixed seed or multiple starts with a consistent selection rule, and report that choice. Otherwise, a change in assignments can reflect either a changed sample or a changed algorithmic start.

The bootstrap draws \(n\) times, but generally does not include \(n\) distinct subjects. For a particular subject, the probability of being omitted is the probability that none of the \(n\) draws selects that subject.

$$ P(W_{ib}=0)=\left(1-\frac{1}{n}\right)^n $$

As a result, a typical replicate has about \(1-(1-1/n)^n\) of the original subjects represented. This is not a defect in the procedure; it is part of what the bootstrap resampling scheme produces. It does mean that group recurrence should report how much of the original group was available to be assessed.

Worked Example: Counting Duplicates and Omissions

Suppose a hypothetical data set has \(n=6\) subjects, A through F. One bootstrap draw of six rows is A, A, B, D, E, E. The multiplicities are \(W_A=2\), \(W_B=1\), \(W_C=0\), \(W_D=1\), \(W_E=2\), and \(W_F=0\).

There are six rows in the replicate, but only four distinct subjects: A, B, D, and E. Subjects C and F are omitted. Subject A’s two rows and subject E’s two rows are duplicates of the same people, not four additional independent observations.

For any one subject, the probability of omission in this example is \((5/6)^6=0.3349\), so the probability of inclusion is \(1-0.3349=0.6651\). The expected number of distinct subjects is therefore \(6(0.6651)=3.991\). This expectation is across repeated bootstrap draws; it need not equal the four distinct subjects in this particular draw.

Representing Membership Without Double-Counting Copies

Let the reference clustering on the original data define a subgroup \(G\), containing \(|G|\) distinct subjects. In bootstrap replicate \(b\), let \(m_{ibk}\) be the number of copies of subject \(i\) assigned to replicate cluster \(k\). For an included subject, the fraction of its copies assigned to that cluster is \(q_{ibk}=m_{ibk}/W_{ib}\). If \(W_{ib}=0\), set \(q_{ibk}=0\) for every \(k\). Thus, for an included subject, its \(q\) values across replicate clusters sum to one. This rule ensures that a subject drawn four times does not contribute four times as much to a membership summary as a subject drawn once. If duplicate copies are split across clusters, the subject’s contribution is divided across those clusters rather than assigned arbitrarily to just one.

For each reference subgroup and replicate cluster, define a reference-normalized recurrence score. It measures how much of the original subgroup is represented in that replicate cluster, counting omitted members as not represented.

$$ S_{gbk}=\frac{1}{|G|}\sum_{i\in G}q_{ibk} $$

For a summary of the best-matching replicate cluster, use \(S_{gb}=\max_k S_{gbk}\). This is a descriptive score, not a universal stability measure. Report it alongside coverage, the fraction of reference-group subjects that appeared at least once: \(\sum_{i\in G}I(W_{ib}>0)/|G|\). Coverage separates a weak match caused by many omitted subjects from a weak match among subjects that were actually sampled.

A complementary purity calculation asks what fraction of a candidate replicate cluster’s membership contribution came from the reference subgroup. For cluster \(k\), this is \(\sum_{i\in G}q_{ibk}/\sum_{i=1}^{n}q_{ibk}\), when the denominator is positive. A high recurrence score alone can occur when a replicate cluster includes many subjects outside \(G\); purity helps reveal that. These summaries require matching a reference group to a replicate cluster. For this tutorial, the match is the cluster with the largest recurrence score for that reference group. If there is a tie, report the tie or apply a prespecified tie rule.

Worked Example: Scoring a Replicate Subgroup

In a hypothetical original analysis, the reference subgroup is \(G=\{A,B,C,D\}\). In the bootstrap draw A, A, B, D, E, E, suppose the reclustering assigns both copies of A and the copy of B to cluster X, and D and both copies of E to cluster Y. C is omitted.

For cluster X, \(q_{A,X}=2/2=1\) and \(q_{B,X}=1/1=1\); D and C contribute zero. Therefore, \(S_{G,b,X}=(1+1+0+0)/4=0.500\). For cluster Y, only D among the reference members contributes, so \(S_{G,b,Y}=1/4=0.250\). The best-matching cluster is X, with score \(S_{G,b}=0.500\).

Three of the four reference members were sampled, so coverage is \(3/4=0.750\). Cluster X has two total membership contributions, both from \(G\), giving purity \((1+1)/2=1.000\). Thus, X is compositionally pure in this replicate but represents only half of the original subgroup. Reporting the score, coverage, and purity together avoids mistaking purity for complete recurrence.

Summarizing Recurrence Across Replicates

Repeat the draw-and-recluster process for \(B\) replicates. For each reference subgroup, retain the replicate-level score, coverage, and purity rather than keeping only a single average. A mean score describes typical recurrence, while a median and a distribution or range can show whether that mean hides a mixture of good and poor matches.

A recurrence frequency can also be reported if a decision rule is useful. Before examining results, specify minimum acceptable values for the recurrence score, coverage, and, if relevant, purity. In replicate \(b\), define an indicator \(I_b\) equal to one when all prespecified criteria are met and zero otherwise. The estimated recurrence frequency is the proportion of replicates meeting the rule.

$$ \widehat{r}=\frac{1}{B}\sum_{b=1}^{B} I_b $$

This frequency is conditional on the chosen clustering specification, reference groups, matching rule, and thresholds. A threshold is a practical convention, not a natural boundary between “stable” and “unstable.” It is good practice to show the underlying score distribution as well as any threshold-based summary.

Worked Example: Interpreting a Recurrence Frequency

Suppose a hypothetical analysis uses \(B=100\) subject-bootstrap replicates. Before fitting them, the analyst defines a recurring match as a reference-normalized score of at least 0.60, purity of at least 0.75, and coverage of at least 0.60. The matched reference subgroup meets all three conditions in 63 replicates.

The estimated recurrence frequency is \(\widehat{r}=63/100=0.630\), or 63.0%. In this analysis, the matched subgroup met the prespecified rule in 63 of the 100 bootstrap replicates. This does not mean there is a 63% probability that the subgroup is biologically real; it describes the replicate outcomes under this resampling and decision procedure.

The Monte Carlo standard error due to using a finite number of replicates is approximately \(\sqrt{\widehat{r}(1-\widehat{r})/B} =\sqrt{0.630(0.370)/100}=0.0483\). This quantifies simulation variability in estimating the recurrence frequency, not uncertainty from every modeling choice or from the biological interpretation. More replicates can reduce this Monte Carlo error, but cannot repair a poor resampling unit or an unsuitable clustering specification.

Implementation, Diagnostics, and Alternatives

A practical analysis should retain subject identifiers and multiplicities throughout resampling. For each replicate, save the draw, unique subject count, cluster assignment of every sampled copy, and the recurrence summaries. Then check that the number of drawn rows equals \(n\), multiplicities sum to \(n\), and every included subject’s membership fractions sum to one. These checks catch coding errors that otherwise distort group recurrence.

1
Define the target.
Record the original reference groups and fix the clustering specification and any rule for random starts.
2
Resample subjects.
Draw \(n\) subject identifiers with replacement, retaining multiplicities rather than treating copies as new identities.
3
Recluster and summarize.
Fit the specified procedure to the replicate rows, calculate copy fractions \(q_{ibk}\), and record recurrence, coverage, and purity for each reference group.
4
Inspect and report.
Review replicate-level distributions, convergence failures, empty or tiny groups, and the number of distinct subjects; state all matching and threshold rules.

Several warning signs indicate that the result needs caution. A reference subgroup may have low coverage in many replicates, making its recurrence difficult to assess. A clustering algorithm may fail to converge or produce empty groups in some replicates. Duplicate rows may have a strong influence on a distance-based fit; for some algorithms, repeated rows act like increased weights, while for others their consequences are less simple. If the method cannot accept repeated observations sensibly, an implementation that uses multiplicity weights is appropriate only when it reproduces the intended fitting objective.

Bootstrap stability is not the same as stability to algorithmic initialization. Repeating the clustering several times on the unchanged data diagnoses sensitivity to starts, whereas bootstrapping changes which subjects are represented. These can be studied separately and, if desired, jointly with a clearly defined design. Alternatives such as subsampling without replacement or repeated train-test perturbations change which data are analyzed and answer related but not identical questions; they should not be interpreted as interchangeable bootstrap replicates.

The bootstrap also has limits. It assesses sampling variability under the empirical distribution of the observed subjects; it does not establish that a subgroup is a true biological class, validate its clinical utility, or remove bias from a nonrepresentative sample. With very small or rare groups, many replicates may omit most members, and apparent instability can partly reflect limited information. Conversely, strong recurrence under a fixed feature set and fixed preprocessing does not test whether the result survives changes to those choices.

Common Mistake

Common mistake: “The replicate has \(n\) rows, so every original subject contributes once to the stability calculation.” This is wrong: a bootstrap replicate has \(n\) draws, but duplicates replace omitted subjects. Counting all copies as independent members overweights frequently drawn subjects, while assigning omitted subjects to a replicate cluster invents information. Track \(W_{ib}\), use copy fractions \(q_{ibk}\), and report coverage so duplicate and omitted subjects are handled explicitly.
Key takeaway: A subject-level bootstrap stability analysis is a repeated draw-and-recluster procedure. Its subgroup summaries should distinguish recurrence from coverage, account for duplicate copies at the subject level, and be interpreted as conditional on the data, clustering specification, and chosen matching rule.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. For \(n=8\), a bootstrap replicate contains eight draws but only five distinct subjects. How many subjects were omitted, and why is the replicate still an eight-row sample?
  2. A reference subgroup has five subjects. In one replicate, four are included, and the best-matching replicate cluster receives membership contributions \(1,1,1,0.5,0\) from those five reference subjects. Find the recurrence score and coverage.
  3. Why should a subject drawn three times not contribute three times as much as a subject drawn once to the recurrence score?
  4. A subgroup meets a prespecified recurrence rule in 72 of 120 replicates. Calculate its estimated recurrence frequency and describe what it means.
  5. What does repeating clustering with different random starts on the unchanged data assess, and how does that differ from subject bootstrapping?

Solutions. (1) Three subjects were omitted. The sample consists of eight draws with replacement, so repeated draws occupy rows even though only five identities occur. (2) The score is \((1+1+1+0.5+0)/5=0.700\); coverage is \(4/5=0.800\). (3) Copies represent the same person, not independent people; dividing that person’s cluster counts by their multiplicity gives total contribution one across clusters. (4) \(\widehat{r}=72/120=0.600\), meaning the rule was met in 60.0% of those replicates under the specified procedure, not that the subgroup has a 60% probability of being real. (5) Different starts assess algorithmic sensitivity; subject bootstrapping assesses sensitivity to which subjects are represented.

Clinical Biostats