TaxoMFM: A Taxonomy-Aware Foundation Model for the Human Gut Microbiome
Organizations: Xi’an Jiaotong-Liverpool University · Mohamed bin Zayed University of Artificial Intelligence · Weizmann Institute of Science
Abstract
Existing gut microbiome foundation models typically use flat taxon representations, limiting their ability to exploit known taxonomic hierarchies. We introduce TaxoMFM, a microbiome foundation model that integrates taxonomic structure into self-supervised learning. TaxoMFM jointly learns abundance patterns across taxonomic ranks and relative proportions within groups through taxonomy-aware encoding and hierarchical compositional reconstruction. We further construct TaxoGut-HPP, comprising 100,806 gut microbiome profiles from 231 source cohorts and covering 40 classification and 8 regression tasks. TaxoMFM achieves competitive performance across disease, gut health, host trait, and liver ultrasound phenotype prediction. In cross-cohort zero-shot transfer, where target cohorts are excluded from both pretraining and downstream adaptation, TaxoMFM achieves AUROCs of 0.838, 0.736, and 0.722 for colorectal cancer, type 2 diabetes, and inflammatory bowel disease, respectively. Further analyses show that TaxoMFM recovers community changes across taxonomic scales, while preserving community information and producing consistent representations under database updates and species-vocabulary shifts. Our code is available at https://anonymous.4open.science/r/TaxoMFM-F16D/.
Figures & tables
| Model | Size | Cohorts | Downstream task counts | Downstream task coverage | |||||
| Total | Classification | Regression | Disease | Gut health | Host traits | Clinical phenotype | |||
| Pope et al. ( Pope et al., 2025 ) | 18,480 | 1 | 3 | 3 | 0 | ||||
| BiomeGPT ( Medearis et al., 2026 ) | 13,524 | 86 | 27 | 27 | 0 | ||||
| GUT-FORMer ( Karwowska et al., 2026 ) | 21,024 | 93 | 27 | 25 | 2 | ||||
| MBEmbed ( Zahavi et al., 2025 ) | 85,364 | 3 | 7 | 4 | 3 | ||||
| TaxoMFM (ours) | 100,806 | 231 | 48 | 40 | 8 | ||||
| Model | Disease | Gut health (HPP) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Colorectal cancer | Type 2 diabetes | IBD | Liver cirrhosis | NAFLD | Current abdominal pain | Abdominal pain frequency | Current bloating | GI sensitivity | Irritable bowel syndrome | H. pylori infection/history | Gastro-oesophageal reflux disease | |
| Standard baselines | ||||||||||||
| Elastic Net | 0.826 | 0.791 | 0.868 | 0.811 | 0.807 | 0.593 | 0.572 | 0.637 | 0.632 | 0.582 | 0.628 | 0.651 |
| Random Forest | 0.839 | 0.917 | 0.853 | 0.836 | 0.819 | 0.607 | 0.583 | 0.691 | 0.646 | 0.547 | 0.667 | 0.663 |
| DeepMicro | 0.803 | 0.763 | 0.865 | 0.816 | 0.832 | 0.602 | 0.574 | 0.658 | 0.627 | 0.562 | 0.628 | 0.646 |
| Taxonomy-aware models | ||||||||||||
| Model | Host traits | Liver ultrasound phenotypes | ||||
|---|---|---|---|---|---|---|
| Age | BMI | VAT mass | Attenuation coefficient | Speed of sound | Velocity | |
| Standard baselines | ||||||
| Elastic Net | 0.132 / 0.038 | 0.148 / 0.022 | 0.214 / 0.048 | 0.136 / 0.038 | 0.113 / 0.036 | 0.111 / 0.026 |
| Random Forest | 0.117 / 0.031 | 0.191 / 0.045 | 0.246 / 0.075 | 0.128 / 0.040 | 0.193 / 0.042 | 0.136 / 0.024 |
| DeepMicro | 0.280 / 0.066 | 0.221 / 0.065 | 0.326 / 0.108 | 0.162 / 0.061 | 0.128 / 0.033 | 0.135 / 0.037 |
| Taxonomy-aware models | ||||||
| Model variant | Disease classification | Gut health classification | Liver phenotype regression | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Colorectal cancer | IBD | Type 2 diabetes | Current abdominal pain | Current bloating | Irritable bowel syndrome | Attenuation coefficient | Speed of sound | Velocity | |
| Structural ablations | |||||||||
| Species-only (flat) | 0.914 | 0.943 | 0.909 | 0.736 | 0.758 | 0.723 | 0.313/0.113 | 0.320/0.125 | 0.226/0.060 |
| w/o relation bias | 0.934 | 0.964 | 0.926 | 0.771 | 0.782 | 0.715 | 0.327/0.123 | 0.331/0.130 | 0.273 / 0.088 |
| Random taxonomy | 0.906 | 0.933 | 0.880 | 0.686 | 0.694 | 0.635 | 0.223/0.084 | 0.206/0.071 | 0.158/0.035 |
| Pretraining objective ablations | |||||||||
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Healthy vs. diseased | Crohn’s disease | Ulcerative colitis | Multiple sclerosis | Rheumatoid arthritis |
|---|---|---|---|---|---|
| Standard baselines | |||||
| Elastic Net | 0.760 | 0.872 | 0.849 | 0.869 | 0.834 |
| Random Forest | 0.782 | 0.908 | 0.872 | 0.901 | 0.859 |
| DeepMicro | 0.809 | 0.873 | 0.868 | 0.908 | 0.861 |
| ExtraTrees | 0.773 | 0.902 | 0.882 | 0.895 | 0.864 |
| Taxonomy-aware models | |||||
| Model | Ankylosing spondylitis | Graves’ disease | Behçet’s disease | Myalgic encephalomyelitis / chronic fatigue syndrome |
|---|---|---|---|---|
| Standard baselines | ||||
| Elastic Net | 0.892 | 0.883 | 0.904 | 0.862 |
| Random Forest | 0.923 | 0.902 | 0.947 | 0.889 |
| DeepMicro | 0.907 | 0.910 | 0.922 | 0.902 |
| ExtraTrees | 0.917 | 0.930 | 0.941 | 0.877 |
| Taxonomy-aware models | ||||
| Model | Colorectal adenoma | Pancreatic cancer | Coronary artery disease | Atherosclerotic cardiovascular disease | Impaired glucose tolerance | Melanoma |
|---|---|---|---|---|---|---|
| Standard baselines | ||||||
| Elastic Net | 0.833 | 0.896 | 0.874 | 0.903 | 0.788 | 0.874 |
| Random Forest | 0.868 | 0.932 | 0.903 | 0.934 | 0.817 | 0.906 |
| DeepMicro | 0.851 | 0.918 | 0.882 | 0.919 | 0.825 | 0.895 |
| ExtraTrees | 0.873 | 0.925 | 0.896 | 0.928 | 0.806 | 0.899 |
| Taxonomy-aware models | ||||||
| Model | Parkinson’s disease | Schizophrenia | Soil-transmitted helminths | Clostridioides difficile infection | Acute diarrhea | Premature birth |
|---|---|---|---|---|---|---|
| Standard baselines | ||||||
| Elastic Net | 0.898 | 0.883 | 0.916 | 0.869 | 0.922 | 0.904 |
| Random Forest | 0.924 | 0.918 | 0.944 | 0.899 | 0.957 | 0.932 |
| DeepMicro | 0.916 | 0.925 | 0.930 | 0.920 | 0.949 | 0.941 |
| ExtraTrees | 0.919 | 0.911 | 0.956 | 0.883 | 0.950 | 0.928 |
| Taxonomy-aware models | ||||||
| Model | Soft-stool frequency | Hard-stool frequency | Nausea in the past three months | Anorectal disease | Gallstone / cholecystectomy |
|---|---|---|---|---|---|
| Standard baselines | |||||
| Elastic Net | 0.596 | 0.587 | 0.664 | 0.624 | 0.669 |
| Random Forest | 0.638 | 0.625 | 0.698 | 0.657 | 0.706 |
| DeepMicro | 0.632 | 0.619 | 0.728 | 0.668 | 0.719 |
| ExtraTrees | 0.613 | 0.621 | 0.687 | 0.646 | 0.698 |
| Taxonomy-aware models | |||||
| Model | Fatty liver history | Peptic ulcer disease | Bowel-movement satisfaction | Daily bowel-movement count |
|---|---|---|---|---|
| Standard baselines | ||||
| Elastic Net | 0.657 | 0.629 | 0.118 / -0.012 | 0.183 / 0.041 |
| Random Forest | 0.741 | 0.612 | 0.156 / 0.019 | 0.258 / 0.096 |
| ExtraTrees | 0.726 | 0.624 | 0.147 / 0.023 | 0.246 / 0.101 |
| DeepMicro | 0.693 | 0.655 | 0.193 / 0.031 | 0.229 / 0.071 |
| Taxonomy-aware models | ||||
| Task | Source samples | Target study | Target samples | Positive/ negative |
|---|---|---|---|---|
| CRC | 1,517 | Yang et al. (2021) | 194 | 97/97 |
| T2D | 465 | MetaCardis ( Forslund et al., 2021 ) | 783 | 549/234 |
| IBD | 318 | HMP/IBDMDB ( Lloyd-Price et al., 2019 ) | 130 | 103/27 |
| Task | Role | Resource | Resource study ID | PMID |
| CRC | Source | cMD | GuptaA_2019 | 31719139 |
| CRC | Source | cMD | HanniganGD_2017 | 30459201 |
| CRC | Source | cMD | ThomasAM_2018b | 30936548 |
| CRC | Source | cMD | VogtmannE_2016 | 27171425 |
| CRC | Source | cMD | WirbelJ_2018 | 30936547 |
| CRC | Source | cMD | YachidaS_2019 | 31171880 |
| Model | Parameters (M) | GFLOPs / sample | Latency (ms) | Throughput (samples/s) | Peak memory (GiB) |
|---|---|---|---|---|---|
| MGM | 6.83 | 0.692 | 3.399 | 2,113 | 0.063 |
| Waypoint-45M | 45.15 | 4.844 | 5.732 | 1,341 | 0.237 |
| BiomeGPT | 14.73 | 1.991 | 4.262 | 1,809 | 0.114 |
| GUT-FORMer | 1.22 | 0.483 | 0.951 | 8,392 | 0.029 |
| TaxoMFM | 18.25 | 5.626 | 0.759 | 3,852 | 0.412 |