Post-Antibiotic Glycemic Drift: Treating Antibiotic Courses as Interventions in Personalized Glucose Prediction

Every personalized nutrition model in use today quietly assumes that a person's gut stays put. Machine-learning systems that predict postprandial glycemic response — the blood-glucose curve a specific individual produces after eating a specific meal — lean heavily on a one-time stool sequencing snapshot of the gut microbiome, treated as a fixed personal trait like height. But a single course of broad-spectrum antibiotics can collapse and restructure that microbial community within days, and the disrupted state can persist for months or years. This means the most widely deployed personalized glycemic models are likely to fail exactly when patients are most metabolically vulnerable: during and after infection treatment. The antibiotic resistance crisis makes this worse, not better — rising resistance rates push clinicians toward ever-broader-spectrum, last-resort drugs, which inflict the largest collateral damage on the commensal gut ecosystem that these models depend on.

The proposal in one sentence: build and validate a glycemic forecasting model in which an antibiotic course is an explicit, time-varying intervention whose delayed effect on glucose dynamics is mediated by a learned latent gut-ecology state that is knocked down and slowly recovers, and measure — over months, not days — how much of post-antibiotic glycemic instability this captures that current models miss. This treats personalized glycemic prediction as the core mechanism, the antibiotic-resistance crisis as the perturbation regime that defines the hardest and most clinically relevant test case, and longitudinal outcome tracking as both the methodological lens (lingering treatment effects, short-term follow-up bias) and the evaluation horizon.

Core Claim

Current glycemic prediction rests on what I will call the static ecology assumption. The foundational personalized-nutrition trials established that a model using clinical markers plus stool metagenomics explains 46% of the variance in postprandial glucose spikes, versus only ~18% for universal carbohydrate counting (Effects of personalized diets by prediction of glycemic responses on glycemic control and metabolic health in newly diagnosed T2DM: a randomized dietary intervention pilot trial). The follow-up trial showed the microbiome is not just a predictor but a mediator: a single taxon, UBA11471 sp000434215, mediated 38% of the effect of dietary lipids on HbA1c (Gut microbiome modulates the effects of a personalised postprandial-targeting (PPT) diet on cardiometabolic markers: a diet intervention in pre-diabetes). Yet both studies measured metagenomics only at baseline and six months, and explicitly excluded or treated as confounders participants on antibiotics. The prediction literature is equally blind: the pretrained transformer CGMformer forecasts postprandial responses with a Pearson correlation of 0.763 and predicts Type 2 diabetes up to three years ahead, but its pretraining uses isolated 24-hour glucose segments with no microbiome, no drugs, and no perturbation inputs (A pretrained transformer model for decoding individual glucose dynamics from continuous glucose monitoring data). The causal neural-ODE work H²NCM handles acute shocks (meals, exercise) but nothing slower or pharmacological (Hybrid2 Neural ODE Causal Modeling and an Application to Glycemic Response).

My claim is that this gap is not just unmeasured but structurally unmodelable with existing architectures, and that the missing piece already has a proof of concept in a different organ system. Soleimani, Subbaswamy, and Saria showed in ICU patients that a Linear Time-Invariant dynamical system convolving drug dosage with a learned impulse response function — combined with multi-output Gaussian processes over correlated physiological markers — isolates lingering treatment effects from underlying disease trends, beating BART by 15% and LSTM by 8% on 7-day-ahead renal-marker trajectories (Learning Treatment-Response Models from Multivariate Longitudinal Data). Nobody has applied this treatment-response convolution idea to ambulatory glucose with the gut ecosystem as the mediating state. Meanwhile, the resistance literature documents that the perturbation regime is intensifying: carbapenem resistance in Acinetobacter baumannii has reached roughly 80% in Chinese surveillance networks (Hui Zhang et al.), and last-resort resistance determinants like mcr-9 co-localize with carbapenemases on single conjugative plasmids (Kewang Hu et al.; Jie Li), meaning the antibiotics most likely to be prescribed are precisely those with the widest commensal collateral damage.

Research Program

The model I propose to build, tentatively called Abx-GlucoDyn, has three components.

First, an antibiotic impulse-response module. Each antibiotic course is encoded as a time series of doses. Its effect on glucose dynamics enters through a learned, individualized impulse response $h_i(t)$, so that the perturbation to the host's glucose-insulin dynamics at time $t$ is the convolution $(h_i * u)(t)$, where $u$ is the dose history, in the style of the treatment-response convolution of Soleimani et al. But unlike their linear ICU setting, the impulse response here is not fixed: it is modulated by a latent ecology state.

Second, a latent gut-ecology state that is knocked down and recovers. A low-dimensional latent variable $z_t$ represents the functional capacity of the commensal community (broadly: fermentation and short-chain-fatty-acid production capacity that the personalized-prediction literature shows matters for glycemic control). It obeys a simple learned two-rate ordinary differential equation: antibiotic dosage drives $z_t$ downward at a spectrum-dependent rate, and $z_t$ recovers toward its baseline at an individual-specific slow rate. The gut-absorption and insulin-sensitivity parameters of the glucose ODE are functions of $z_t$. This builds directly on the neural-ODE line: Wang et al. showed that learning gut absorption profiles $a_i(t)$ from meal covariates rather than using heuristic fixed curves yields roughly tenfold better forecasts (Learning Absorption Rates in Glucose-Insulin Dynamics from Meal Covariates), and my proposal extends "learned absorption" from meal covariates to drug covariates.

Third, an ordinal causal loss in the spirit of H²NCM, extended from acute rankings to antibiotic rankings. H²NCM showed that unconstrained Transformers, despite good predictive error, fail catastrophically at causal ranking — 60–80% error, no better than random guessing at 67% — while a domain-knowledge ordinal loss drove that to near-zero (Hybrid2 Neural ODE Causal Modeling and an Application to Glycemic Response). The analogous ordinal constraints here are clinical and ecological priors: broader-spectrum antibiotics perturb glycemic stability more than narrow-spectrum ones at comparable exposure; longer courses perturb more than shorter ones; and recovery trajectories are monotone non-decreasing in the absence of further perturbation. Training with these constraints prevents the model from learning, say, that a carbapenem course improves glucose control because in the training data sicker patients happened to be monitored more intensively.

A companion deliverable addresses cost. GenoARM demonstrated that a reinforcement-learning-selected panel of just 5 genes plus metadata achieves 93.77% resistance-prediction accuracy in E. coli, with 15 genes matching a full set of roughly 200 (Optimizing Gene-Based Testing for Antibiotic Resistance Prediction). The open question it raises for my setting — flagged as a genuine tension in the literature — is whether post-antibiotic glycemic drift is driven by broad community shifts requiring deep shotgun metagenomics, or by a small panel of resistance and metabolic-pathway markers. I will test both: a GenoARM-style sparse panel over resistome and fermentation-pathway markers versus full metagenomic profiling, as a feature-sparsity experiment within the same model.

On data, honesty is required: no reported result found on Lacuna for any public CGM dataset with antibiotic-exposure labels linked to glucose trajectories and microbiome sequencing. GlucoBench aggregates the five public CGM datasets (Broll, Colas, Dubosson, Hall, Weinstock) with meal, insulin, and activity covariates but, per the benchmark description, no drug-exposure records (GlucoBench: Curated List of Continuous Glucose Monitoring Datasets with Prediction Benchmarks). The 1.3-million-patient-day real-world CGM corpus behind CGMformer has self-reported metabolic status but no medication link reported. So the program has two phases: a prospective observational cohort of roughly 80–120 adults with Type 2 diabetes or pre-diabetes who are prescribed standard-of-care antibiotic courses (design powered by the trajectory variance seen in the PPT trials), with continuous glucose monitoring for 12 weeks, stool shotgun metagenomics and targeted resistome panels at weeks 0, 1, 6, and 12, and a matched non-exposed control group; and, retrospectively, an attempt to mine antibiotic exposure from medication logs in existing large CGM corpora to at least fit the impulse-response component before prospective data matures. Clinical endpoints follow the standardized metrics computed by the iglu toolkit (iglu: Interpreting Glucose Data from Continuous Glucose Monitors) — time-in-range, glycemic variability, and postprandial excursion — evaluated over the full 12 weeks, because the longitudinal-tracking literature is unambiguous that shorter windows hide the relevant biology: periprosthetic infections emerge years after implantation and are invisible at 90 days, and inpatient databases miss everything after discharge (15. ĐÁNH GIÁ HIỆU QUẢ BƠM VANCOMYCIN TRONG XƯƠNG DỰ PHÒNG TRONG PHẪU THUẬT THAY KHỚP GỐI; Osteoporosis exacerbates perioperative complications in total knee arthroplasty: a 10-Year nationwide analysis).

Baselines

The "do nothing" reference point is the deployed status quo: universal carbohydrate counting as a glycemic predictor. It is weak — it explains only about 18% of the variance in postprandial glucose spikes (Effects of personalized diets... T2DM) — but it is what most dietary guidance actually uses, and it sets the floor that any multi-modal model must clear by a wide margin to justify its cost. The second reference point, closer to practice in the field, is the static personalized model: a gradient-boosted or similar model trained on the pre-antibiotic baseline of clinical markers plus stool metagenomics, of the kind that reached 46% explained variance in the pilot trial and $R = 0.64$ for predicting changes in time spent in high-glucose zones in the pre-diabetes RCT (Effects of personalized diets... T2DM; Gut microbiome modulates the effects of a personalised postprandial-targeting (PPT) diet). This is the baseline that embodies the static ecology assumption my proposal attacks, so beating it specifically during the post-antibiotic window — not on pooled data — is the decisive comparison.

The strongest existing method for the forecasting task itself is the fine-tuned CGMformer with its diet module, which reports a Pearson correlation of 0.763 for postprandial glucose prediction (A pretrained transformer model for decoding individual glucose dynamics from continuous glucose monitoring data). On the GlucoBench short-horizon task, a Transformer achieved an RMSE of 13.22 mg/dL on the largest dataset (Weinstock), and simple classical models like ARIMA and Linear Regression frequently beat deep architectures on the smaller datasets (GlucoBench). All baselines will be run on the same prospective cohort with the same train/validation splits by participant, the same CGM hardware, and a matched hyperparameter-tuning budget (the same number of random-search trials and GPU-hours per model); deep baselines will be initialized from the same public pretrained weights where applicable. The comparison that counts is not pooled accuracy but the degradation curve: week-by-week postprandial prediction error for weeks 0–12 after the antibiotic course. Abx-GlucoDyn wins if its post-antibiotic-window prediction error is materially lower than every antibiotic-naïve baseline's (I will pre-register a threshold of at least a 20% relative RMSE reduction in weeks 1–6, since smaller gains would not justify the added sequencing burden), and if it correctly ranks perturbation magnitude across antibiotic classes where the baselines, being blind to the event, cannot rank at all. The key ablation removes the impulse-response and latent-ecology modules while keeping everything else (data, architecture, tuning) fixed — an antibiotic-naïve version of my own model. This isolates whether the gains come from the proposed mechanism or simply from having antibiotic exposure as an input feature, and its causal-ranking error will be compared against the full model exactly as H²NCM compared constrained versus unconstrained variants.

Why not just…?

Why not just fine-tune CGMformer on antibiotic-exposed CGM data? This is the most serious alternative, and I want to be honest about it: if antibiotic-exposure labels were plentiful, a large pretrained sequence model given exposure as an input token might learn much of the drift pattern implicitly. Two pieces of evidence temper that hope. First, CGMformer's pretraining is built on isolated 24-hour segments, so it never sees multi-week recovery trajectories in the first place, and its authors note the design omits pharmacological perturbations (A pretrained transformer model...) — fine-tuning cannot recover structure the pretraining never exposed. Second, black-box recurrent models demonstrably degrade as the prediction horizon lengthens: the LSTM was beaten by 8% on 7-day-ahead trajectories precisely because it lacked explicit lingering-effect structure (Learning Treatment-Response Models from Multivariate Longitudinal Data), and my horizons are 12 weeks. The proposal's experiments settle this directly: the fine-tuned CGMformer variant is a baseline, and if it matches Abx-GlucoDyn on the degradation curve, the simpler route wins and I will say so.

Why not just wait for the microbiome to recover and re-run the baseline model? This is what clinical practice effectively does, and it fails for two reasons. Re-baselining requires a fresh stool sequencing run per patient per course — the cost the sparse-marker experiment is designed to cut — and it leaves weeks of degraded recommendations. More fundamentally, the resistome literature indicates recovery is not guaranteed to return to baseline: resistance determinants move on conjugative plasmids that persist and recombine across taxa (Lingyi Zeng et al.), so the post-recovery community may be a permanently different, more resistant, metabolically altered ecosystem. The prospective cohort's week-0-versus-week-12 paired metagenomics directly tests whether reversion to baseline actually happens; if it does in most participants, the "just wait" strategy gains support and the model's recovery-rate component becomes less important than its drift-detection component.

Why not just track HbA1c or standard clinical markers to detect post-antibiotic metabolic damage? Because static markers demonstrably miss dynamic risk: the CGMformer analysis found that conventional metrics overlook a cluster of lean, apparently healthy individuals at high Type 2 diabetes risk, with latent glucose representations catching it (A pretrained transformer model...). And because the endpoints that matter here — glycemic volatility and time-in-range over weeks — are exactly what HbA1c's three-month average obscures. The proposal measures both, so the experiment itself quantifies how much the cheap marker misses.

Why not just add a heuristic antibiotic term to a mechanistic glucose ODE like UVA/Padova? Because mechanistic models with hand-specified dynamics already lose in less perturbed settings: the FDA-approved UVA/Padova model was outperformed in RMSE by the hybrid H²NCM on real exercise data (Hybrid2 Neural ODE Causal Modeling...), and heuristic absorption functions were beaten roughly tenfold by learned ones (Learning Absorption Rates...). A heuristic "antibiotic damping" term would have to guess the very quantities — knockdown depth, recovery rate, spectrum scaling — that this proposal learns from data.

Proposed Experiments and Decisive Checks

Experiment one is the model-drift audit: train each baseline on pre-antibiotic data and evaluate postprandial prediction error week by week for 12 weeks after the course. The expected signature is a sharp error spike in weeks 1–2 for all antibiotic-naïve models, a slow decay, and a substantially flatter curve for Abx-GlucoDyn. Experiment two is the causal-ranking test, mirroring H²NCM's evaluation: after training, ask each model to rank which of two antibiotic courses (differing in spectrum breadth or duration) produces the larger glycemic perturbation. H²NCM showed unconstrained black-box models fail this kind of test at 60–80% error while causally constrained hybrids achieve near-zero on meal/exercise rankings; my pre-registered target is ranking accuracy significantly above chance across held-out participants, versus near-chance for antibiotic-naïve models that simply cannot represent the event. Experiment three is the feature-sparsity test: fit the full model twice, once with deep shotgun metagenomics and once with a GenoARM-style selected panel of resistome and metabolic-pathway markers, and compare post-antibiotic prediction error. If the sparse panel performs within a few percent of full profiling, the monitoring pipeline becomes two orders of magnitude cheaper and clinically deployable; if it does not, that is itself a publishable negative result resolving the dimensionality tension the two literatures pose. The fourth check is external validity: evaluate on the out-of-distribution unseen-patient protocol GlucoBench emphasizes, since that benchmark showed deep architectures only earn their complexity on unseen-patient cold starts (GlucoBench).

The decisive question underneath everything is a measurement, not a model: does a standard antibiotic course cause clinically meaningful, multi-week glycemic dysregulation that existing personalized models cannot see? If the prospective cohort shows no meaningful drift — if glucose dynamics are far more robust to ecological disruption than the microbiome-mediation results suggest (Gut microbiome modulates the effects of a personalised postprandial-targeting (PPT) diet) — the modeling program collapses to a modest negative finding about the static ecology assumption. That possibility should be stated plainly; it is the risk that makes the prospective phase worth funding at all.

References

  1. Effects of personalized diets by prediction of glycemic responses on glycemic control and metabolic health in newly diagnosed T2DM: a randomized dietary intervention pilot trial
  2. Gut microbiome modulates the effects of a personalised postprandial-targeting (PPT) diet on cardiometabolic markers: a diet intervention in pre-diabetes
  3. A pretrained transformer model for decoding individual glucose dynamics from continuous glucose monitoring data
  4. Hybrid2 Neural ODE Causal Modeling and an Application to Glycemic Response
  5. Learning Treatment-Response Models from Multivariate Longitudinal Data
  6. Antimicrobial Activity of Colistin Against Contemporary (2015 – 2017) P. aeruginosa and A. baumannii Isolates From a Chinese Surveillance Program
  7. Molecular characterization of NDM-1-producing carbapenem-resistant E. cloacae complex from a tertiary hospital in Chongqing, China
  8. Molecular antibiotic resistance mechanisms and co-transmission of the mcr-9 and metallo-β-lactamase genes in carbapenem-resistant Enterobacter cloacae complex
  9. Learning Absorption Rates in Glucose-Insulin Dynamics from Meal Covariates
  10. Optimizing Gene-Based Testing for Antibiotic Resistance Prediction
  11. GlucoBench: Curated List of Continuous Glucose Monitoring Datasets with Prediction Benchmarks
  12. iglu: Interpreting Glucose Data from Continuous Glucose Monitors
  13. 15. ĐÁNH GIÁ HIỆU QUẢ BƠM VANCOMYCIN TRONG XƯƠNG DỰ PHÒNG TRONG PHẪU THUẬT THAY KHỚP GỐI
  14. Osteoporosis exacerbates perioperative complications in total knee arthroplasty: a 10-Year nationwide analysis
  15. Microbial Characteristics and Genomic Analysis of an ST11 Carbapenem-Resistant Klebsiella pneumoniae Strain Carrying blaKPC−2 Conjugative Drug-Resistant Plasmid