Diarrheal diseases, such as yellow dysentery and white dysentery caused by pathogens or viruses, in newborn piglets lead to substantial economic losses in the swine industry worldwide. Gut microbiota dysbiosis is frequently observed in diarrheic piglets and is thought to play a role in disease pathogenesis, although causal relationships remain to be established. However, developing reliable microbiome-based diagnostic tools still poses a significant challenge. This study aimed to develop a diagn