bio.rodeo
ModelsOrganizationsProvidersLeaderboardAboutSign in
bio.rodeo

The authoritative source for evaluating biological foundation models. No hype, just honest analysis.

Categories
  • DNA & Gene
  • RNA
  • Protein
  • Small molecule
  • Single-cell
  • Spatial omics
  • Pathology
  • Imaging
  • Metabolomics
  • Biosignals
  • Language model
bio.rodeoModelsOrganizationsProvidersLeaderboardAboutFAQSubmit a modelTermsPrivacyContact
© 2026 Pulsatance. All rights reserved. ~
Built by Pulsatance
models / dna-gene / mgm
DNA & Gene
Huazhong University of Science and TechnologyReleased January 2025

MGM

Microbiome community foundation model pretrained on 263,302 samples, encoding genus abundance as ranked tokens for classification and generation.

The short version

  • —Diagnoses gut disease in cohorts from a continent the model was not trained on
  • —Ranks genera by abundance rather than using raw values, blunting cross-study batch effects
  • —Attention weights surface keystone genera such as Bacteroides in infant gut development
  • —Prompt tokens generate synthetic abundance profiles conditioned on a disease label
  • —Deleting a genus in silico scores how much it shapes a tumour microbiome
89Openness

Where to run it

No providers recorded yet. Browse all providers

Microbiome studies routinely collapse a community into an abundance table, then fit a supervised model to that one cohort. The approach breaks down at scale: taxonomic composition varies with geography, diet, and host genetics, and sequencing batch effects often dominate the biological signal, so a classifier trained in one country degrades sharply when applied in another. MGM — the Microbial General Model — was built to learn community structure once, from a corpus large enough that these idiosyncrasies average out, and then transfer.

Developed in Kang Ning's lab at Huazhong University of Science and Technology, MGM treats a microbiome sample as a sentence. Genera are ranked by their relative abundance within the sample and converted into an ordered sequence of discrete tokens, which a transformer decoder is trained to continue autoregressively. Rank-based encoding is the central design choice: it discards absolute abundance, which is precisely the quantity most distorted by sequencing protocol, while preserving the ordering that carries ecological meaning. Substituting centered log-ratio encoding under a masked objective lowered classification AUROC from 0.99 to 0.97.

MGM is the root of a family from the same lab. MGM 2.0 reframes microbiome samples as sentences and adds colonization prediction and donor selection for faecal microbiota transplantation; MGM2 scaled the corpus by nearly an order of magnitude while adding a sequence modality to each community token. The generative results below — prompt-guided synthesis and the Microbiome Turing Test — were reported in this model's journal version, which absorbed work that first appeared alongside MGM 2.0. Where Microbiome Self-Supervised Learning learns embeddings from abundance alone, MGM's autoregressive framing gives it a generative mode as well as a discriminative one.

#Key Features

  • Rank-based tokenization: A vocabulary of 9,665 genera, ordered by within-sample relative abundance, replaces raw abundance values and reduces sensitivity to protocol differences between studies.
  • Cross-regional generalization: On an inflammatory bowel disease cohort spanning Ireland and Canada, MGM's zero-shot performance on the untrained region exceeded the post-transfer-learning performance of both EXPERT and DeepPhylo.
  • Attention-based keystone discovery: Fine-tuned on a longitudinal infant cohort, the model assigned higher attention to Bacteroides and Bifidobacterium in vaginal deliveries and Haemophilus in cesarean deliveries.
  • In-silico perturbation: Removing a genus from the input and measuring the shift in reconstructed composition ranks its influence; on tumour microbiome data the top-ranked genera per cancer type overlapped substantially with SHAP attributions.
  • Prompt-guided generation: Disease label tokens condition generation of new rank sequences, which a reconstructor network converts back to abundance profiles.

#Technical Details

MGM is a transformer decoder of eight blocks, each with eight attention heads, a feed-forward width of 1,024, and GELU activations, trained with causal language modeling in PyTorch via the HuggingFace Trainer API. Inputs are capped at 512 tokens, covering 99.99% of samples without truncation. The pretraining corpus, MicroCorpus-260K, comprises 263,302 quality-filtered samples drawn from all of MGnify up to June 2023. Downstream adaptation replaces the language modeling head with a task head and unfreezes the backbone for joint fine-tuning.

On cross-validated community classification over MicroCorpus-260K, fine-tuned MGM reached an average ROC-AUC of 0.99, against 0.68–0.97 for source tracking, classical machine learning, and deep learning baselines; an unpretrained MGM and DeepPhylo both reached 0.97, isolating pretraining as the source of the gain. On infant developmental-stage prediction, MGM matched a random forest on AUROC (0.90) but improved F-max from 0.52 to 0.60, while EXPERT and DeepPhylo trailed the random forest. A five-cancer tumour microbiome classifier reached a macro-average ROC of 0.97. Generated profiles were assessed with a purpose-built "Microbiome Turing Test" of ten statistical and ecological metrics, on eight of which MGM beat the GAN-based generator MB-GAN.

#Applications

The model is aimed at researchers working with 16S amplicon abundance tables who need results that survive a change of cohort: microbiome-based disease diagnosis across geographic regions, source tracking, developmental trajectory analysis, and biomarker nomination through attention weights. The generative mode supports augmenting small clinical cohorts with synthetic disease-conditioned profiles, and the perturbation mode offers a cheap first pass at nominating genera for intervention.

#Impact

MGM established that language modeling transfers to microbiome community data and that rank encoding is a workable substitute for abundance normalization — both choices carried forward into MGM2. The work appeared as a preprint at the start of 2025 and was published in Advanced Science in 2026. Code is MIT-licensed, distributed on PyPI as microformer-mgm, and ships a default MicroCorpus-260K checkpoint used by its fine-tuning and prediction commands; the corpus itself is downloadable through the repository's instructions. Evaluation is confined to genus-level amplicon profiles, so functional and strain-level questions fall outside what the model represents.

At a glance

Released
January 2025
Category
DNA & Gene
Organization
Huazhong University of Science and Technology

Links

GitHub RepositoryResearch PaperbioRxiv PreprintPyPI Package

Tags

foundation_modellanguage_modelmicrobiomerepresentation_learningtransfer_learningtransformer

Something wrong?

Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.