Abstract
Bipolar disorder (BD) is a chronic psychiatric illness associated with significant cognitive and social dysfunction, contributing substantially to the global disease burden. Recent evidence suggests that the gut microbiota may play a role in the pathophysiology of BD through the microbiota-gut-brain axis. To clarify this potential link and explore diagnostic applications, we investigated gut microbial alterations in BD and evaluated their predictive value using 16S rRNA sequencing and machine learning approaches. We first assessed microbial diversity and composition, revealing significantly reduced α-diversity and altered β-diversity in BD compared to healthy controls (HC), alongside weakened microbial co-occurrence network connectivity. Given these compositional differences, we systematically benchmarked 12 classification algorithms to discriminate BD from HC. Ensemble-based models, particularly the random forest (RF) classifier, achieved the best diagnostic performance. To further improve predictive accuracy, we compared multiple feature selection methods: RF feature importance ranking, independent t-tests and MaAsLin2 analysis, identifying 35 optimal microbial biomarkers based on RF. This feature set demonstrated excellent classification performance (AUC = 0.9316, AUPR = 0.9497). Furthermore, based on the taxonomic findings, we applied PICRUSt2 functional prediction using KEGG and MetaCyc annotations, which revealed marked alterations in pathways related to neurodegeneration, lipid metabolism and heme biosynthesis. Finally, to capture both compositional and functional aspects of microbial dysbiosis, we combined these functional features with the selected microbial biomarkers in an RF model, achieving further improved diagnostic performance (AUC = 0.9499, AUPR = 0.9586). In conclusion, our results demonstrate substantial compositional and functional disturbances in the gut microbiota of BD and highlight the value of machine learning-driven, microbiome-based models for noninvasive BD diagnosis. The identified microbial and metabolic markers also provide mechanistic insights into the microbiota-gut-brain axis, offering promising directions for precision psychiatry and microbiome-targeted interventions.