A Cross-Cohort Trajectory Bank for Judging Single-Case Microbiome Reports

When clinicians track a single patient's microbial ecosystem over time, they see rich dynamics but cannot tell whether what they are seeing is a reproducible biological pattern or one person's idiosyncrasy. A four-year study of an adolescent with hypophosphatasia tracked a collapsing periodontal community and a Porphyromonas gingivalis bloom that receded after treatment, yet the authors had to concede that a single patient cannot show whether that bacterium is a universal driver of the disease or a private colonizer of one mouth (Watanabe et al.). A single-patient report of low-dose interleukin-2 reversing immunotherapy-induced blistering showed the same boundary: striking longitudinal recovery, no way to estimate population reproducibility (Zhang et al.). Large longitudinal cohorts have the opposite problem: tools that model one cohort's dynamics in isolation (BGOB; DeepMicroGen) average away the individual, and the one framework that harmonizes microbiome evidence across studies (Melody) only works on cross-sectional snapshots.

This proposal builds the missing bridge: a cross-cohort trajectory bank — a harmonized population of continuous-time microbial trajectories assembled from heterogeneous longitudinal cohorts — together with an error-controlled sequential test that scores a single new patient's time series against it. The output for any single case is one of three calibrated statements: this trajectory is typical of a known subtype, it is a statistical outlier, or it resembles nothing in the bank and warrants cohort follow-up. That third statement is precisely what today's literature cannot make, and it is what turns a case report from an anecdote into a ranked hypothesis.

Core Claim

The claim is that study heterogeneity in longitudinal microbiome data can be absorbed by two per-study corrections — a compositional shift vector and a monotone time-warp — layered on top of a shared continuous-time dynamics model, and that a single case can then be judged against the resulting bank with anytime-valid error control. The first correction extends Melody's study-specific shift parameter $\delta_\ell$, which separates sequencing-composition artifacts from true abundance differences, from a static setting to trajectories. The second handles the fact that different cohorts visit on different schedules, which is what defeats naive pooling (Jun Ke et al.; Jiaxin Yang et al.). Crucially, we drop Melody's assumption that only a sparse subset of taxa change, because the longitudinal literature shows the opposite during real perturbations: antibiotic shocks and acute exacerbations move more than half the community at once (Li et al., 2022; Mayhew et al., 2018).

Research Program

Three components, each reusing a technique the file already validates in a narrower setting.

First, a within-cohort dynamics model. Each subject $i$ in study $\ell$ gets a latent trajectory function $z_i(\cdot)$ over continuous time, implemented as a Neural ODE — a network that learns how the system's state changes per unit time, so it can be evaluated at any moment, not just at sampled visits. We start from BGOB's design (bidirectional GRU hidden states, a "sureness" weight for noisy observations, outputs bounded to $[0,1]$) and borrow from Neural ODE Processes the idea of learning a distribution over dynamics rather than one rigid system, which is what lets the model quantify its own uncertainty when a new patient has only a few visits. Zeros and taxonomic covariance are handled with the tree-structured logistic-normal decomposition of LTN, which shows that cross-sample heterogeneity alone can generate true zero counts without ad-hoc zero-inflation knobs.

Second, the harmonization layer that couples cohorts. Observations are modeled as

$$y^{(\ell)}_{ij} = \mathrm{softmax}\!\left(z_i\big(w_\ell(t_{ij})\big) + \delta_\ell\right) + \varepsilon_{ij},$$

where $y^{(\ell)}_{ij}$ is the relative-abundance vector for subject $i$ in study $\ell$ at observed visit time $t_{ij}$, $w_\ell$ is a monotone time-warp aligning study $\ell$'s clinical clock to a shared one, $\delta_\ell$ is study $\ell$'s shift vector, and $\varepsilon_{ij}$ is count noise. Because broad shifts are allowed, estimation uses regularization rather than Melody's best-subset selection under sparsity. The warps and shifts are identified by maximizing predictive likelihood of held-out visits, so the bank earns its harmonization rather than assuming it.

Third, the single-case score. For a new patient, we form a likelihood-ratio martingale

$$M_t = \prod_{j \le t} \frac{p_{\text{bank}}(y_j \mid y_{<j})}{p_{\text{null}}(y_j \mid y_{<j})},$$

the running product of the probability the bank assigns to each new observation divided by the probability under a broad, subtype-mixture-free null. We flag the case as atypical when $M_t \ge 1/\alpha$; by Ville's inequality the false-positive rate stays below $\alpha$ no matter how often we check. This imports the error-control machinery of Anytime-valid inference in N-of-1 trials, which showed that naive repeated testing inflates false positives to 60% against a nominal 5%, while replacing their randomized treatment-block design (30–100 crossover blocks, a scalar outcome) with observational, high-dimensional predictive likelihoods — the only form available for natural disease progression, since real case reports are never randomized crossovers.

Baselines

The do-nothing reference is pooling all cohorts' raw counts, applying standard batch correction, and fitting one mixed model. Melody documents why this fails: batch correction distorts biological signal, and Melody outperformed pooled approaches (MMUPHin, ALDEx2, ANCOM-BC2) in precision-recall on synthetic benchmarks. We will still run it, on the same masking grids and with the same tuning budget, so the cost of ignoring heterogeneity is measured rather than asserted.

The simplest imputation competitor is MICE plus cubic splines, which DeepMicroGen evaluated directly: on the real DIABIMMUNE infant cohort, MICE reached a mean absolute error of 1.816 versus DeepMicroGen's 1.609, and spline-style smoothing left both the VicGen and IBDMDB cohorts with zero statistically significant species in BGOB's differential-abundance tests. The strongest interpolation competitors are DeepMicroGen itself (MAE 1.609 on real DIABIMMUNE, 1.866 on simulation, robust across 10–80% missingness) and BGOB (a 28.07% RMSE improvement over standard GOB at initial time points on synthetic benchmarks). Both will be run as published, per cohort, under our identical masking protocols; the fair comparison is that these models get the same target-cohort training data we give our per-cohort module, and our advantage must come from cross-cohort transfer, which they structurally cannot do.

The strongest cross-study competitor is Melody, run on baseline-visit snapshots of the same cohorts, judged on leave-one-study-out Jaccard stability of recovered signatures, its own reported strength. For single-case judgment, the strongest competitor is an adaptation of the anytime-valid confidence sequences of Anytime-valid inference in N-of-1 trials applied to a scalar summary (Shannon diversity) of the case's series — it controls error but cannot borrow population information, so it can say "this patient changed" but never "this patient's pattern is new to the population." On the FEDN schizophrenia cohort, the strongest static baseline is the 10-genus Random Forest classifier of Yuan et al. (2021), which achieved AUC = 0.867 on their verification set; we retrain it on the same split and ask whether trajectory features beat static baseline abundances. Finally, the key ablation removes the harmonization layer (a single global dynamics model with no $w_\ell$ or $\delta_\ell$), and a second abation swaps the martingale threshold for a fixed-horizon test; together they isolate whether the gains come from harmonization and from sequential calibration respectively.

Why not just…?

Why not just pool the data and batch-correct? Because the one study in the file that tested pooling against a principled alternative found it wanting: Melody reports that pooled approaches with batch correction distort biological signals and were consistently beaten in precision-recall, and raw individual-level sharing across institutions raises privacy barriers that summary-level harmonization avoids. Our first experiment includes this baseline anyway so the cost is quantified on our data, not inherited.

Why not just impute with MICE or splines and run standard longitudinal regression? The file contains direct head-to-head evidence: MICE's MAE of 1.816 on DIABIMMUNE versus 1.609 for DeepMicroGen, and BGOB's finding that differential-abundance testing on raw or spline-smoothed irregular series found zero significant species in both VicGen and IBDMDB, while continuous-time interpolation recovered five caries-associated species including S. mutans. Standard smoothing demonstrably erases the signal we need.

Why not just compute per-cohort summary features (slopes, Markov transition matrices) and run a classical random-effects meta-analysis? This is the most serious alternative, and part of it would probably work: Mayhew et al. (2018) showed individual transition matrices are repeatable ($P < 0.001$ for bacterial exacerbations), so summarizing per patient is not meaningless. But the two-stage route breaks in three documented ways: divergent outcome definitions and follow-up durations force narrative rather than quantitative pooling (Jiaxin Yang et al.; Jun Ke et al.; Ning Qin); uncorrected relative-abundance summaries fail cross-study validation (Melody); and coarse transition summaries discard timing, which is exactly where single-case evidence lives. Most decisively, a pooled effect size cannot answer the N=1 question — it yields a population average, not a calibrated verdict on whether one new trajectory is typical. We will nevertheless run this baseline; if it matches our bank on cross-cohort interpolation, the harmonization component is not earning its complexity and we would fall back to the two-stage route for that part, keeping the martingale scoring as the contribution.

Why not just run an anytime-valid N-of-1 test on the case? Anytime-valid inference in N-of-1 trials already delivers strict error control under continuous monitoring, so why build anything? Because their design requires randomized treatment-block crossovers (30–100 blocks) and a scalar outcome; observational microbial time series from case reports satisfy neither. And without a population model behind it, the test detects that the patient changed, not what the change means. Our approach keeps their error guarantee and adds the reference distribution the verdict depends on.

Proposed Experiments

Experiment one measures cross-cohort transfer on DIABIMMUNE, the Finnish–Estonian–Russian infant cohort with species-level counts to 28 months, treating each country as a separate study with its own visit schedule. Visits are masked at 10–80% missingness under MCAR, MAR, and MNAR, matching DeepMicroGen's protocol; the model trains on two countries and predicts held-out visits in the third. Beating MICE's reported 1.816 is the floor; matching DeepMicroGen's 1.609 within-cohort while transferring zero-shot across countries — which no published model here can do — is the target. BONUS-CF serves as a second transfer target; no reported result found on Lacuna for BONUS-CF alone, so we will establish its reference numbers ourselves under the published masking grids.

Experiment two asks whether harmonization preserves discovery. On VicGen and IBDMDB, where raw and spline-smoothed data yielded zero significant species but BGOB interpolation recovered caries- and disease-associated taxa, we test whether the bank's cross-cohort estimates replicate signatures under leave-one-study-out, measured by Jaccard stability directly against Melody's snapshot-based stability on the same cohorts.

Experiment three is the pseudo-case-report benchmark. Each of the 101 COPD patients in the AERIS cohort (584 sputum samples, one year) is held out in turn and scored against a bank built from the remaining patients. Because Mayhew et al. established that bacterial-exacerbation transition patterns are repeatable within patients ($P < 0.001$), the ground truth exists: a held-out patient's trajectory should be recognized as belonging to their own phenotype. We report detection AUC and early-warning lead time relative to a baseline-visit-only static classifier, plus empirical false-positive rates when null trajectories are drawn from the bank itself — which must stay below 0.05 at every monitoring length, against the 60% inflation documented for naive sequential testing.

Experiment four tests whether dynamics beat statics on the FEDN schizophrenia cohort, using Yuan et al.'s own verification split: the bar is the 10-genus Random Forest's AUC of 0.867, and the secondary check is whether the bank recovers their baseline poor-response signals (Lachnoclostridium, $p = 0.005$; Romboutsia, $p = 0.006$) and adds predictive value from the 24-week trajectory. Experiment five is the stress test that defines our boundary: we simulate perturbation cascades of increasing breadth, calibrated to the co-amoxiclav regime where a single dose moved most of the community with no recovery at five weeks (Li et al., 2022), and report the cascade breadth at which harmonization degrades — the regime where Melody's guarantees already collapse above 50% of taxa shifting.

Finally, we will format the two motivating real cases — the HPP periodontitis series and the interleukin-2 blistering series — as ingestion demonstrations, and we will be explicit that no reference cohort for either condition exists on Lacuna, so for them the framework can only output the honest verdict "not representable in any current bank," which is itself the call for the cohort follow-up that Watanabe et al. and Zhang et al. each ended their papers asking for.