Spending Scarce Outcome Labels Where Rare Prognostic Phenotypes Hide

Outcome-driven clustering groups patients by where they are headed rather than by how they look today. The model is trained so that each cluster has its own distinct distribution of future events, such as death, ICU transfer, or a new comorbidity. Every method of this kind that we know of assumes the outcome is known for every patient. In practice, many clinically meaningful outcomes have to be established by chart review or expert adjudication: a cause-specific vascular event, a confirmed phenotype, a seizure annotation. When only a few hundred patients can be labeled and the adverse event is rare, a high-risk subgroup making up 2% of patients may get almost none of those labels if they are drawn at random. Such a subgroup can then neither form as a cluster nor have its event rate estimated.

This note proposes treating label acquisition as part of phenotype discovery. We use unlabeled trajectories to build a representation and an initial fine-grained grouping of patients. Each round, we then decide which patients to send for outcome labeling so that every candidate cluster's outcome distribution becomes precise enough to tell it apart from its neighbors. Patients are chosen with known, randomized probabilities, and every reported cluster event rate is reweighted by those probabilities. This matters clinically. If labels deliberately over-sample sick-looking patients and nothing corrects for it, the phenotype risks reported to clinicians come out inflated. The claim to test is that this cluster-targeted, probability-weighted labeling recovers rare outcome-distinct phenotypes, and estimates their event rates without bias, at a fraction of the labels needed by random labeling or by standard active learning.

What Exists and Where the Gap Is

Outcome-driven clustering is mature under full supervision. Several methods supply the clustering model we would reuse. AC-TPC (Temporal Phenotyping using Deep Predictive Clustering of Disease Progression, Outcome-Oriented Deep Temporal Phenotyping of Disease Progression) assigns patient trajectories to clusters so that each patient's outcome forecast matches its cluster's forecast. CAMELOT (Cluster-based Feature Importance Learning for Electronic Health Record Time-series) adds class-weighted losses and a regularizer that pushes cluster sizes toward uniform, so that clusters do not collapse when adverse events are under 13.2% of HAVEN admissions. Two survival methods, Neural Survival Clustering (Neural Survival Clustering: Non-parametric mixture of neural networks for survival clustering) and VaDeSC (A Deep Variational Approach to Clustering Survival Data), extend this to censored time-to-event data. All of them train on a complete outcome column. None asks which outcomes to collect.

CAMELOT's fix for imbalance also hints at a problem. A uniform-size prior prevents collapse, but it pushes majority patients into clusters that should be small. The rare phenotype is diluted rather than protected.

Label-efficient learning provides the representation. Contrastive predictive coding, a self-supervised method that learns by predicting future segments of a signal, reached macro AUC 0.9418 on PTB-XL ECGs, against 0.9318 for training from scratch. Its largest gains were on rare classes (Self-supervised representation learning from 12-lead ECG data). SIP-LDL (Time-Series Contrastive Learning against False Negatives and Class Imbalance) shows that contrastive learning under imbalance suppresses minority classes when same-class samples are treated as negatives. It matches full supervision at 10% labels, but only for classification. It also degrades when supervision becomes dense. That result constrains our design: the pretrained encoder should shape the initial grouping, not compete with the outcome objective at every step.

PASS (Prior Adaptive Semi-supervised Learning with Application to EHR Phenotyping) is the closest work on scarce gold labels in EHR. It shrinks a model toward cheap surrogate features such as diagnosis-code counts. Its labeled set is taken as given, and it fits a single phenotype classifier rather than clusters.

The bridging papers in the file do not cover this either. TACCO (TACCO: Task-guided Co-clustering of Clinical Concepts and Patient Visits for Disease Subtyping based on EHR Data) and AttentiveGRUAE (AttentiveGRUAE: An Attention-Based GRU Autoencoder for Temporal Clustering and Behavioral Characterization of Depression from Wearable Data) combine self-supervision with outcome-guided clustering, but use fully labeled and roughly balanced cohorts. The obvious combination of a pretrained encoder, CAMELOT-style clustering and imbalance losses is a stacking exercise that a reviewer could reproduce in an afternoon. The opening is different. Nothing in this literature decides where scarce outcome labels go, and nothing corrects cluster-level risk estimates for that choice.

Core Claim

Under a fixed labeling budget and a rare outcome, the main obstacle to finding rare prognostic phenotypes is how the labels are allocated, not the clustering architecture. The proposal has three parts:

  • Grouping stage. Use self-supervised trajectory embeddings to over-partition patients into many fine strata.
  • Labeling stage. Allocate labels across the current clusters so that each cluster's outcome is estimated well enough to separate it from its nearest neighbor.
  • Estimation stage. Report cluster outcomes with inverse-probability weights.

Together these should beat random labeling with the same encoder and clustering model. The expected gains are recall of planted or clinically confirmed minority phenotypes and error of cluster event rates, both measured against a full-label reference, while keeping overall discrimination.

Research Program

Stage 1: pretraining and initial strata. We pretrain a temporal encoder with latent forecasting on all trajectories, labeled or not. We use contrastive predictive coding because of its rare-class behavior on physiological time series. We then run k-means with a deliberately large number of groups (for example 50) on the embeddings. These fine strata are only sampling units, not phenotypes. Their purpose is to give geometrically unusual patients their own stratum, so they can receive labels before any outcome signal exists.

Stage 2: labeling rounds. At each round $r$, the current clustering model assigns every patient $i$ to a cluster $c_i$. In round 1 this is the fine strata. In later rounds it is an AC-TPC or CAMELOT-style outcome-driven model fine-tuned on the labels so far. Each unlabeled patient is labeled with a known probability $q_i$, floored at a small $\epsilon>0$ so that no patient is unreachable. The cluster outcome rate is estimated as

$$\hat\pi_k=\frac{\sum_{i\in L} w_i\,\mathbb{1}[c_i=k]\,y_i}{\sum_{i\in L} w_i\,\mathbb{1}[c_i=k]},\qquad w_i=\frac{1}{q_i},$$

where:

  • $L$ is the labeled set;
  • $y_i$ is the outcome;
  • $w_i$ undoes the deliberate over-sampling.

For censored outcomes the same weights enter a weighted Kaplan–Meier curve.

Choosing how many labels each cluster gets. We want each cluster distinguishable from its closest neighbor. Let $\Delta_k$ be the gap between cluster $k$'s outcome rate and the nearest other cluster's. The binomial variance of a rate estimate is about $\pi_k(1-\pi_k)/n_k$, where $n_k$ is the number of labels cluster $k$ receives. Equalizing the ratio of variance to squared gap across clusters gives

$$n_k \propto \frac{\pi_k(1-\pi_k)}{\Delta_k^2}.$$

Under this rule, small clusters with rare events and close neighbors receive labels out of proportion to their size, while large, well-separated, low-risk clusters receive few. The budget $n_k$ is spread uniformly inside each cluster, which sets $q_i$. For poorly labeled clusters we plug in conservative prior values of $\pi_k$ and $\Delta_k$, since their estimates are noise.

Two separate uses of weights. Training the outcome head still uses class weighting so that the rare outcome shapes cluster boundaries. Only the reported phenotype risks use $w_i$. Mixing up these two uses is exactly the failure we want to avoid.

Merging clusters. Between rounds, the outcome-driven model may merge strata whose weighted outcome distributions are statistically indistinguishable. The uniform-size regularizer is replaced by a minimum labeled-event count per surviving cluster, so a small cluster is allowed to exist only once there is enough evidence for it.

Baselines

Naive reference: random labeling. Labels are drawn uniformly at random. The same pretrained encoder and the same CAMELOT-style clustering model are trained on them, with class-weighted loss. This isolates allocation as the only change. Label budgets are matched exactly (for example 250, 500, 1,000 and 2,000 patients), as are the encoder, training epochs and hyperparameter search budget. Any gain then comes from which patients were labeled.

Upper reference: full supervision. CAMELOT and AC-TPC trained on all labels. Where we can obtain the original data, we will first reproduce the published figures:

We found no reported result on Lacuna for any outcome-driven clustering method at reduced outcome-label budgets. The label-scarce curves are therefore new measurements, and success is defined relative to these full-label references. The method beats the strongest competitor if, at a fixed budget, it either reaches 95% of full-label AUROC with fewer labels than random labeling, or recovers the minority phenotype that random labeling misses.

Strongest active competitor: surrogate-enriched sampling. Labels are drawn with probability proportional to a cheap risk surrogate, such as diagnosis-code counts in the spirit of PASS or an early-warning score. The same inverse-probability weights are applied, so this baseline also produces unbiased estimates. It is the most plausible threat because it already concentrates labels on likely events.

Standard active learning. Uncertainty sampling picks the patients a risk classifier is least sure about.

Ablations of the key ingredients. We test:

  • removing the weights $w_i$, which measures the bias in reported event rates;
  • replacing randomized sampling with deterministic top-scoring selection, which breaks the weights;
  • removing pretraining, which builds strata on raw features;
  • restoring the uniform-size regularizer.

Why not just…?

Why not just pretrain an encoder and label patients at random? The arithmetic answers this. Suppose a phenotype covers 2% of patients and has a 40% event rate, similar to the 41.7% high-risk group DLC found in stroke (Neural network-based clustering model of ischemic stroke patients with a maximally distinct distribution of 1-year vascular outcomes). A random budget of 500 labels then reaches about ten of its members and four events. No clustering objective can form a stable cluster from that, however good the encoder is. The random-labeling baseline measures this failure directly. If its minority-cluster recall matches ours, the claim fails.

Why not just over-sample patients a surrogate flags as high risk? This is a real threat, and it may capture most of the gain when the rare phenotype is also the highest-risk one. It should fall short in two cases:

  • Not the riskiest. The rare phenotype has moderate risk but a distinct outcome type, for example cardiac arrest rather than death, among HAVEN's four outcomes.
  • Surrogate misses it. The surrogate is poorly aligned with the phenotype, the failure regime PASS itself guards against.

We test both cases with planted synthetic phenotypes and on real cohorts. Weights are applied to the surrogate baseline too, so the comparison concerns allocation only.

Why not just run uncertainty-based active learning? It spends labels near one decision boundary rather than on resolving cluster outcome distributions. Its deterministic choices give some patients zero chance of being labeled, so no valid reweighting exists. The no-weights and deterministic ablations quantify how far the resulting phenotype event rates drift from the full-label reference.

Why not just train a risk model and cut its predictions into quantile bins? With a single binary outcome, risk bins may be nearly as good as clusters, and we will report them. They cannot separate two groups with equal overall risk but different outcome profiles across UKCF's 22 comorbidities or HAVEN's competing events. A synthetic test plants exactly such a pair and scores both methods by ARI.

Proposed Experiments

Synthetic study. We build longitudinal data with planted phenotypes whose prevalence ranges from 1% to 20%, including two phenotypes with equal risk but different outcome types. Ground-truth ARI and minority-cluster recall can then be measured exactly.

Real cohorts. On public data we use MIMIC-III trajectories for in-hospital mortality and ICU events, SUPPORT and METABRIC for censored survival with weighted Kaplan–Meier curves, and ADNI for diagnostic transitions. UKCF and HAVEN are added if access allows, because they carry the published full-label numbers above. Since outcome labels are recorded in these cohorts, we simulate scarcity by revealing outcomes only for selected patients. This tests allocation, not the real cost of adjudication. We state that limitation openly.

Metrics:

  • AUROC and AUPRC for discrimination, and C-index and log-rank statistic for survival;
  • absolute error of each cluster's weighted event rate against the full-label estimate;
  • recall of minority phenotypes, defined as clusters under 5% prevalence that are outcome-distinct under full labels;
  • the number of labels needed to reach 95% of full-label AUROC.

Decisive checks. Three results would decide the question. First, at matched budgets the method should recover full-label minority phenotypes that random and surrogate-enriched sampling both miss. Second, removing the weights should inflate reported minority event rates, while the weighted estimates stay within sampling error of the full-label values. Third, the gain should shrink as the budget grows toward full labels. That last result would show the benefit comes from allocation under scarcity, consistent with the label-scarce gains of contrastive predictive coding and the saturation SIP-LDL reports. If surrogate-enriched sampling matches the method everywhere, including on the equal-risk and misaligned-surrogate settings, we will conclude that cluster-targeted allocation adds nothing beyond risk enrichment.