Abstract
Graphical abstract
Abstract
Objective
Preterm birth (PTB) is one of the leading issues concerning infant health and is a problem that plagues all parts of the world. Vaginal microbial communities have recently garnered attention in the context of PTB; however, the vaginal microbiome varies greatly from individual to individual, and this variation is more pronounced in racially, ethnically, and geographically diverse populations. Additionally, microbial communities have been reported to evolve during the duration of the pregnancy, and capturing such a signature may require higher, more complex modeling paradigms. In this study, we develop a neural controlled differential equation (CDE)-based framework for identifying early PTBs in racially diverse cohorts from irregularly sampled vaginal microbial abundance data.
Methods
We obtained relative abundances of microbial species within vaginal microbiota using 16S rRNA sequences obtained from vaginal swabs at various stages of pregnancy. We employed a recently introduced deep learning paradigm known as ‘neural CDEs’ to predict PTBs. This method, previously unexplored, analyzes irregularly sampled microbial abundance profiles in a time-series format.
Results
Our framework is able to identify signatures in the temporally evolving vaginal microbiome during trimester 2 and can predict incidences of PTB (mean test set ROC–AUC = 0.81, accuracy = 0.75, F1 score = 0.71) significantly better than traditional ML classifiers, thus enabling effective early-stage PTB risk assessment.
Conclusion and significance
Our method is able to differentiate between term and preterm outcomes with a substantial accuracy, despite being trained using irregularly sampled microbial abundance profiles, thus overcoming the limitations of traditional time-series modeling methods.
Introduction
Preterm births (PTBs) are live births that occur before 37 weeks of pregnancy and are a major public health concern worldwide. It is estimated that about 15 million babies are born preterm globally each year, putting the global PTB rate at about 11% (Blencowe et al. 2012). PTB is among the leading causes of neonatal mortality and morbidity, especially in low- and middle-income economies (Perin et al. 2022). The global PTB rate is also on a steady rise, thus making it a significant burden (Chawanpaiboon et al. 2019). Approximately 18% of the deaths among children under the age of 5 years occur within the first 28 days of life and can be attributed to complications arising from PTB (Walani 2020). Additionally, it can lead to long-term health complications such as respiratory illnesses, neurodevelopmental disorders, and learning disabilities, arising from the developmental issues associated with PTB (Townsi et al. 2018, Chung et al. 2020). PTB is also not a problem that is specific to underdeveloped or developing countries, although the ill effects of it may be more pronounced in low-income countries. Incidences of PTB are also found in high-income parts of the world, albeit with a lower frequency, and the rates of PTB have not been on the decline either in most parts of the world (Chawanpaiboon et al. 2019).
The pathophysiology behind PTB is not completely understood yet, although certain risk factors, including but not limited to smoking habits, alcohol intake, and reproductive history, have been identified to be associated with increased preterm delivery risk (Blencowe et al. 2012, Pfinder et al. 2013, Stock & Bauld 2020). The ill effects of PTB can be mitigated, and a healthy, full-term gestation outcome may also be achieved if appropriate interventions are administered (Newnham et al. 2014). Their success, however, depends on identifying at-risk subjects at earlier stages of their pregnancy, as these approaches are effective when administered during the earlier stages (Blencowe et al. 2012, Newnham et al. 2014). Current methods for assessing preterm pregnancy outcomes involve the use of physical and biochemical markers, which are not accurately determinative of a potential incidence of premature culmination of pregnancy in the future (Georgiou et al. 2015).
Many non-pathogenic bacteria, viruses, and fungi inhabit various areas of the human body, such as the gut, mouth, and reproductive tracts (Sender et al. 2016), collectively referred to as the ‘microbiome’. Microbiomes are essential for the normal functioning of the respective organs and maintain a symbiotic relationship with the human body, driving key biochemical reactions (Gordon & Pesti 1971), and dysregulated microbiomes are often implicated in various diseases. These microbial communities are also present in the reproductive tracts and have been reported to influence pregnancy outcomes (MacIntyre et al. 2015). There is evidence linking the composition of vaginal microbiomes to the risk of PTB, and the abundance levels of specific microbiota, such as various species of the Lactobacillus genus, have the potential to be indicative of PTB even at earlier stages of pregnancy (Romero et al. 2014, Brown et al. 2019). Vaginal microbial communities can be categorized into specific community state types (CSTs), which are typically characterized by abundances of various Lactobacillus species (Romero et al. 2014). CSTs are associated with increased or decreased risk of abnormalities such as bacterial vaginosis (BV), urinary tract infections (UTIs), and even PTB (Gudnadottir et al. 2022). Moreover, alpha-diversity indices, such as Shannon and Simpson diversity, which can quantify the diversity of vaginal microbiota, have been harnessed for predicting PTB (DiGiulio et al. 2015, Haque et al. 2017). However, the vaginal microbiome differs considerably from individual to individual, especially across races (Gupta et al. 2017, Sun et al. 2022). Additionally, the microbial abundance may further vary depending on the sequence processing methods used on 16S ribosomal RNA (rRNA) data, which is typically used to estimate taxonomic abundance at various levels of classification (Bharti & Grimm 2021). Consequently, the success of diversity indices for estimating PTB risk may be specific to certain cohorts or be influenced by the sequence processing pipeline and, consequently, may not translate across cohorts, as is our observation in this study. Machine learning (ML)-based approaches have also been explored in this context, which leverage features such as the abundance of various taxa, phylotype counts, CST of the vaginal microbiome, age, race, and more, for PTB risk assessment.
The vaginal microbiome evolves as the pregnancy progresses (Romero et al. 2014, MacIntyre et al. 2015), and the numerous changes that it undergoes may contain a signature for identifying PTB risk. Currently, there is a severe lack of approaches that exploit the temporal dynamics of vaginal microbiomes, by looking at it as a time-series problem, for PTB risk assessment, and most current predictive methodologies use static data. Deep learning approaches such as recurrent neural networks (RNNs) have previously been used for modeling the dynamics of the gut and other microbiota in various contexts (Baranwal et al. 2022, Medina et al. 2022, Fung et al. 2023) and have found success. To the best of our knowledge, such methods have not been applied to vaginal microbiota, especially in the context of PTB risk assessment, so far. This may be partly attributed to the fact that RNN-based approaches demand data sampled at regular intervals, which is challenging to collect as study subjects are often irregular in clinical visits. With this study, we present a deep learning-based approach, ‘neural controlled differential equations (CDEs)’, that is capable of differentiating between term and preterm births using time-series vaginal microbiome data, which overcomes the dependence on regularly sampled microbial data. We also highlight the limitations of alpha diversity indices and traditional ML methods for PTB prediction in racially and ethnically diverse patient cohorts. We show that modeling the temporal dynamics of microbiota using deep learning methods results in more reliable PTB risk scoring than simple ML-based methods. Our best model, utilizing neural CDEs, outperforms any ML-based PTB prediction approaches so far. On the basis of this study, we show the potential of vaginal microbiota for PTB prediction and that such approaches can be pushed toward complete clinical viability with further efforts.
Materials and methods
Dataset
We obtained 16S rRNA sequences collected from human patient samples. The data were sourced from a previously published study by Callahan et al. on the refinement of a vaginal microbiome signature of preterm birth (Callahan et al. 2017). The dataset is publicly available under the open-access category in the Sequence Read Archive (SRA), BioProject ID PRJNA393472. It consists of 16S rRNA sequence samples spread across 133 racially and ethnically diverse subjects, sampled at different points of time during the pregnancy.
16S rRNA sequence processing
It has been widely established that the hypervariable regions (V1–V9) within the 16S rRNA gene can be used for phylogenetic studies and genus or species-level classification in diverse microbial populations (Weisburg et al. 1991). Furthermore, certain hypervariable regions (such as the V4) are semi-conserved and can reliably predict specific taxonomic levels (Yang et al. 2016). The procedure to convert the 16S rRNA sequence data to microbial abundance involves various stages of processing. In the first step, quality control checks are performed and sequencing artifacts, low-quality reads, etc., are removed from the read sequences. Secondly, the preprocessed sequences are aligned against a chosen reference database, and a taxonomic class is assigned to each sequence. The sequences are then grouped into clusters, which represent operational taxonomic units (OTUs), based on sequence similarities. Lastly, the abundances of each OTU in samples are estimated (Schloss et al. 2009, Edgar 2013, Callahan et al. 2016, Estaki et al. 2020). The microbial abundance obtained depends on the specific processing steps, and variations in processing steps can result in different abundance values (Schloss et al. 2009, Edgar 2013, Callahan et al. 2016, Estaki et al. 2020).
The dataset (PRJNA393472) derived from SRA contains sequences generated after amplifying and sequencing the V4 hypervariable region of the 16S rRNA gene. We used the DADA2 processing pipeline (Callahan et al. 2016) to derive microbial abundance data from the sequence reads. The metadata and taxonomic abundance tables were generated using the SRA cloud (Katz et al. 2022), and abundances were obtained at various levels of taxonomic classification. We retained genus-level abundances for all our analyses since abundances at further levels were captured at a much lower resolution.
Processing taxonomic abundance data
We eliminated the samples for which metadata information for certain key fields, namely gestational age at the time of sample collection, gestational age at delivery, etc., was missing. We eliminated the genera abundance for samples collected during trimester 3 (gestational age > 24 weeks) for our analyses, with the intention of being able to predict instances of preterm delivery sufficiently early. Furthermore, we removed samples collected during or before the 8th week of gestation, as they were present for very few (6 out of 133) subjects. Furthermore, for some of the analyses, we transformed the genera abundance data to sample-wise relative abundance, and filtered out genera with high skewness and high kurtosis, thus removing some of the genera whose abundances contributed to noise. We retained 70% of the subjects (90 out of 133) as the training dataset, and the rest were used for validating the approaches. The training and test datasets were kept consistent across all the analyses. The processed taxonomic abundance data and the corresponding metadata are made available in the code repository (see ‘Data and code availability’ section).
Diversity metrics
Alpha diversity metrics have been reported to be potentially indicative of preterm birth, with a highly diverse vaginal microbiome correlated with an increased risk of preterm delivery (Hyman et al. 2014, DiGiulio et al. 2015, Haque et al. 2017). We computed Shannon, Simpson, Chao1, and Gini alpha-diversity indices, as well as Taxonomic Composition Skew (TCS) (Haque et al. 2017), a diversity index specifically tailored for the vaginal microbiome. Unlike other diversity indices, TCS takes into account that vaginal microbiomes are usually dominated by the Lactobacillus species, and other genera are in the minority. TCS responds in a different manner to changes in abundances of sparse and dominant taxa and thus may be more suitable for quantifying the diversity in vaginal microbiomes. We checked for statistically significant differences in alpha-diversity index values between the term and preterm classes during various gestational periods using a two-sided independent t-test. The standard diversity metrics were computed using the scikit-bio python library (version 0.5.8).
Traditional ML approaches
We used two ML classifiers, decision tree (DT) and random forest (RF), to predict term/preterm outcomes. This constituted a secondary baseline for benchmarking the performance of higher, more complex deep learning-based prediction approaches. For each patient subject, the microbial abundance profile closest to the week of delivery and obtained during the period between the 9th and the 24th week of gestation, following the hypothesis that the composition of vaginal microbial communities closer to the period of delivery are better indicative of preterm delivery risk. The resultant training and test sets contained 93 and 40 samples, respectively.
Deep learning approaches
Machine learning classifiers, such as support vector classifiers (SVCs), as well as tree-based classifiers such as DT and RF, have been explored extensively for preterm birth prediction using vaginal microbiota, most often in tandem with other features such as physical markers and patient history. However, these classifiers have largely lacked the capability of making reliable predictions. Surprisingly, deep learning models have hardly been explored for this particular problem. Given the time-series nature of the data, we focused on deep learning algorithms for sequential data in this study.
Recurrent neural networks
However, the conventional LSTM system demands a continuous and uniform time-series dataset, i.e. the time steps must represent uniform intervals and the input data should be available for each step. While the taxonomic abundance data is uniformly sampled (week-wise), data for some subjects is not present for some weeks. Additionally, the first week for which data is available is different for each subject, and thus, a zero-vector initialization will not be appropriate for the initial hidden state. To address these issues, we modified the LSTM network accordingly. First, we initialized the hidden state, ht0, with a trainable embedding layer, and the cell state, ct0, was initialized as a zero vector. Secondly, at each time step, we had the LSTM cell generate the taxonomic abundance forecast, xti, at each time step, and used the forecast whenever the input data xti was not available. The final hidden state, htT, was fed to a linear layer with parameters W and b followed by a sigmoid activation, σ(.), to predict the term/pre-term outcome (y). The entire network was trained end-to-end.
Figure 1 outlines the described LSTM network. The LSTM implementation assumes that the input data is continuously and regularly sampled. However, in our case, data for some intervals may be missing. To overcome this, we masked the data for missing time steps by using zero vectors to substitute the missing data points. In parallel, we also used a vector indicating the coordinates of the masked time intervals for each sample, for which the model used the forecast, i.e. the model-predicted microbial abundance instead of the ground truth values. Additional method details are provided in the Supplementary material (Section 2.1) and the hyperparameter values are listed in Supplementary Table 3 (see section on supplementary materials given at the end of this article). The LSTM model was implemented using the PyTorch library (Paszke et al. 2019) (version 2.0.1, cuda version 11.8).
Neural differential equations
A significant limitation associated with clinical data pertains to its irregular sampling of data points, which presents challenges in constructing effective machine learning models that can effectively harness the inherent time-series information. The irregularity in data sampling introduces two notable drawbacks: first, the size of input data, contingent upon the number of sampling instances, differs among various subjects; secondly, the timing of sampling instances is not strictly discrete, thereby restricting the applicability of commonly employed RNN models that assume uniform intervals between sampled data points. To overcome this, we leverage a recently introduced class of deep learning models – neural ordinary differential equations (ODEs) that combine a neural network with ODEs and allow for continuous interpolation between two randomly spaced sampling instants.
Here, ψθ and lθ correspond to linear models responsible for transforming the initial taxa abundance (along with the time-stamp t0) into the initial hidden state, ht0, and the final hidden state, htT, into the output label, respectively. The map, ψθ is used to avoid translational invariance to first sampled time instant. X is the natural cubic spline with knots at t0,…,tT such that Xti = (xi, ti). Natural cubic splines allow for smooth interpolation and minimum regularity for handling certain edge cases. fθ is neural network model depending on parameters, θ. Due to its dependence on cubic splines, Neural CDEs (Kidger et al. 2020) can be applied to irregularly sampled time series, even with temporally scattered initial conditions. Thus, we chose to apply neural CDEs to predict preterm birth using the irregularly sampled microbial abundance dataset. A comprehensive mathematical introduction to neural CDEs is outside the scope of this paper. For those interested in delving deeper into the mathematical details, we recommend consulting (Kidger et al. 2020) for a more thorough explanation. The torchcde library (version 0.2.5) was used to implement the neural CDE model in Python. Hyperparameter values for the model are listed in Supplementary Table 4.
Results
Microbial abundance dataset contains racially and ethnically diverse subjects
The 16S rRNA sequence data were converted to taxonomic abundance (see section titled '16S rRNA sequence processing' under Methods), which led to approximately 290,000 abundance counts, spanning taxonomic counts at various levels of classification, out of which approximately 65,000 corresponded to genus-level, belonging to 2326 unique samples which were collected at various weeks of gestation throughout the pregnancy, spread across 133 subjects of diverse races and ethnicities (Fig. 2A), out of which 85 subjects delivered at term and 48 subjects delivered preterm (Fig. 2B and D). We aligned the abundance counts subject- and gestational week-wise for ease of interpretation (Fig. 2C). Abundance counts for multiple samples derived from the same subject collected during the same week of gestation, if any, were replaced by the mean of those counts to ensure consistency, as future analyses were carried out on week-wise data. The distribution of the number of genera present in each sample (i.e. the number of genera with non-zero abundance in each sample) is visualized in Fig. 2E. Microbial abundance profiles corresponding to 43 out of the 133 subjects were reserved as the test set (refer to section titled 'Preprocessing taxonomic abundance data' under Methods).
Diversity metrics do not reliably identify at-risk PTB subjects
Alpha-diversity indices were computed on samples collected during trimester 1 and trimester 2 (gestational weeks 9 to 24, see section titled 'Preprocessing taxonomic abundance data' under Methods). The visualization of Chao1, Gini, Shannon, Simpson, and TCS alpha-diversity indices computed at various weeks of gestation for subjects who delivered at term and preterm is presented in Fig. 3A, B, C, D, and E, respectively. The results of two-sided, independent t-tests to examine differences in diversity index values across term and preterm groups are presented in Table 1. Although the t-test reveals a statistically significant difference in the Chao1 diversity index between term and preterm groups during gestational weeks 9–12 (P = 0.005) and 13–17 (P = 0.02), there are too few samples in the preterm group during these gestational periods to draw reliable conclusions (Fig. 3). No signature that can distinguish term/preterm birth is observable from these metrics. As can be seen from the plot, the alpha-diversity indices are not predictive of a preterm delivery outcome and perform worse than random classifiers (prediction accuracy on test set <50%, refer to section titled 'Diversity metrics' under Methods).
P-values representing significance of differences between diversity metric values across the term and preterm groups for gestational weeks 9–12, 13–16, 17–20, and 21–24.
Gestational week/metric | P |
---|---|
Gestation weeks 9–12 | |
Shannon | 0.8034 |
Simpson | 0.9271 |
Gini | 0.4074 |
Chao1 | 0.0049 |
TCS | 0.0931 |
Gestation weeks 13–16 | |
Shannon | 0.7225 |
Simpson | 0.4616 |
Gini | 0.9042 |
Chao1 | 0.0190 |
TCS | 0.5035 |
Gestation weeks 17–20 | |
Shannon | 0.6221 |
Simpson | 0.4852 |
Gini | 0.7739 |
Chao1 | 0.3352 |
TCS | 0.8353 |
Gestation weeks 21 – 24 | |
Shannon | 0.3058 |
Simpson | 0.2270 |
Gini | 0.2935 |
Chao1 | 0.5482 |
TCS | 0.3751 |
Statistical analyses indicate presence of signatures for PTB prediction in evolving microbiomes
To reduce the set of features used for the classification task, we removed the genera with high skewness and kurtosis. Skewness and kurtosis were computed on relative abundance of microbial genera during the period of trimester 1–trimester 2 (gestational weeks 9–24). The abundance distributions of a large number of genera have a high positive skewness and kurtosis (Fig. 4A and B) and may contribute to noise. Thus, we excluded the genera that had highly skewed relative abundances (i.e. skewness >10) as well as genera with high kurtosis (kurtosis >10). As a result, only six genera were retained, namely, Lactobacillus, Anaerococcus, Gardnerella, Peptoniphilus, Finegoldia, and Prevotella. Except for Finegoldia, these genera have been identified to be linked to PTB risk previously. Lactobacillus is the most dominant genus within the vaginal microbiome, and low counts of Lactobacillus have previously been stated to be indicative of increased PTB risk (Bayar et al. 2020, Gudnadottir et al. 2022). Certain species of Anaerococcus are found to be associated with increased PTB risk (Ansari et al. 2021), however, there are also reports that Anaerococcus species may be protective in nature (dos Anjos Borges et al. 2023). There is strong evidence linking high Gardnerella vaginalis presence with PTB and bacterial vaginosis, which also increases PTB risk (Nelson et al. 2009, Ng et al. 2023). In some populations, increased counts of certain Peptoniphilus species were also found to be associated with high PTB risk (Park et al. 2022a ). Similar evidence exists associating high Prevotella abundances with increased PTB risk (Freitas et al. 2018, Fettweis et al. 2019, Park et al. 2022b ). However, there is insufficient evidence to establish a link between these observations and the changes that vaginal microbiota undergo throughout the duration of the pregnancy.
We further re-computed the relative abundance based on the abundance counts of these six genera only and visualized the gestational week-wise abundances and corresponding term/preterm delivery outcomes. The results are presented in Fig. 5A, B, C, D, E and F. This analysis highlights that the composition of the six genera mentioned above changes significantly during the period from the end of trimester 1 to trimester 2 of pregnancy. The trends indicate that the low abundance of the Lactobacillus genus during trimester 2 (gestational Gardnerella counts with PTB risk (Fig. 5C, P = 0.0073), and the effect is more pronounced during gestational weeks 16–18. Most of the samples with increased Prevotella counts during weeks 19–21 belonged to subjects who went on to deliver preterm (Fig. 5E, P ≈ 10−6).
ML classifiers do not make adequate PTB risk assessment
We tested the performance of two ML classifiers, namely, RF and DT, toward prediction of preterm birth. For this, we isolated the latest available microbial abundance profiles of training set subjects as well as the test set subjects, collected during the period between the 9th and the 24th week of gestation, with the rationale that the state of the microbiome closer to the period of delivery should be better predictive of term/preterm delivery. Optimal hyperparameters for both RF and DT were identified by performing a grid search on predefined parameter search spaces using three-fold cross-validation on the training set, and are listed in Supplementary Table 2. The resultant models were validated on the test set by computing ROC–AUC, accuracy, precision-recall, and f1 score. The RF model performed significantly better (Fig. 6B and D) compared to DT (Fig. 6A and C) which performs worse than a random predictor. The detailed results of both classifiers are presented in Table 2. Neither of the models, however, make adequately reliable predictions on the test set.
Comparative performance of various machine learning methods.
Method | Metrics | ||||
---|---|---|---|---|---|
ROC–AUC | Accuracy | Precision | Recall | F1 score | |
Decision tree | 0.46 ± 0.09 | 0.45 ± 0.12 | 0.39 ± 0.11 | 0.58 ± 0.22 | 0.41 ± 0.14 |
Random forest | 0.60 ± 0.10 | 0.59 ± 0.09 | 0.42 ± 0.10 | 0.48 ± 0.13 | 0.44 ± 0.12 |
Ours (neural CDE) | 0.82 ± 0.02 | 0.74 ± 0.04 | 0.65 ± 0.05 | 0.71 ± 0.12 | 0.71 ± 0.03 |
LSTMs do not decode the temporal dynamics of vaginal microbiomes
LSTM was trained on the week-wise genera abundance data sampled during gestational weeks 9–24, after making appropriate adjustments to account for the irregularity in sampling (see section titled 'Recurrent neural networks' under Methods, Fig. 1). When trained on the entire set of genera with non-zero variance in the training set, the model overfits and does not generalize well to making predictions on the test set (training set accuracy = 100%, test set accuracy < 60%). Even when trained on the set of genera with low skewness and kurtosis, the model fails to make sufficiently accurate predictions on the test set (accuracy = 63%), and is outperformed by the RF model described above. We attribute this lack of predictivity to the increased estimations that the model makes to fill the temporal gaps in the data, and it may necessitate the availability of additional data samples to be able to make these estimations more accurately, either in terms of more patient subjects or increased density of samples per subject.
Neural CDEs are capable of achieving PTB prediction with substantial accuracy
The neural CDE model trained on relative abundances of genera selected by the skewness and kurtosis filtering outperforms all other models described above. The resultant model performs reasonably well on the test set (mean test set ROC–AUC = 0.82, accuracy = 74.5% precision = 0.65, recall = 0.71, f1 score = 0.71). The results are presented in Fig. 7A and B. We then trained the model after shuffling the term/preterm labels for subjects in the training set. As expected, the model behaved similarly to a random predictor on the test set (ROC–AUC < 0.5). Albeit not on the same validation dataset, our approach describes better results than the best submission in the DREAM challenge for term vs preterm prediction (ROC–AUC = 0.68, accuracy = 67%, sensitivity = 0.48, specificity = 0.79) (Golob et al. 2023), despite using microbial abundances only up to the end of the 2nd trimester, i.e. the 24th week of gestation, as opposed to the 32nd week of gestation in the DREAM challenge.
Discussion
Current in vitro or in vivo approaches lack the ability to detect PTB incidences at earlier stages, reducing the effectiveness of prophylactic or therapeutic interventions that can be administered to mitigate neonatal health concerns associated with it. Current risk assessment approaches involve physical examinations, and factors such as cervical length may be used to estimate the risk. Additionally, abnormality in levels of biochemical markers such as pregnancy-associated protein A (PAPP-A) (Smith et al. 2002, Gundu et al. 2016) and cervicovaginal interleukins (Manning et al. 2019, Park et al. 2020) may help detect PTB as well. However, there is a lack of definitive confidence intervals for these physical or biochemical tests. Recent studies have highlighted the utility of diversity of vaginal microbial communities toward PTB prediction by establishing correlations between alpha-diversity indices associated with abundances of various microbial species (or genera) and incidences of PTB (Hyman et al. 2014, DiGiulio et al. 2015, Haque et al. 2017). However, microbial communities are highly diverse across various individuals, and more so for individuals belonging to different ethnic populations (Gupta et al. 2017, Sun et al. 2022). We have demonstrated above that in a heterogeneous dataset, with microbial profiles derived from ethnically and racially diverse subjects, diversity metrics could not accurately estimate PTB risk. This indicates that the previously reported success of diversity indices in identifying subjects at high risk of PTB may be dataset-dependent, either with respect to the subject cohort or to the pipeline used in the computation of microbial abundance from 16S rRNA sequences, based on our observations on a mixed-race dataset with 16S rRNA sequences transformed using a standardized method.
Traditional ML methods, which have been explored previously in the context of predicting PTB using vaginal microbial species abundance, fail to learn an abundance signature associated with PTB in our dataset. While others (Park et al. 2022a ) report success with machine learning methods in ethnically homogenous cohorts, we found that the predictive performance did not translate to mixed-race cohorts. As we have demonstrated above, vaginal microbial communities evolve throughout the duration of pregnancy, and abundance levels of certain species or genera may change significantly as the pregnancy progresses. Learning a PTB-associated signature in an evolving microbiome may be out of scope of such models as they are not designed to handle time-series datasets. We explored the utility of LSTM, a type of RNN, which is able to work with sequential datasets. The architecture of RNN-based approaches requires input datasets to be regularly and continuously sampled. As far as human patient subject data is concerned, obtaining such a dataset is a challenge, as study subjects may not be regular or consistent in clinical visits. For this purpose, we filtered the dataset such that a single sample was present across each of the gestational weeks, which constituted the time intervals for LSTM. We suitably modified the LSTM workflow to overcome missing time intervals; however, it proved to be incapable of learning any signature associated with PTB.
Neural differential equations have recently gained traction with regard to analyzing sequential data. Since it uses differential equations to model the temporal dynamics, it can handle irregularly and/or inconsistently sampled data. Neural CDEs are more efficient than neural ODEs (Kidger et al. 2020), and are even capable of working with partially sampled datasets, although we have not harnessed that in this study. We found considerable success in using neural CDEs to predict PTB, in spite of working with a dataset sourced from an ethnically varied population (Fig. 2), and outperformed all other approaches that we tested. To the best of our knowledge, this is the first effort toward modeling the temporal dynamics of vaginal microbial communities using deep learning and the first instance of applying neural differential equations for a problem of this kind.
The DREAM challenge for PTB prediction (Golob et al. 2023), was issued in 2019 with the goal of driving efforts for PTB prediction using the vaginal microbiome. One of the sub-problems for the DREAM challenge consisted of predicting term births (≥37 weeks of gestation) and preterm births (<37 weeks of gestation) using vaginal microbiomes. The dataset for this challenge was derived from nine different studies and amounted to 3578 samples collected from 1268 individuals (Golob et al. 2023). The dataset used in this study was also part of the DREAM challenge. We also considered using some of the other datasets in the DREAM challenge while outlining this study but dropped either due to not being labeled week-wise or due to insufficient week-wise samples per patient, for modeling the temporal dynamics. Most of the top submissions in the challenge used tree-based classifiers. On our test dataset, neural CDEs show better predictivity (mean test set ROC–AUC = 0.82, accuracy = 75%, sensitivity = 0.71, specificity = 0.85) than the best submission in the DREAM challenge on their validation dataset (ROC–AUC = 0.69, accuracy = 67%, sensitivity = 0.48, specificity = 0.79) (Golob et al. 2023), despite using microbial abundances only up to the end of the 2nd trimester, i.e. the 24th week of gestation. The DREAM challenge for PTB prediction used taxonomic abundance data up to the 32nd week of gestation. Our emphasis was on early stage PTB prediction, and we were able to achieve better predictive performance in spite of restricting the input data till the 2nd trimester.
Predictive approaches using data other than microbial communities also exist. For instance, Tarca et al. (Tarca et al. 2021) report the results of the DREAM challenge for PTB prediction using the maternal blood transcriptome and the proteome. The top-performing models report better results than what was reported on microbial communities, with an ROC–AUC of 0.76 when proteomics data from weeks 27–33 was used. However, in another sub-challenge where early stage data (weeks 17–22) was used, the top-performing model had an ROC–AUC of 0.62. Obtaining blood transcriptomic or proteomic data may pose difficulties due to the involvement of invasive procedures requiring clinical expertise to perform. On the other hand, microbial abundance data is sourced from vaginal swabs, which can be obtained without invasive procedures, by patient subjects themselves. Several attempts have been made at predicting PTB using biochemical markers (Aung et al. 2019, Leow et al. 2020), however, obtaining such data may require regular clinical visits, and their viability in racially diverse populations is unknown.
Poorer and remote parts of the world may even lack the medical infrastructure or presence of adequate facilities that are required for PTB assessment and prevention. For example, in remote areas in India, there are clinics called anganwadis, which roughly translates to courtyard shelter. As of 2018, the Ministry of Women and Child Development reports the existence of 1.4 million anganwadi centers spread out across the country. Anganwadis provide limited health-care facilities for maternal and infant health and lack the funding and facilities, or even trained medical personnel required to mitigate PTB and its ill effects. Given the simplicity of obtaining samples from which microbial abundance is derived, reliable approaches for PTB risk assessments developed on microbiota will greatly help such remote clinics.
While we have demonstrated the capability of neural CDEs toward PTB prediction using the vaginal microbiome, further efforts can be made to increase its clinical viability. First, our dataset is limited in size (133 patient subjects), and we believe that larger datasets with better racial and ethnic representation may help learn signatures that take into account the diversity of vaginal microbiomes across individuals/races. Secondly, predicting the extent of preterm birth (extremely preterm, very preterm, moderate to late preterm) is also important in terms of administering interventions, as they may have varying impacts on maternal and infant health and may require different strategies. This may be achieved by predicting the gestational week of delivery, or by treating PTB as a multi-class problem with different extents of PTB as the classes, on more high-quality datasets. We strongly believe that vaginal microbial communities may be the key to achieving early-stage PTB prediction, and our findings strongly encourage future efforts for pregnancy microbiome data generation and further refinements in modeling procedures, which may take us closer to achieving full clinical viability.
Supplementary materials
This is linked to the online version of the paper at https://doi.org/10.1530/MAH-23-0024.
Declaration of interest
The authors declare that there is no conflict of interest that could be perceived as prejudicing the impartiality of this article.
Funding
This study did not receive any specific grant from any funding agency in the public, commercial, or not-for-profit sector.
Ethical approval
The data used in this study were derived from a public, non-controlled access dataset from within the Sequence Read Archive (SRA); hence, ethical approval was not required.
Data and code availability
The code and data files for this study have been made available at https://tinyurl.com/3427p6y4. The repository contains a readme file which describes the contents of the individual data files along with the demographics of the train and test data, as well as a brief description of the code files.
Author contribution statement
MB and KK designed the study. KK performed the computational analyses along with assistance from MB, and MB and KK drafted the final version of the manuscript.
Acknowledgements
The authors would like to thank Dr Mohammed Haque, Dr Anirban Dutta, and Mr Nishal Kumar Pinna for their help in processing the 16S rRNA sequences from the SRA cloud, and Mr Sunil Nagpal and Dr Anirban Dutta for outlining the state of the art for PTB prediction using diversity metrics. We would also like to thank Dr Rajgopal Srinivasan for proofreading and helping improve the content of the manuscript.
References
Ansari A, Bose S, You Y, et al.2021 Molecular mechanism of microbiota metabolites in preterm birth: pathological and therapeutic insights. International Journal of Molecular Sciences 22 8145. (https://doi.org/10.3390/ijms22158145)
Aung MT, Yu Y, Ferguson KK, et al.2019 Prediction and associations of preterm birth and its subtypes with eicosanoid enzymatic pathways and inflammatory markers. Scientific Reports 9 17049. (https://doi.org/10.1038/s41598-019-53448-z)
Baranwal M, Clark RL, Thompson J, et al.2022 Recurrent neural networks enable design of multifunctional synthetic human gut microbiome dynamics. eLife 11 e73870. (https://doi.org/10.7554/eLife.73870)
Bayar E, Bennett PR, Chan D, et al.2020 The pregnancy microbiome and preterm birth. Seminars in Immunopathology 42 487–499. (https://doi.org/10.1007/s00281-020-00817-w)
Bharti R & & Grimm DG 2021 Current challenges and best-practice protocols for microbiome analysis. Briefings in Bioinformatics 22 178–193. (https://doi.org/10.1093/bib/bbz155)
Blencowe H, Cousens S, Oestergaard MZ, et al.2012 National, regional, and worldwide estimates of preterm birth rates in the year 2010 with time trends since 1990 for selected countries: a systematic analysis and implications. Lancet 379 2162–2172. (https://doi.org/10.1016/S0140-6736(1260820-4)
Brown RG, Al-Memar M, Marchesi JR, et al.2019 Establishment of vaginal microbiota composition in early pregnancy and its association with subsequent preterm prelabor rupture of the fetal membranes. Translational Research 207 30–43. (https://doi.org/10.1016/j.trsl.2018.12.005)
Callahan BJ, DiGiulio DB, Goltsman DSA, et al.2017 Replication and refinement of a vaginal microbial signature of preterm birth in two racially distinct cohorts of US women. PNAS 114 9966–9971. (https://doi.org/10.1073/pnas.1705899114)
Callahan BJ, McMurdie PJ, Rosen MJ, et al.2016 DADA2: high-resolution sample inference from Illumina amplicon data. Nature Methods 13 581–583. (https://doi.org/10.1038/nmeth.3869)
Chawanpaiboon S, Vogel JP, Moller AB, et al.2019 Global, regional, and national estimates of levels of preterm birth in 2014: a systematic review and modelling analysis. Lancet Global Health 7 e37–e46. (https://doi.org/10.1016/S2214-109X(1830451-0)
Chen RTQ, Rubanova Y, Bettencourt J, et al.2018 Neural ordinary differential equations. arXiv. (https://doi.org/10.48550/arXiv.1806.07366)
Chung EH, Chou J & & Brown KA 2020 Neurodevelopmental outcomes of preterm infants: a recent literature review. Translational Pediatrics 9(Supplement 1) S3–S8. (https://doi.org/10.21037/tp.2019.09.10)
DiGiulio DB, Callahan BJ, McMurdie PJ, et al.2015 Temporal and spatial variation of the human microbiota during pregnancy. PNAS 112 11060–11065. (https://doi.org/10.1073/pnas.1502875112)
dos Anjos Borges LG, Pastuschek J, Heimann Y, et al.2023 Vaginal and neonatal microbiota in pregnant women with preterm premature rupture of membranes and consecutive early onset neonatal sepsis. BMC Medicine 21 92. (https://doi.org/10.1186/s12916-023-02805-x)
Edgar RC 2013 Uparse: highly accurate OTU sequences from microbial amplicon reads. Nature Methods 10 996–998. (https://doi.org/10.1038/nmeth.2604)
Estaki M, Jiang L, Bokulich NA, et al.2020 QIIME 2 enables comprehensive end-to-end analysis of diverse microbiome data and comparative studies with publicly available data. Current Protocols in Bioinformatics 70 e100. (https://doi.org/10.1002/cpbi.100)
Fettweis JM, Serrano MG, Brooks JP, et al.2019 The vaginal microbiome and preterm birth. Nature Medicine 25 1012–1021. (https://doi.org/10.1038/s41591-019-0450-2)
Freitas AC, Bocking A, Hill JE, et al.2018 Increased richness and diversity of the vaginal microbiota and spontaneous preterm birth. Microbiome 6 117. (https://doi.org/10.1186/s40168-018-0502-8)
Fung DLX, Li X, Leung CK, et al.2023 A self-knowledge distillation-driven CNN-LSTM model for predicting disease outcomes using longitudinal microbiome data. Bioinformatics Advances 3 vbad059. (https://doi.org/10.1093/bioadv/vbad059)
Georgiou HM, Di Quinzio MK, Permezel M, et al.2015 Predicting preterm labour: current status and future prospects. Disease Markers 2015 435014. (https://doi.org/10.1155/2015/435014)
Golob JL, Oskotsky TT, Tang AS, et al.2023 Microbiome preterm birth DREAM challenge: crowdsourcing machine learning approaches to advance preterm birth research. Preprint. (https://doi.org/10.1101/2023.03.07.23286920)
Gordon HA & & Pesti L 1971 The gnotobiotic animal as a tool in the study of host microbial relationships. Bacteriological Reviews 35 390–429. (https://doi.org/10.1128/br.35.4.390-429.1971)
Gudnadottir U, Debelius JW, Du J, et al.2022 The vaginal microbiome and the risk of preterm birth: a systematic review and network meta-analysis. Scientific Reports 12 7926. (https://doi.org/10.1038/s41598-022-12007-9)
Gundu S, Kulkarni M, Gupte S, et al.2016 Correlation of first-trimester serum levels of pregnancy-associated plasma protein A with small-for-gestational-age neonates and preterm births. International Journal of Gynaecology and Obstetrics 133 159–163. (https://doi.org/10.1016/j.ijgo.2015.09.022)
Gupta VK, Paul S & & Dutta C 2017 Geography, ethnicity or subsistence-specific variations in human microbiome composition and diversity. Frontiers in Microbiology 8 1162. (https://doi.org/10.3389/fmicb.2017.01162)
Haque MM, Merchant M, Kumar PN, et al.2017 First-trimester vaginal microbiome diversity: a potential indicator of preterm delivery risk. Scientific Reports 7 16145. (https://doi.org/10.1038/s41598-017-16352-y)
Hyman RW, Fukushima M, Jiang H, et al.2014 Diversity of the vaginal microbiome correlates with preterm birth. Reproductive Sciences 21 32–40. (https://doi.org/10.1177/1933719113488838)
Katz K, Shutov O, Lapoint R, et al.2022 The sequence read archive: a decade more of explosive growth. Nucleic Acids Research 50 D387–D390. (https://doi.org/10.1093/nar/gkab1053)
Kidger P, Morrill J, Foster J, et al.2020 Neural Controlled Differential Equations for Irregular Time Series. arXiv. (https://doi.org/10.48550/arXiv.2005.08926)
Leow SM, Di Quinzio MKW, Ng ZL, et al.2020 Preterm birth prediction in asymptomatic women at mid-gestation using a panel of novel protein biomarkers: the prediction of preterm labor (PPeTaL) study. American Journal of Obstetrics and Gynecology MFM 2 100084. (https://doi.org/10.1016/j.ajogmf.2019.100084)
Lyons T 1994 Differential equations driven by rough signals (i): an extension of an inequality of lc young. Mathematical Research Letters 1 451–464. (https://doi.org/10.4310/MRL.1994.v1.n4.a5)
Lyons TJ, Caruana M, Lévy T, et al.2007 Differential Equations Driven by Rough Paths. Berlin: Springer. (https://doi.org/10.1007/978-3-540-71285-5)
MacIntyre DA, Chandiramani M, Lee YS, et al.2015 The vaginal microbiome during pregnancy and the postpartum period in a European population. Scientific Reports 5 8988. (https://doi.org/10.1038/srep08988)
Manning R, James CP, Smith MC, et al.2019 Predictive value of cervical cytokine, antimicrobial and microflora levels for pre- term birth in high-risk women. Scientific Reports 9 11246. (https://doi.org/10.1038/s41598-019-47756-7)
Medina RH, Kutuzova S, Nielsen KN, et al.2022 Machine learning and deep learning applications in microbiome research. ISME Communications 2 98. (https://doi.org/10.1038/s43705-022-00182-9)
Nelson DB, Hanlon A, Hassan S, et al.2009 Preterm labor and bacterial vaginosis-associated bacteria among urban women. Journal of Perinatal Medicine 37 130–134. (https://doi.org/10.1515/JPM.2009.026)
Newnham JP, Dickinson JE, Hart RJ, et al.2014 Strategies to prevent preterm birth. Frontiers in Immunology 5 584. (https://doi.org/10.3389/fimmu.2014.00584)
Ng BK, Chuah JN, Cheah FC, et al.2023 Maternal and fetal outcomes of pregnant women with bacterial vaginosis. Frontiers in Surgery 10 1084867. (https://doi.org/10.3389/fsurg.2023.1084867)
Park S, Moon J, Kang N, et al.2022a Predicting preterm birth through vaginal microbiota, cervical length, and WBC using a machine learning model. Frontiers in Microbiology 13 912853. (https://doi.org/10.3389/fmicb.2022.912853)
Park S, You YA, Kim YH, et al.2022b Ureaplasma and Prevotella colonization with lactobacillus abundance during pregnancy facilitates term birth. Scientific Reports 12 10148. (https://doi.org/10.1038/s41598-022-13871-1)
Park S, You YA, Yun H, et al.2020 Cervicovaginal fluid cytokines as predictive markers of preterm birth in symptomatic women. Obstetrics and Gynecology Science 63 455–463. (https://doi.org/10.5468/ogs.19131)
Pascanu R, Mikolov T & & Bengio Y 2012 On the difficulty of training recurrent neural networks. arXiv. (https://doi.org/10.48550/arXiv.1211.5063)
Paszke A, Gross S, Massa F, et al.2019 Pytorch: an imperative style, high-performance deep learning library. arXiv. (https://doi.org/10.48550/arXiv.1912.01703)
Perin J, Mulick A, Yeung D, et al.2022 Global, regional, and national causes of under-5 mortality in 2000–19: an updated systematic analysis with implications for the sustainable development goals. Lancet. Child and Adolescent Health 6 106–115. (https://doi.org/10.1016/S2352-4642(2100311-4)
Pfinder M, Kunst AE, Feldmann R, et al.2013 Preterm birth and small for gestational age in relation to alcohol consumption during pregnancy: stronger associations among vulnerable women? results from two large western-European studies. BMC Pregnancy and Childbirth 13 49. (https://doi.org/10.1186/1471-2393-13-49)
Romero R, Hassan SS, Gajer P, et al.2014 Erratum to: the composition and stability of the vaginal microbiota of normal pregnant women is different from that of non-pregnant women. Microbiome 2 10. (https://doi.org/10.1186/2049-2618-2-10)
Schloss PD, Westcott SL, Ryabin T, et al.2009 Introducing Mothur: open-source, platform-independent, community-supported software for describing and comparing microbial communities. Applied and Environmental Microbiology 75 7537–7541. (https://doi.org/10.1128/AEM.01541-09)
Sender R, Fuchs S & & Milo R 2016 Revised estimates for the number of human and bacteria cells in the body. PLoS Biology 14 e1002533. (https://doi.org/10.1371/journal.pbio.1002533)
Smith GCS, Stenhouse EJ, Crossley JA, et al.2002 Early pregnancy levels of pregnancy-associated plasma protein A and the risk of intrauterine growth restriction, premature birth, preeclampsia, and stillbirth. Journal of Clinical Endocrinology and Metabolism 87 1762–1767. (https://doi.org/10.1210/jcem.87.4.8430)
Stock SJ & & Bauld L 2020 Maternal smoking and preterm birth: an unresolved health challenge. PLoS Medicine 17 e100338 6. (https://doi.org/10.1371/journal.pmed.1003386)
Sun S, Serrano MG, Fettweis JM, et al.2022 Race, the vaginal microbiome, and spontaneous preterm birth. mSystems 7 e0001722. (https://doi.org/10.1128/msystems.00017-22)
Tarca AL, Pataki BÁ, Romero R, et al.2021 Crowdsourcing assessment of maternal blood multi-omics for predicting gestational age and preterm birth. Cell Reports. Medicine 2 100323. (https://doi.org/10.1016/j.xcrm.2021.100323)
Townsi N, Laing IA, Hall GL, et al.2018 The impact of respiratory viruses on lung health after preterm birth. European Clinical Respiratory Journal 5 1487214. (https://doi.org/10.1080/20018525.2018.1487214)
Walani SR 2020 Global burden of preterm birth. International Journal of Gynaecology and Obstetrics 150 31–33. (https://doi.org/10.1002/ijgo.13195)
Weisburg WG, Barns SM, Pelletier DA, et al.1991 16S ribosomal DNA amplification for phylogenetic study. Journal of Bacteriology 173 697–703. (https://doi.org/10.1128/jb.173.2.697-703.1991)
Yang B, Wang Y & & Qian PY 2016 Sensitivity and correlation of hypervariable regions in 16s rRNA genes in phylogenetic analysis. BMC Bioinformatics 17 135. (https://doi.org/10.1186/s12859-016-0992-y)