My lab just had journal club on a paper that sparked a great discussion: Pope et al., “Learning a deep language model for microbiomes: The power of large scale unlabeled microbiome data” (PLoS Computational Biology 2025). The paper presents a transformer-based “language model” for gut microbiome data, trained in a self-supervised fashion on samples from the American Gut Project. It’s a technically sophisticated paper with a lot going for it. But what really struck me was Table 3, which compares the transformer model to a range of baselines on three prediction tasks (IBD status, fruit consumption frequency, and vegetable consumption frequency):
Look at the last row (“No-DR”). This is the plain random forest trained directly on raw ASV abundances, with zero fancy representation learning – and it is superior on virtually every task and metric.
This should not surprise you
If you’ve been paying attention to the microbiome machine learning literature, this pattern, whereby random forest outperforms more complex approaches, is not new. It keeps showing up, across datasets, diseases, and years.
The most rigorous test of this to date is in a recent paper from Li et al. (Gut Microbes 2025, DOI: 10.1080/19490976.2025.2489074). This is a large benchmarking study: 156 tool-parameter-algorithm combinations, tested across 83 gut microbiome cohorts covering 20 diseases, with both internal and external validation. They compared nine algorithms: LASSO, Ridge, Elastic Net, Random Forest, Linear SVM, Radial SVM, XGBoost, LightGBM, and Neural Networks. The result: ridge regression and random forest ranked best, consistently outperforming neural networks and the gradient boosting methods. Figure 4D from that paper tells the story clearly:
This result held up across many disease contexts and cohorts, in both internal cross-validation and external generalization. Their practical recommendation: when building microbiome-based disease classifiers, use ridge regression or random forest as your default algorithm.
This finding echoes what earlier benchmarks already showed. Pasolli et al. in their MetAML meta-analysis (PLoS Computational Biology 2016), found random forest consistently outperforming SVM across eight large metagenomic datasets, achieving AUCs as high as 0.945 for liver cirrhosis and 0.890 for IBD. Topçuoğlu et al. (mBio 2020) similarly found random forest performing best or tied-for-best across seven different modeling approaches on colorectal screening data, and made the observation that assuming more complex models are better is an assumption, not a finding.
More recently, two 2025 papers drive the point further home. Mu, Tang & Chen (Research Square preprint 2025) applied the same 83-cohort benchmark from Li et al. to test a new wave of microbiome foundation models, including MGM (a transformer pre-trained on 260,000+ samples), TabPFN, and GPT-derived embeddings. Their conclusion: “current foundation-model approaches offer, at best, modest gains over strong classical baselines for microbiome-based disease prediction.” MGM’s performance was disease-dependent and generally lagged behind the best tabular baselines; GPT-derived embeddings consistently underperformed standard numerical features. And Karwowska et al. (Microbiome 2025), analyzing over 8,500 samples from 24 shotgun metagenomic datasets, found that classification performance showed minimal dependence on algorithm choice; random forest and XGBoost were essentially interchangeable, and even a simple presence-absence transformation worked nearly as well as sophisticated abundance-based approaches.
Why does random forest work so well on microbiome data?
There are good structural reasons for this, and they all follow from the properties of microbiome data itself. First of all, sample size. A recent survey of microbiome ML studies found that the median dataset is 161.5 samples, with a third of the studies had <100 samples (Dudek et al., Machine Learning with Applications 2024). Deep learning models with millions of parameters simply cannot learn reliably from a few hundred samples. Random forest’s bagging and random feature subsampling provide powerful built-in regularization that works even when the number of features far exceeds the number of samples. Then consider the feature space: a typical ASV table might have hundreds or thousands of features, but only a small fraction carry any signal for a given phenotype. Tree-based models are natively robust to irrelevant features in a way that neural networks are not; each tree in the forest ignores most features by construction. Related to this is the sparsity problem, with most microbiome abundance tables being >50% zeros. A simple threshold (e.g., is this taxon present) often captures the dominant signal, which is exactly what a decision tree split does naturally. Neural networks must learn this threshold behavior through gradient descent on continuous activations, which is a harder problem. Finally, there may be a ceiling on what abundance data alone can predict. For many diseases, neither random forest nor deep learning achieves particularly high AUCs (often below 0.80, sometimes much lower) suggesting the bottleneck is biological, not algorithmic. Throwing a more complex model at the same abundance table doesn’t help if the signal simply isn’t there.
Where deep learning actually wins
That said, there are specific scenarios where deep learning has real advantages.
The clearest case from Pope et al. is cross-study generalization. When they took their transformer model trained on AGP data and applied it to entirely independent IBD datasets (Halfvarson and HMP2), the transformer outperformed the random forest baseline on the Halfvarson dataset, which had only 34% ASV overlap with the training data. The random forest’s performance dropped substantially on this cross-study transfer, while the pre-trained transformer maintained robust performance. This makes intuitive sense: the transformer learned transferable representations of microbial community structure that generalize beyond the specific ASVs seen during training, while random forest is tightly coupled to the feature space it was trained on.
Deep learning also shows genuine advantages for multi-modal integration. The real gains in microbiome deep learning often come not from applying fancier algorithms to the same abundance table, but from integrating multiple data types altogether. Our own work combining paired gut microbiome and host transcriptomic data across disease cohorts showed that meaningful biological signal – disease-specific microbe-host gene associations – emerges from this kind of multi-modal design (Priya et al., Nature Microbiology 2022). Deep learning architectures that fuse microbiome abundance with metabolomics, host gene expression, or clinical data are the natural extension of that logic. For a more in-depth review on microbiome multi-omic integration I recommend a recent review from my lab (Chetty & Blekhman, Gut Microbes 2023)
Practical recommendations and the road ahead
Given all of this, here is my practical take: start with random forest or ridge regression, and have a good reason before using anything more complex. For the typical microbiome classification problem (a few hundred to a few thousand cross-sectional samples, binary or multi-class disease prediction) the evidence is consistent enough that there’s no reason to default to deep learning simply because it feels more modern. You’ll spend more time tuning hyperparameters, you’ll need a GPU, and you’ll likely get the same or worse performance. What matters more than algorithm choice is proper data processing and cleaning, rigorous cross-validation, and (when possible) external validation on independent cohorts. These decisions routinely have larger effects on real-world performance than switching between RF, XGBoost, and neural networks. More broadly, this is good practice regardless of data type: start with the simplest model that could plausibly work. A random forest takes minutes to train and may solve your problem immediately. Reach for deep learning only when you have clear evidence (more data, a specific architectural advantage, a generalization task) that the added complexity is justified.
Where it really gets exciting is the emerging niche for foundation models. The foundation model era in microbiome research will require the same resource that made it work everywhere else: massive, uniformly processed training data. Resources like the Human Microbiome Compendium (168,000 gut microbiome samples from 68 countries, processed through a single pipeline) are the necessary first step (Abdill, Graham et al., Cell 2025). Building and benchmarking foundation models against datasets of this scale is the next frontier.




We have a new (coming manuscript that I will share in a week or two) supervised method where we implement a simple ANN. It outperforms RF, but both perform really well. We prefer the implementation of the ANN because we are providing tools to investigate what features inform the assignment so you don't have to use it as a black box. (This is Omar btw)
Agree. In our (admittedly limited) experience, we see the same thing: RF almost always outperforms the fancier implementations. We have not tried integrating multiple data forms yet, but that's on the radar.