Immunotherapy drugs that release the brakes on a patient's immune system work dramatically better in some patients than others, and a growing body of evidence shows that the trillions of bacteria living in the gut are part of the reason: microbial metabolites tune regulatory T cells, cytotoxic T-cell infiltration, and immunosuppressive myeloid cells at tumors far from the intestine. Several clinical studies have therefore built predictors of patient response from stool sequencing. The problem is that these predictors are fragile in a very specific way. They are built from small cohorts (17 to 77 patients), with single machine-learning models, and when microbiome classifiers are moved between hospitals and countries — where DNA extraction kits, sequencing platforms, and diets differ — their accuracy collapses. The microbiome literature itself documents this: the ML4Microbiome consortium showed that models trained in one region degrade badly on external cohorts, and that standard cross-validation inflates reported AUC by up to 20 points in small samples.
This proposal brings in a classical idea from machine learning — ensembling, or combining a committee of models whose individual mistakes don't line up, so that averaging cancels the noise — but with a twist that the microbiome setting forces. Standard ensembles diversify their members by random seeds or architecture; those members still fail together when the cohort changes, because batch effects hit all of them in the same way. I propose to build ensembles whose members are deliberately chosen so that their batch-induced errors are uncorrelated — for example, pairing a tree model trained on raw taxonomic counts with a linear probe on representations pre-trained on 85,364 independent stool samples — and to fuse them with a simple, inspectable meta-model trained only across cohort boundaries. The application is predicting response to immune checkpoint inhibitors, and a secondary output is an interpretable, generalization-tested version of the hand-crafted "microbiota rheostat" biomarker.
Core Claim
The claim has two parts. First, the binding constraint on microbiome-based prediction of immunotherapy response is cohort-specific technical variation, not model capacity: published single models — XGBoost reaching 0.83 accuracy on an external validation set in MSI-H gastrointestinal cancer (Multi-omics of the gut microbial ecosystem in the immunotherapy resistance in microsatellite instability-high gastrointestinal cancer patients), or a three-genus log-ratio reaching AUC 0.94 in a 17-patient mesothelioma subset (A gut microbiota rheostat forecasts responsiveness to PD-L1 and VEGF blockade in mesothelioma) — were never tested under the cross-cohort shift that the benchmarking literature identifies as the dominant failure mode (Machine learning approaches in microbiome research: challenges and best practices). Second, an ensemble whose members are selected for decorrelated out-of-cohort errors, aggregated by a linear stacker trained exclusively on leave-one-cohort-out predictions, will transfer across cohorts better than any single member or any conventionally constructed ensemble — and, because the fusion layer stays linear, it can still output an explanation clinicians can read.
The design principle is captured by one quantity. For experts $f_1,\dots,f_M$ and their loss indicators $\ell_m$ on held-out cohorts, define the mean pairwise error correlation
$$\bar{\rho} = \frac{2}{M(M-1)} \sum_{m < m'} \mathrm{corr}(\ell_m, \ell_{m'}),$$
and select ensemble members to keep $\bar{\rho}$ low on cohorts the members never trained on, not on random validation splits. The final prediction is $\hat{p}(x) = g(f_1(x), \dots, f_M(x))$, where $g$ is a ridge logistic regression — chosen deliberately, since the ML4Microbiome benchmark found ridge logistic regression nearly matched Random Forest (AUC 0.731 versus 0.758) while remaining interpretable (Machine learning approaches in microbiome research: challenges and best practices).
Research Program
The expert pool is built from model families that plausibly fail differently under cohort shift. One family is tree-based models (XGBoost, Random Forest) trained on centered-log-ratio-transformed species and pathway abundances, which capture non-linear taxa interactions but are documented to be batch-fragile. A second is heavily regularized linear models on small, robustly selected feature sets — following the Statistically Equivalent Signatures approach that identified 20 species markers consistent across nine countries (Machine learning approaches in microbiome research: challenges and best practices). A third is linear probes on self-supervised microbiome representations pre-trained on the 85,364-sample repository, which is the one approach with direct evidence of cross-cohort robustness, improving transfer by up to 81% in small-sample settings (Self-Supervised Representation Learning for Microbiome Improves Downstream Prediction in Data-Limited Settings and Cross-Cohort Generalizability). A fourth, where metabolomics exist, is a Product-of-Experts variational encoder that fuses species, strain-marker, and metabolite views through Gaussian latent distributions, following the MVIB architecture that reached AUC 0.80–0.95 across eleven disease cohorts (Microbiome-based disease prediction with multimodal variational information bottlenecks). Finally, host-side experts — tumor genomic instability markers and clinical proxies such as prolonged antibiotic exposure, which tripled the risk of death (HR = 2.95) in NSCLC (Prediction of outcome in patients with non-small cell lung cancer treated with second line PD-1/PD-L1 inhibitors based on clinical parameters: Results from a prospective, single institution study) — sit in the same committee, so the stacker can learn when the microbial signal is absent and clinical surrogates should dominate.
Two methodological commitments run through the whole program. Every model-selection step uses Bootstrap Bias Corrected Cross-Validation, because the winner's-curse result — up to 20 AUC points of inflation from uncorrected cross-validation (Machine learning approaches in microbiome research: challenges and best practices) — directly threatens the small immunotherapy cohorts this field builds on. And class imbalance, common in responder/non-responder splits, is handled with cost-sensitive weighting rather than relying on uniform averaging, which is known to bias toward majority classes (A Comprehensive Survey on Imbalanced Data Learning). The interpretation layer aggregates per-member SHAP and individual conditional expectation analyses, weighted by the stacker's learned coefficients, into a single "generalized rheostat": a compact set of log-ratio directions the committee collectively relies on, offered as a generalization-tested replacement for the hand-crafted three-genus formula.
Proposed Experiments
The shift claim needs a benchmark with real cohort diversity, and the immunotherapy application needs the clinical cohorts. Experiment 1 develops and validates the method on the ML4Microbiome collection: 2,090 stool samples across 13 public cohorts in 9 countries, profiling 2,014 metagenomic species (Machine learning approaches in microbiome research: challenges and best practices). The protocol is leave-one-cohort-out: train the stacker and its experts on twelve cohorts, predict on the thirteenth, and rotate. Metrics are AUC and PR-AUC with bootstrap confidence intervals, all under bias-corrected selection. This is where the core claim is testable at scale, and where the decisive comparisons against Random Forest (reported validated test AUC 0.758) and ridge logistic regression (0.731) live; both are re-run under the identical transfer protocol so the comparison is fair rather than borrowed from a different evaluation setting.
Experiment 2 applies the method to the target task: the MSI-H/dMMR gastrointestinal cancer immunotherapy cohort of 77 patients with 293 longitudinal fecal samples, 70 baseline plasma samples, and an independent 29-sample external stool validation set (Multi-omics of the gut microbial ecosystem in the immunotherapy resistance in microsatellite instability-high gastrointestinal cancer patients). The stacked committee trains on the internal cohort with nested, bias-corrected splits and is evaluated once on the external 29-sample set; the number to beat is the 0.83 accuracy that the monolithic XGBoost model reported on that same validation set, re-implemented and re-tuned under our protocol. The multimodal expert fuses species abundances, strain markers, short-chain fatty acids, and cytokines, testing whether the metabolite axis — mechanistically important, given that Lactobacillus gallinarum-derived indole-3-carboxylic acid sensitizes otherwise refractory MSS tumors to anti-PD-1 through the IDO1/kynurenine/aryl hydrocarbon receptor axis (Lactobacillus gallinarum-derived metabolites boost anti-PD1 efficacy in colorectal cancer by inhibiting regulatory T cells through modulating IDO1/Kyn/AHR axis) — adds predictive weight beyond taxonomy.
Experiment 3 uses the MiST4 mesothelioma trial as a stress test and an interpretability anchor. With only 17 samples carrying 16S data, it is too small to train on; instead it serves as an external probe for models trained on the MSI-H cohort and on the pre-trained representations, and as the ground truth for explanation recovery: the committee's aggregated explanation should concentrate weight on the Prevotella/Butyricicoccus versus Erysipeloclostridium direction that the hand-crafted rheostat identified (AUC 0.94 in-cohort, far above uniparental disomy at 0.55 or homologous recombination deficiency at 0.71) (A gut microbiota rheostat forecasts responsiveness to PD-L1 and VEGF blockade in mesothelioma). Experiment 4, a secondary extension, applies temporal ensembling — averaging checkpoints and experts across time, as used in multilingual grapheme-to-phoneme conversion (One Model to Pronounce Them All: Multilingual Grapheme-to-Phoneme Conversion With a Transformer Ensemble; Checkpoint Ensembles: Ensemble Methods from a Single Training Process) — to the 293 longitudinal samples to ask whether the Bifidobacterium species shifts that preceded acquired resistance can be detected before clinical progression.
Baselines
The naive reference point is a prevalence predictor that assigns every patient the cohort's majority outcome (disease control versus progression), giving AUC 0.5 and accuracy equal to the base rate; any model must beat this by a confidence interval, not a point estimate, to count at all. The strongest published competitor on the exact target task is the monolithic XGBoost model combining species and pathway features, which reported accuracy 0.83 on an independent 29-sample external validation set (Multi-omics of the gut microbial ecosystem in the immunotherapy resistance in microsatellite instability-high gastrointestinal cancer patients); it will be re-implemented with the same feature pipeline, the same external test set, and the same tuning budget (a fixed search over depth, learning rate, and feature selection), so the comparison isolates the ensemble rather than data handling. The strongest published biomarker of any kind is the hand-crafted microbiota rheostat, a log-ratio of responder-enriched over non-responder-enriched genera that reported AUC 0.94 in the MiST4 16S subset (A gut microbiota rheostat forecasts responsiveness to PD-L1 and VEGF blockade in mesothelioma); it will be evaluated on identical splits with bootstrap confidence intervals, and beating it means the ensemble's interval excludes the rheostat's AUC on the same samples. On the cross-cohort benchmark, Random Forest with bias-corrected selection, reported at validated test AUC 0.758 on the ML4Microbiome collection (Machine learning approaches in microbiome research: challenges and best practices), is the strongest single-algorithm baseline and is re-run under our leave-one-cohort-out protocol. The most dangerous baseline is a linear probe on the self-supervised representations pre-trained on 85,364 samples, since that approach improved cross-cohort generalizability by up to 81% in prior evaluations (Self-Supervised Representation Learning for Microbiome Improves Downstream Prediction in Data-Limited Settings and Cross-Cohort Generalizability); it runs both standalone and as a committee member, under the same compute and tuning budget. Finally, two ablations isolate the proposal's key ingredients: a homogeneous ensemble of XGBoost models differing only in random seeds, which tests whether diversity of error under shift matters rather than mere averaging, and the full diverse committee fused by a stacker trained on ordinary random cross-validation instead of leave-one-cohort-out predictions, which tests whether shift-aware meta-training matters rather than member diversity alone.
Why not just…?
Why not just use the three-genus rheostat? It is beautifully simple and reached AUC 0.94 in its own cohort (A gut microbiota rheostat forecasts responsiveness to PD-L1 and VEGF blockade in mesothelioma), but that estimate comes from 17 patients with no external microbiome validation, exactly the regime where the ML4Microbiome consortium showed uncorrected evaluation can inflate AUC by up to 20 points (Machine learning approaches in microbiome research: challenges and best practices). The proposal runs the rheostat head-to-head with bias-corrected intervals, and if its confidence interval survives on external data, the simple biomarker wins and the paper should say so. The honest defense of the ensemble is not that it must beat 0.94 in-cohort, but that a biomarker cannot be deployed on the strength of an unvalidated n = 17 result.
Why not just tune one XGBoost or AutoML pipeline harder? This is the field's current default, from the MSI-H cohort's single XGBoost (Multi-omics of the gut microbial ecosystem in the immunotherapy resistance in microsatellite instability-high gastrointestinal cancer patients) to JADBio AutoML in NSCLC, which reached AUC 0.806 without any sequencing at all (Prediction of outcome in patients with non-small cell lung cancer treated with second line PD-1/PD-L1 inhibitors based on clinical parameters: Results from a prospective, single institution study). The limitation is structural: a single model carries one inductive bias into every cohort, and even challenge-winning ensembles degrade sharply under distribution shift — the winning COVID-19-20 ensemble fell from Dice 0.734 on seen sites to 0.598 on unseen ones (Rapid Artificial Intelligence Solutions in a Pandemic - The COVID-19-20 Lung CT Lesion Segmentation Challenge). Experiment 1 settles this directly: if a well-tuned monolithic model matches the diverse stacker under leave-one-cohort-out rotation, the core claim is falsified and I will report it as such.
Why not just use the pre-trained self-supervised representations with a linear probe? This is a genuine threat, and I won't argue around it: the representation work is the only approach in the file with direct evidence of cross-cohort robustness, improving transfer by up to 81% (Self-Supervised Representation Learning for Microbiome Improves Downstream Prediction in Data-Limited Settings and Cross-Cohort Generalizability). That is why it sits inside the committee rather than outside it. The decisive comparison is the probe alone versus the full stack under identical leave-one-cohort-out conditions; if the probe alone matches the ensemble, the proposal collapses to a replication and extension of that work onto immunotherapy cohorts — still useful, but a different and smaller paper, and the experiments are designed so this outcome would be unambiguous.
Why not just use clinical metadata — antibiotics, BMI, metastasis sites — and skip sequencing? The NSCLC AutoML signature reached AUC 0.806 and 81% accuracy from four clinical variables (Prediction of outcome in patients with non-small cell lung cancer treated with second line PD-1/PD-L1 inhibitors based on clinical parameters: Results from a prospective, single institution study), at a fraction of the cost. But proxies are diagnostic, not actionable: knowing that antibiotics predict failure does not tell you which microbial ecology to restore, whereas the mechanistic literature points to concrete interventions — fecal microbiota transplantation from responders and L. gallinarum-derived metabolites that resensitize refractory tumors (Multi-omics of the gut microbial ecosystem in the immunotherapy resistance in microsatellite instability-high gastrointestinal cancer patients; Lactobacillus gallinarum-derived metabolites boost anti-PD1 efficacy in colorectal cancer by inhibiting regulatory T cells through modulating IDO1/Kyn/AHR axis). The proposal therefore includes clinical-proxy experts inside the committee, so the question becomes empirical: does the microbiome add predictive and explanatory value on top of what the chart already contains?
Decisive Checks
Three outcomes would decide the proposal. If, under leave-one-cohort-out rotation on the ML4Microbiome collection, the shift-diversified stacker does not beat the best single expert and the best homogeneous seed ensemble by non-overlapping confidence intervals, the core claim is wrong. If the stacker's learned weights collapse onto a single expert, the committee adds cost without value. And if the aggregated explanation fails to recover the known biology — the Bacteroides caccae/Alistipes putredinis and short-chain-fatty-acid signals in MSI-H responders, or the Prevotella/Butyricicoccus versus Erysipeloclostridium direction in mesothelioma — then whatever accuracy it achieves is not tracking the gut–tumor axis and should not be used to justify microbial intervention. I would rather publish the first careful, bias-corrected, cross-cohort evaluation of microbiome immunotherapy predictors — even with a negative ensemble result — than another single-cohort AUC that will not survive contact with a second hospital.
References
- Multi-omics of the gut microbial ecosystem in the immunotherapy resistance in microsatellite instability-high gastrointestinal cancer patients
- A gut microbiota rheostat forecasts responsiveness to PD-L1 and VEGF blockade in mesothelioma
- Machine learning approaches in microbiome research: challenges and best practices
- Self-Supervised Representation Learning for Microbiome Improves Downstream Prediction in Data-Limited Settings and Cross-Cohort Generalizability
- Microbiome-based disease prediction with multimodal variational information bottlenecks
- Prediction of outcome in patients with non-small cell lung cancer treated with second line PD-1/PDL-1 inhibitors based on clinical parameters: Results from a prospective, single institution study
- A Comprehensive Survey on Imbalanced Data Learning
- Lactobacillus gallinarum-derived metabolites boost anti-PD1 efficacy in colorectal cancer by inhibiting regulatory T cells through modulating IDO1/Kyn/AHR axis
- One Model to Pronounce Them All: Multilingual Grapheme-to-Phoneme Conversion With a Transformer Ensemble
- Checkpoint Ensembles: Ensemble Methods from a Single Training Process
- Rapid artificial intelligence solutions in a pandemic - The COVID-19-20 Lung CT Lesion Segmentation Challenge