Table of Contents
Fetching ...

Revealing the temporal dynamics of antibiotic anomalies in the infant gut microbiome with neural jump ODEs

Anja Adamov, Markus Chardonnet, Florian Krach, Jakob Heiss, Josef Teichmann, Nicholas A. Bokulich

TL;DR

The study addresses anomaly detection in irregularly sampled multivariate time series by introducing Neural Jump ODEs (NJODEs) that learn conditional mean and variance trajectories to produce calibrated anomaly scores. The framework is validated on synthetic data and applied to infant gut microbiome trajectories, where antibiotic perturbations are quantified and linked to duration, timing, and covariates such as delivery mode and diet. Key findings include robust detection of diverse anomaly types, extended perturbations after second antibiotic courses, and predictive capability that outperforms diversity-based baselines, with potential translational impact for optimizing antibiotic regimens. The approach handles uneven sampling, incorporates covariates, and offers a generalizable tool for real-time monitoring of microbial perturbations with possible extensions to multivariate microbiome features and causal analyses.

Abstract

Detecting anomalies in irregularly sampled multi-variate time-series is challenging, especially in data-scarce settings. Here we introduce an anomaly detection framework for irregularly sampled time-series that leverages neural jump ordinary differential equations (NJODEs). The method infers conditional mean and variance trajectories in a fully path dependent way and computes anomaly scores. On synthetic data containing jump, drift, diffusion, and noise anomalies, the framework accurately identifies diverse deviations. Applied to infant gut microbiome trajectories, it delineates the magnitude and persistence of antibiotic-induced disruptions: revealing prolonged anomalies after second antibiotic courses, extended duration treatments, and exposures during the second year of life. We further demonstrate the predictive capabilities of the inferred anomaly scores in accurately predicting antibiotic events and outperforming diversity-based baselines. Our approach accommodates unevenly spaced longitudinal observations, adjusts for static and dynamic covariates, and provides a foundation for inferring microbial anomalies induced by perturbations, offering a translational opportunity to optimize intervention regimens by minimizing microbial disruptions.

Revealing the temporal dynamics of antibiotic anomalies in the infant gut microbiome with neural jump ODEs

TL;DR

The study addresses anomaly detection in irregularly sampled multivariate time series by introducing Neural Jump ODEs (NJODEs) that learn conditional mean and variance trajectories to produce calibrated anomaly scores. The framework is validated on synthetic data and applied to infant gut microbiome trajectories, where antibiotic perturbations are quantified and linked to duration, timing, and covariates such as delivery mode and diet. Key findings include robust detection of diverse anomaly types, extended perturbations after second antibiotic courses, and predictive capability that outperforms diversity-based baselines, with potential translational impact for optimizing antibiotic regimens. The approach handles uneven sampling, incorporates covariates, and offers a generalizable tool for real-time monitoring of microbial perturbations with possible extensions to multivariate microbiome features and causal analyses.

Abstract

Detecting anomalies in irregularly sampled multi-variate time-series is challenging, especially in data-scarce settings. Here we introduce an anomaly detection framework for irregularly sampled time-series that leverages neural jump ordinary differential equations (NJODEs). The method infers conditional mean and variance trajectories in a fully path dependent way and computes anomaly scores. On synthetic data containing jump, drift, diffusion, and noise anomalies, the framework accurately identifies diverse deviations. Applied to infant gut microbiome trajectories, it delineates the magnitude and persistence of antibiotic-induced disruptions: revealing prolonged anomalies after second antibiotic courses, extended duration treatments, and exposures during the second year of life. We further demonstrate the predictive capabilities of the inferred anomaly scores in accurately predicting antibiotic events and outperforming diversity-based baselines. Our approach accommodates unevenly spaced longitudinal observations, adjusts for static and dynamic covariates, and provides a foundation for inferring microbial anomalies induced by perturbations, offering a translational opportunity to optimize intervention regimens by minimizing microbial disruptions.

Paper Structure

This paper contains 36 sections, 15 equations, 20 figures, 8 tables.

Figures (20)

  • Figure 1: Overview of the anomaly detection framework design. (a) Schematic of the three neural network components of the NJODE model for inferring the target $y_{t_i}$, with RNN = recurrent neural network and FCNN = fully connected neural network. (b) Description of the three modules of the anomaly detection algorithm.
  • Figure 2: Anomalies detected in simulated time-series. (a) Learned score aggregation weights for different anomaly types. The horizontal axis shows the influence of neighboring scores (past observations on the left and future on the right), while the vertical axis shows the influence of different forecasting horizons. (b) Example plots of anomaly detection on the different synthetic anomaly type test sets. The ground truth path is colored orange when anomalous and blue otherwise. The predicted aggregated scores are in green, and the red line is the score threshold level of 0.5 to label an observation as anomalous. Predicted anomaly regions are shaded in red.
  • Figure 3: Description of microbiome cohort used for training and evaluation of the anomaly framework (a) Distribution of individual microbiome samples of infants with no antibiotics (abx) exposure prior to microbial sample collection (1st column) and infants with microbial samples after abx exposure (2nd column). Orange color highlights samples that were collected up to 3 months after abx exposure. The darkred crosses denote the time points of abx exposure. (b) Distribution of diet weaning and diet milk covariates in microbial samples over the infant's age. (c) Distribution of sample characteristics in the cohort.
  • Figure 4: Insights on anomaly dynamics from individual antibiotics exposures. (a) Individual host trajectories of multi-step ahead scores after the first (score_1), second (score_2) and third (score_3) antibiotic exposures. Because antibiotic exposure times are recorded at half‑month resolution, the first exposure appears concurrent with an alpha diversity observation (see \ref{['sec:DataResolutionProblem']}); however, the exposure may have occurred slightly after the observation in the first plot or slightly before it in the second. (b + c) Distributions of metrics, (b) anomaly scores and (c) alpha diversity differences, prior and after antibiotics exposures. Red vertical lines indicate the timing of each antibiotic exposure. Stars denote the statistical significance of the difference in the metric post-exposure compared to values preceding exposure (* $p < 0.1$, ** $p < 0.05$), where yellow stars represent Mann-Whitney U-tests and green stars represent Wilcoxon tests. The lower plots display the number of samples available within each monthly time bin, with positive x-axis values representing intervals that include the left boundary (e.g., $x=0$ corresponds to $[0,1)$) and $x=-1$ representing the last sample observed in the 3 months prior to antibiotic exposure. In (c), the difference in alpha diversity was calculated as the mean alpha diversity of matched unexposed samples minus that of antibiotic-exposed samples. Samples were matched based on monthly age bin, delivery mode, and dietary status (milk feeding and weaning).
  • Figure 5: Distributions of anomaly scores prior and after individual antibiotics exposures split by (a,b) duration of antibiotics exposure and by (c,d) age of infant at exposure. Red vertical lines indicate the timing of the (a,c) 1st and (b,d) 2nd antibiotic exposures. Stars denote the statistical significance of the difference in the metric post-exposure compared to values preceding exposure (* $p < 0.1$, ** $p < 0.05$), where yellow stars represent Mann-Whitney U-tests and green stars represent Wilcoxon tests. The lower plots display the number of samples available within each monthly time bin, with positive x-axis values representing intervals that include the left boundary (e.g., $x=0$ corresponds to $[0,1)$) and $x=-1$ representing the last sample observed in the 3 months prior to antibiotic exposure.
  • ...and 15 more figures