Introduction
For most diseases, we can't predict which patients will respond to a given drug. The information for response prediction resides in molecular assays on biopsies—data we can collect but cannot robustly synthesize, because a single trial of a few hundred patients is often too small to learn response criteria in a 20k-dimensional gene expression space. A foundational model of patient biology removes that obstacle by amortizing learning across millions of samples, leaving a single cohort to learn only the final step that separates responders from non-responders for a drug in a compressed latent space. We demonstrate this with UNIFI, the phase 3 trial of ustekinumab in ulcerative colitis, predicting response from baseline biopsies at AUROC 0.76. Using this model retrospectively, we determine how much smaller the trial could have been while preserving the same statistical power.
Current Trial Logic and Improved Response-Prediction
A clinical trial is fundamentally a tool of statistical inference. It enrolls a population defined by disease, randomizes patients between arms, and estimates an average treatment effect over the cohort, which is inferred to be representative of the total population. The observable effect is the drug's effect diluted by the fraction of non-responders in the cohort. The trial pays for this dilution in patients enrolled, time elapsed, and effects too modest to meet endpoints.
Response-prediction biomarkers mitigate these costs. By identifying likely responders in advance, they raise responder prevalence in the enrolled population, reducing the number of patients a trial requires to detect an effect, or, equivalently, raise the probability of success at fixed enrollment. So far, a trial has been the only form of evidence about whether a drug worked because we lack models of individual response with enough fidelity to substitute for it. As such models become available, evidence about response relocates from the trial into the predictor, and the trial increasingly depends on the predictor. Foundational models of biology hold the promise of bringing predictive power to the threshold where this relocation begins.
Historical Arc of Response Prediction
Response prediction has developed alongside the biology that was tractable to measure, the technologies available to measure it, and the statistical methods available to integrate evidence at trial-scale cohort sizes. Through the late 1990s, cytotoxic therapy was selected by disease site, histology, and stage, on the implicit assumption that all patients with, for instance, "stage IV non-small-cell lung cancer" formed a single biological population; the available drugs exploited one near-universal property of cancer cells, their proliferation rate, and the available assays offered no molecular signal to differentiate patients within a histology, so the coarseness of the biological description matched that of the therapy. The characterization of mutations like the BCR-ABL translocation in CML then suggested cancers have specific molecular vulnerabilities, ushering in the single-target era (late 1990s–mid-2000s), in which driver oncogenes (BCR-ABL, HER2, EGFR, BRAF V600E), drugs that intervened on them, and assays that could measure them at scale converged: trastuzumab, which showed low-efficacy across unselected metastatic breast cancer, became transformative in the 20 percent of patients whose tumors overexpressed HER2, and the biomarker was, for the first time, dictated by the drug's mechanism. But few diseases reduce to a single dominant driver, and the period of multigene signatures (mid-2000s–mid-2010s) responded to this polygenicity with expression scores like Oncotype DX, MammaPrint, and PAM50—metrics rich enough to capture several pathways yet low-dimensional enough to fit and cross-validate on cohorts of a few hundred. From the mid-2010s and onward, the core limitation has become accepted: checkpoint-inhibitor response depends not on tumor cells alone but on a joint distribution across mutational burden, neoantigen load, PD-L1 expression on multiple cell types, T-cell phenotypes, and spatial organization. The single-analyte companion diagnostics that emerged (PD-L1 IHC, TMB) have been retained despite AUROCs of only 0.55-0.65 because no statistical method can fit that joint distribution at trial-scale sample sizes. The recurring pattern is that at each stage the predictive signal has been known to be richer and more contextual than the deployed biomarker, and the limiting constraint was never the biology but the inability to learn a high-dimensional response rule from a few hundred patients, which is exactly the constraint a foundational model of patient biology, pretrained across millions of samples, is built to remove.
An Era of Foundation Models
Deep learning architectures, scaled to sequence and expression data, are able to be pretrained on hundreds of millions of cells and millions of bulk samples spanning tissues, diseases, and perturbations. The product of pretraining is a representation in which biological state is encoded as geometry. Cells in similar functional states map to nearby points just as patients whose biopsies reflect similar drug-responsiveness map to nearby points—even when their raw profiles (in their native high-dimensional form) would not have made the similarity apparent under any straightforward distance metric. The representation integrates a vast amount of biological knowledge into a single embedding. What is obtained is a representation in which downstream supervised learning is dramatically more sample-efficient than learning from raw counts. The pretraining covers the general structure of biology; the fine-tuning covers only the directions in the latent space that distinguish responders of a specific drug. With a single clinical trial cohort, a model cannot effectively learn the structure of human disease biology without extensive feature engineering, i.e., training supervised heads on raw counts of selected genes, but one can learn which directions in a well-constructed latent space separate responders from non-responders.
Conditioning on embeddings derived from whole transcriptomes also enables the training of a model across trials. It would be expected that the response criteria for drugs with similar mechanisms of action, drugs used across indications, and different drugs for the same indication would have some non-trivial overlap; for instance, the transcriptomic signatures of a responder to a PD-1 inhibitor for melanoma or non-small lung cancer would have some similarity. Generalization beyond patients, to new indications, response criteria, treatments, however, is difficult. The variance across trial conditions and patient populations, relative to the volume of open-source trial data, makes direct cross-trial generalization currently infeasible for stratification decisions (though perhaps still relevant for hypothesis generation). The tractable method is to use an initial study (phase I, II, or POC) to fine-tune a model or train a supervised head atop the pretrained embeddings, and to use that predictor in the subsequent trial.
Case Study: Response to Ustekinumab in Ulcerative Colitis
Here we test this methodology in depth through a case study: ulcerative colitis patients from the UNIFI program (NCT02407236; Sands et al., NEJM 2019), a randomized placebo-controlled phase 3 trial that established ustekinumab in moderate-to-severe UC. A transcriptomic substudy collected baseline sigmoid-colon biopsies from 550 UC patients, 186 randomized to placebo and 364 to ustekinumab (split across 130 mg and 6 mg/kg dose arms), with microarray profiling released as GSE206285 (Powell et al., Nat Commun 2022). After QC and inclusion filtering, our training cohort comprises 358 of the 364 ustekinumab-treated patients, of whom 56 met the clinical response endpoint at week 8 and 302 did not. We use a foundational model of patient biology to embed the microarray data from patient-derived colon biopsies, and we train a supervised head on these embeddings with five-fold cross-validation with random splits, achieving an AUROC of 0.760.
We next apply SHAP to understand the biological reasoning behind the model's predictions.
Since SHAP only identifies the axes of the latent space used in classification, we use linear probes to identify the genes corresponding to each latent dimension. Specifically, we fit Lasso regressions of each top SHAP dimension against the full 20k-gene expression matrix to identify which genes most strongly drive the values of each dimension. The Lasso coefficients, weighted by the dimension's SHAP importance and aggregated across dimensions, yield a per-gene importance score that summarizes the model's reliance on each gene across its top discriminative axes.
The top 30 genes show coherent themes: MMP7, CHI3L1, IL6, CXCL10, CXCL13, and CD38 are linked with mucosal inflammation in IBD, while IDO1, COL23A1, and MS4A7 mark the non-responder phenotype of chronic, less immunologically active, or structurally fibrotic disease.
We then ran a pathway enrichment analysis by taking genes with non-zero Lasso coefficients across the top SHAP dimensions and running an overrepresentation analysis (Enrichr) on that gene set.
The results surface key biological programs implicated in UC response: interferon response, TNF-α\alpha/NF-κ\kappaB signaling, chemokine-mediated immune cell recruitment, and depletion of epithelial–mesenchymal transition and fibrosis-related programs.
The results demonstrate that the model has effectively learned the axes of response in UC biology from an informative embedding. The next question is what the relevance of this particular model: what does an AUROC of 0.76 mean for a clinical trial?
Better Biomarkers and Fewer Patients: A Statistical View
Here we derive an expression for trial enrollment size parameterized by biomarker AUROC, demonstrating the approximate linearity of the marginal trial-size change with respect to increasing AUROC. We build the expression in stages, beginning from the basic structure of a randomized trial.
Notation. Φ\Phi denotes the standard normal CDF and zq=Φ−1(q)z_q = \Phi^{-1}(q) its qq-th quantile. Subscripts TT and CC index treatment and control arms; subscripts RR and NN index latent responder and non-responder classes. The clinical outcome is YY with within-arm variance σY2\sigma_Y^2; the biomarker score is SS with within-class variance σS2\sigma_S^2. We write NN for per-arm sample size.
Basic trial structure. Consider a two-arm parallel-group design with equal allocation, NN patients per arm. Let μT=E[Y∣T]\mu_T = E[Y \mid T] and μC=E[Y∣C]\mu_C = E[Y \mid C] denote arm-level expected outcomes, and define the average treatment effect
δ:=μT−μC.\delta := \mu_T - \mu_C.The trial tests H0:δ=0H_0: \delta = 0 against H1:δ≠0H_1: \delta \neq 0 at type I rate α\alpha and power 1−β1-\beta. The standardized test statistic
Z=YˉT−YˉC2 σY2/NZ = \frac{\bar Y_T - \bar Y_C}{\sqrt{2\,\sigma_Y^2 / N}}is approximately N(0,1)\mathcal{N}(0,1) under H0H_0 and N (δN/(2σY2), 1)\mathcal{N}\!\left(\delta\sqrt{N/(2\sigma_Y^2)},\,1\right) under H1H_1. Requiring rejection probability 1−β1-\beta under the alternative yields the canonical per-arm sample size
N=2 σY2 (z1−α/2+z1−β)2δ2.N = \frac{2\,\sigma_Y^2\,(z_{1-\alpha/2} + z_{1-\beta})^2}{\delta^2}.The key fact that holds through everything that follows is N∝1/δ2N \propto 1/\delta^2—halving the observable effect quadruples the trial size.
Binary outcomes. For response prediction, YY is binary with arm-level response probabilities pT=P(Y=1∣T)p_T = P(Y=1 \mid T) and pC=P(Y=1∣C)p_C = P(Y=1 \mid C). The Bernoulli variance p(1−p)p(1-p) replaces σY2\sigma_Y^2 in the sample-size formula, recovering the standard two-proportion form with δ=pT−pC\delta = p_T - p_C and the 1/δ21/\delta^2 scaling intact.
Trial population as a mixture of responders and non responders. The trial estimates δ\delta over a heterogeneous population, which we model as a mixture of two latent classes. Responders constitute a fraction π∈(0,1)\pi \in (0,1) of the eligible population with within-class treatment effect δR\delta_R; non-responders make up the remaining 1−π1-\pi with negligible within-class effect δN≈0\delta_N \approx 0. The observable population-level effect is the prevalence-weighted average,
δpop=π δR+(1−π) δN≈π δR,\delta_{\text{pop}} = \pi\,\delta_R + (1-\pi)\,\delta_N \approx \pi\,\delta_R,the biological effect attenuated by responder prevalence. At π=0.20\pi = 0.20, the trial resolves one-fifth of the biological signal at twenty-five times the per-arm cost of a hypothetical pure-responder cohort.
Biomarker enrichment. A biomarker assigns each patient a score SS and, applied at some threshold, enrolls those whose score exceeds it. Its operating characteristics are
Se=P(enrolled∣R),Sp=P(not enrolled∣N),FPR=1−Sp.\Se = P(\text{enrolled} \mid R), \qquad \Sp = P(\text{not enrolled} \mid N), \qquad \FPR = 1 - \Sp.Bayes' rule gives the responder prevalence in the biomarker-positive (enrolled) subpopulation,
π′=π Seπ Se+(1−π) FPR,\pi' = \frac{\pi\,\Se}{\pi\,\Se + (1-\pi)\,\FPR},and the enriched-trial observable effect is δenr=π′ δR\delta_{\text{enr}} = \pi'\,\delta_R. Combined with the 1/δ21/\delta^2 scaling, the ratio of required sample sizes between enriched and unenriched designs is
NenrNpop=(δpopδenr) 2=(ππ′) 2=(π Se+(1−π) FPRSe) 2.\frac{N_{\text{enr}}}{N_{\text{pop}}} = \left(\frac{\delta_{\text{pop}}}{\delta_{\text{enr}}}\right)^{\!2} = \left(\frac{\pi}{\pi'}\right)^{\!2} = \left(\frac{\pi\,\Se + (1-\pi)\,\FPR}{\Se}\right)^{\!2}.Integrating AUROC. This expression depends on the chosen threshold via the pair (Se,FPR)(\Se, \FPR). To collapse the dependence to biomarker accuracy alone, adopt an equal-variance binormal score model:
S∣R∼N(μR,σS2),S∣N∼N(μN,σS2),S \mid R \sim \mathcal{N}(\mu_R, \sigma_S^2), \qquad S \mid N \sim \mathcal{N}(\mu_N, \sigma_S^2),with standardized class separation d:=(μR−μN)/σSd := (\mu_R - \mu_N)/\sigma_S. Under this model, the AUROC takes the closed form ρ=Φ(d/2)\rho = \Phi(d/\sqrt{2}), and for any standardized threshold τ\tau, Se(τ)=Φ(d−τ)\Se(\tau) = \Phi(d-\tau) and FPR(τ)=1−Φ(τ)\FPR(\tau) = 1 - \Phi(\tau). At the Youden operating point τ∗=d/2\tau^* = d/2 (which maximizes Se+Sp−1\Se + \Sp - 1), sensitivity equals specificity:
Se = 1−FPR = s(ρ),s(ρ):=Φ (Φ−1(ρ)/2).\Se \;=\; 1 - \FPR \;=\; s(\rho), \qquad s(\rho) := \Phi\!\left(\Phi^{-1}(\rho)/\sqrt{2}\right).Substituting into the enrichment ratio yields the closed-form result:
N(ρ)N(0.5) = (π+(1−π) 1−s(ρ)s(ρ)) 2,s(ρ)=Φ (Φ−1(ρ)/2). \boxed{\;\frac{N(\rho)}{N(0.5)} \;=\; \left(\pi + (1-\pi)\,\frac{1-s(\rho)}{s(\rho)}\right)^{\!2}, \qquad s(\rho) = \Phi\!\left(\Phi^{-1}(\rho)/\sqrt{2}\right).\;}At ρ=0.5\rho = 0.5 (random), s=0.5s = 0.5 and the ratio equals 1 meaning no enrichment. As ρ→1\rho \to 1 (perfect classifier), s→1s \to 1 and the ratio approaches π2\pi^2—a floor set by the underlying patient population, since the within-responder effect δR\delta_R is itself fixed.
N(ρ)N(\rho) has three noteworthy features. It is monotonically decreasing and saturates at π2\pi^2, a floor set by responder prevalence rather than by the predictor. Across the operational range ρ∈(0.55,0.90)\rho \in (0.55, 0.90), logN(ρ)\log N(\rho) is approximately linear in ρ\rho with slope ≈−5\approx -5: each 0.01 of AUROC enables roughly 5% reduction in trial size, independent of starting point—biomarker improvements do not suffer diminishing returns until very near the floor. At low prevalence, specificity loss is punished more severely than sensitivity loss, since false positives dilute the enriched cohort while false negatives only inflate screening burden.
Using a 0.76 AUROC Biomarker Retrospectively for UNIFI
Using the expression above for N(ρ)N(\rho), we can ask for UNIFI: how many fewer patients per arm could have been enrolled while maintaining the statistical power the trial actually achieved?
It should be noted here that this framing assumes the constraint on trial size is statistical power on the primary endpoint, but trial size also depends on adverse event characterization and regulatory patient-year exposure floors which impose their own minima, so a trial that satisfies the power calculation at a much smaller NN cannot always be reduced to that NN. The results presented are meant demonstrate the relation between power, number of patients, and AUROC and not to claim that UNIFI necessarily should have been run with lower NN. This goes for the practical impossibility of biomarker-enriched enrollment with a model trained on that trial as well.
UNIFI's induction phase randomized 961 patients with 320 per active arm (pooling the 130 mg and 6 mg/kg dose groups, as in the primary analysis) and achieved pT=0.156p_T = 0.156 against pC=0.053p_C = 0.053 on clinical remission at week 8—a population-level effect δpop=0.103\delta_{\text{pop}} = 0.103, corresponding to achieved power 1−β≈0.991 - \beta \approx 0.99. We hold this achieved power fixed and ask how NN scales with biomarker AUROC. The drug-responsive prevalence enters through the closed-form expression as π=pT=0.156\pi = p_T = 0.156, as observed from the 358-patient training cohort (56 responders of 358 on ustekinumab) and consistent with the active-arm response rate trial-wide.
At the 0.76 AUROC observed on this cohort, UNIFI could have enrolled roughly 91 patients per arm instead of 320 while maintaining the same statistical power—182 patients in the active and placebo arms combined rather than 640, a saving of over 450 patients. The screening burden at the Youden operating point (Se≈Sp≈0.69\Se \approx \Sp \approx 0.69, biomarker-positive fraction ≈0.37\approx 0.37) is approximately 500 patients screened to enroll 241, a 2.7× over-screen.
These savings accrue most fully when the trial floor is set by effect size rather than safety, so that a smaller efficacy arm can still reach the minimal exposure needed to characterize the drug's safety profile. When the safety data is the limiting constraint, biomarker enrichment compresses the efficacy arm but cannot collapse the rest, and the gap must be closed in the way the pharmaceutical industry already routinely does using strategies such as cross-indication safety data from prior approvals (as ustekinumab itself drew on its psoriasis and Crohn's exposure when UNIFI was filed), parallel safety-focused arms, and long-term open-label extensions that build the chronic-exposure profile after the efficacy readout. However, none of this changes the central point that better prediction improves the trial's statistical power.
Rescuing a failed trial
UNIFI succeeded comfortably with high statistical power. A more interesting question is what biomarker enrichment would do for a trial that would not succeed. Consider a hypothetical UNIFI trial with a weaker drug-attributable effect: pT=0.10p_T = 0.10 against pC=0.06p_C = 0.06. At UNIFI's 320 per arm, such a trial achieves only 46% power. Reaching a conventional 80% power target unenriched would require 721 patients per arm—well beyond what the actual UNIFI program enrolled, and potentially to the point where the program would not have been run. At AUROC 0.76 with this weaker effect, the enriched trial requires 221 patients per arm, a 3.5× reduction that brings a potentially infeasible trial back into the ambit of a standard phase 3 program. This is the structural point: biomarker enrichment is not only a cost optimization for trials that would succeed anyway, it is also a way in which trials that would not be run become feasible.
Limitations
The N(ρ)N(\rho) derivation assumes an equal-variance binormal biomarker distribution and the Youden operating point. Real biomarker scores are typically skewed or mixture-modal, and trial designs may use non-Youden operating points if false positives or false negatives have asymmetric cost.
Response prevalence is taken to be known, but in prospective use it would be an estimate from the training cohort. If the prospective enrolled population has a different responder prevalence than the training cohort, and trial-enrolled populations drift over time as the standard of care evolves, the trial-size predictions would no longer be accurate.
There is an explore-exploit tradeoff in biomarker-enriched design which we have so far set aside. Maximally enriching for biomarker-positive patients exploits what the predictor knows; exploration, in the form of enrolling some biomarker-negative patients, is what keeps the predictor falsifiable, since it is the only way to learn whether the model is wrong about the population it excludes. Balancing the two reduces the realized enrichment relative to what the presented AUROC suggests is achievable.
Placebo response may shift with enrichment. If biomarker positivity correlates with disease activity, the placebo arm in an enriched cohort may respond at a higher rate (active disease regresses to the mean more strongly). δpop\delta_{\text{pop}} in the enriched trial may not scale linearly with π\pi, being partially attenuated by a higher placebo rate. The math implicitly assumes the placebo rate is constant across biomarker strata, which is unlikely to hold exactly.
Conclusion
We have demonstrated from multiple perspectives how response prediction is a critical parameter on which the structure of a clinical trial depends. From first principles, the trial estimates an average effect that is biologically meaningful only insofar as the population is homogeneous; the apparatus of randomization, blinding, and large NN is the price paid for treating biologically distinct patients as exchangeable members of a single cohort. From the historical arc, response prediction has been rate-limited not by the biology, which has always been polygenic and contextual, but by the statistical tools available to integrate evidence at trial-scale cohort sizes. From the mathematics of statistical power, biomarker AUROC translates monotonically into trial size, with approximately constant fractional returns across the operational range and a biological floor set by responder prevalence. The empirical work in UC ties these threads together: a foundational embedding combined with a small supervised head achieves an AUROC of 0.76 on ustekinumab response, a predictor that, applied to the UNIFI trial it was trained on, would have reduced enrollment by a factor of 3.5 at matched statistical power. The methodology works because the difficult part, learning the structure of biology, is done once on millions of samples outside any trial, and the trial-specific learning reduces to identifying which directions in a well-constructed latent space separate responders from non-responders.
This is one indication, drug, and cohort, with a model pretrained on a fraction of existing data. What we have demonstrated is a lower bound on what is achievable. As pretraining corpora grow, meaning more trials, diseases, assay modalities, and clinical context are integrated alongside molecular state, the geometric prior becomes richer, generalization improves and supervised heads need fewer trial-specific examples to reach a given AUROC. The transcriptomic biology of response to IL-23 blockade in UC is not unrelated to that in Crohn's disease or psoriasis; the biology of response to PD-1 inhibition in melanoma shares structure with that in non-small-cell lung cancer and renal cell carcinoma. A foundational model trained jointly across such data does not need to relearn the axes of response for each new indication. It learns generalizable directions in the latent space against which any new trial can fine-tune with a much smaller supervised cohort. Scale compounds in three directions at once: more data per training step, more indications served by a single model, and lower marginal cost of building a stratifier for each new drug program.
The implications for drug development are considerable. Each new trial inherits a prior trained on the cumulative corpus of trials that came before. Indications with effect sizes too small to justify a thousand-patient phase 3 become possible at feasible sizes. Diseases of insufficient prevalence to support full-scale phase 3 recruitment become reachable when the biomarker-enriched cohort is small enough to practically assemble. Moreover, structural changes like basket and umbrella designs limited by biomarker predictiveness become more tractable when a model predicts response across indications and drugs.
The deeper point is that the trial was historically the only form of evidence about whether a drug worked because we lacked models of individual response with enough fidelity to substitute for it. The trial was our coarsest possible model of the patient: only treatment assignment, disease, and stage were measured, and everything else was averaged over. Every refinement of predictive modeling represents a partial relocation of evidence from the trial, where it is expensive, slow, and aggregate, into the model, where it is cheap, fast, and specific to an individual. The work ahead is to build larger foundational models, validate them across diseases, and develop the operational frameworks to act on them at scale. What is being developed is currently a tool for stratification, but promises to be a key substrate upon which the next era of clinical trials are designed and run.





















