Skip to content
Open access

Gut Microbiota and Metabolic Pathway Signatures for Inflammatory Bowel Disease Identified via Subject-Stratified Random Forest Based on the Longitudinal HMP2 Cohort

Aug 2026 · Genes · Vol 17 · 0 citations · 12 references
Medicine

Abstract

Background: Inflammatory bowel disease (IBD) is characterised by severe intestinal microbial dysbiosis. Most machine learning diagnostic models built on the longitudinal HMP2 cohort suffer serious data leakage from random sample-level cross-validation splitting, which leads to artificially inflated AUC values. Additionally, incomplete reporting of microbial preprocessing, random forest hyperparameters and multi-dimensional evaluation metrics reduces the reproducibility of existing research. Methods: We re-analysed the public HMP2 (IBDMDB) longitudinal metagenomic dataset containing 130 unique subjects (103 IBD/27 healthy controls) and 1627 longitudinal faecal samples. Raw 585 species were filtered by a minimum relative abundance of 1 × 10−5 and sample prevalence ≥20%, retaining 89 taxa; all 1135 metabolic pathways were retained. CLR transformation was applied to compositional abundance data. We performed Wilcoxon differential testing with Benjamini–Hochberg FDR correction, alpha/beta diversity analysis, and three random forest models (filtered species, all FDR-significant pathways, strictly filtered pathways). Critical improvements included subject-ID-stratified 5-fold cross-validation repeated 5 times, within-fold training-set-only feature importance calculation, and class weighting to balance unbalanced IBD/control samples. PERMANOVA with subject stratification and PERMDISP dispersion test were implemented with 999 fixed-seed permutations. Results: All four alpha diversity indices were significantly lower in IBD patients (all p < 0.0001). Subject-stratified PERMANOVA showed disease status only explained 1.18% of total Bray–Curtis community variance (R2 = 0.0118, p = 1); PERMDISP detected significant group dispersion heterogeneity (p = 0.027). We identified 63 differentially abundant species and 695 perturbed pathways at FDR < 0.05. Canonical butyrate producers Faecalibacterium prausnitzii and Roseburia hominis showed no significant inter-group differences. Bootstrap 1000-resampling AUC 95% CIs indicated moderate classification performance: species model (0.626–0.705, mean AUC = 0.665), all-significant-pathway model (0.645–0.712, mean AUC = 0.679), strict-pathway model (0.620–0.685, mean AUC = 0.654). Alistipes putredinis and peptidoglycan biosynthesis I were the top taxonomic and pathway biomarkers, respectively. Conclusions: This study established a leakage-free machine learning pipeline for longitudinal microbiome cohorts via subject-level cross-validation splitting. The moderate AUC values eliminate false high performance caused by sample leakage, and we provide reliable candidate microbial and metabolic biomarkers for IBD. Restricted by single-cohort internal validation and unadjusted medication confounders, these markers still require independent multi-centre external verification before clinical translation.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.