Blog

Can Microbiome Foundation Models Transfer Across Biomes?

Can Microbiome Foundation Models Transfer Across Biomes?

Microbial communities are everywhere: in the human gut, on skin, in soil, in oceans, in wastewater systems, and in engineered bioreactors. These environments look very different biologically, and the datasets we have for them are uneven. Some biomes are deeply represented in public repositories. Others remain sparse, fragmented, or hard to measure at scale.

Microbial communities are everywhere: in the human gut, on skin, in soil, in oceans, in wastewater systems, and in engineered bioreactors. These environments look very different biologically, and the datasets we have for them are uneven. Some biomes are deeply represented in public repositories. Others remain sparse, fragmented, or hard to measure at scale.

That imbalance creates a central question for microbiome AI: if a model learns from microbiomes in one set of environments, can that help us understand microbiomes from another?

This is the question we wanted to test directly. A useful microbiome foundation model should not only work in the exact ecological context it has already seen. It should learn patterns that remain useful when the biological setting changes.

In our broader work1, we built Atlas, a collection of 539,308 microbiome samples from MGnify, trained the Waypoint family of GPT-2-style microbiome foundation models, and evaluated them on Compass, a benchmark of eight tasks spanning biome classification, drug-microbiome interactions, drug degradation, and infant gut development.

Here, we focus on one result from that work: Waypoint models can transfer useful information between microbiome domains.

The Experiment

Compass is dominated by gut and other host-associated tasks. That makes it a useful benchmark, but it also creates an obvious concern. If a model does well on Compass, maybe it is just because it has already seen lots of gut and human-associated microbiomes during training.

To test this, we trained the same 6M-parameter Waypoint model on five different versions of Atlas:

·       The full Atlas dataset.

·       Only human-associated samples.

·       Only gut samples.

·       All samples except human-associated samples.

·       All samples except gut samples.

The last two conditions are the important ones. In one case, the model was trained without human-associated microbiomes. In the other, it was trained without gut microbiomes. We then fine-tuned and evaluated those models on Compass, where gut tasks make up most of the benchmark.

Everything else was held constant: the model architecture, tokenizer, training procedure, fine-tuning setup, and evaluation benchmark. The point was to change the microbiome domains available during training, while keeping the rest of the experiment the same.

We also repeated the experiment with each training subset downsampled to 110,000 samples. That gave us a way to check whether the result was simply driven by dataset size. So the first benchmark view reflects both the type of data used and the amount of data available. The size-controlled version asks whether the same pattern holds when each training set is reduced to the same number of samples. Samples with missing biome metadata were not used for the subset definitions, because we could not confidently say whether they belonged inside or outside a restricted domain.

Atlas subset / category

Samples

Full Atlas

539,308

Only human-associated

154,094

Only gut

112,709

Excluding human-associated

246,511

Excluding gut

287,896

Missing biome metadata (not used in subset models)

138,703

If Waypoint only learned the quirks of gut- or human-associated microbiomes, removing those samples should have removed most of the benefit, but if Waypoint learned broader patterns in microbial communities, then a model trained without gut or human-associated samples should still be capable on gut downstream tasks. That is the crux of the experiment. We are not just asking whether more training helps. We are asking whether information learned from one part of the microbial world can still be useful in another.

The Benchmark Results

First, panel A shows the full Compass benchmark with each training subset at its natural size. This is the broadest comparison. The model trained on the full Atlas dataset performs best, which is expected because it has the most data and the broadest coverage. But the key point is that every trained model beats the non-pretrained version, including the models trained without gut or human-associated samples.

Second, panel B repeats the benchmark with Task 1 removed. Task 1 is the broad environmental biome-classification task, and it is the only Compass task that is not focused on the human gut microbiome. Removing it gives a cleaner view of performance on the gut-heavy part of the benchmark. In this view, the gut- and human-focused models move toward the top, as expected, but the models trained without gut or human-associated samples still remain clearly above the non-pretrained model.

Third, panels C and D ask whether the result is just about dataset size. The full Atlas dataset is much larger than the domain-restricted subsets, so we also compare models where each training subset is downsampled to the same size. Scores drop slightly, which is expected, but the overall pattern remains: trained models outperform the non-pretrained version, and the excluded-domain models still retain much of the benefit.

Finally, the figure lets us compare models trained on data that matches the gut-heavy benchmark with models trained on data that deliberately does not match it. The only-human and only-gut models are the matched cases. The exclude-human and exclude-gut models are the deliberately mismatched cases. The matched models can do slightly better on the gut-focused benchmark, but the mismatched models still perform well above the non-pretrained baseline. That is the transfer result.

The Main Result: Transfer Works

Every trained Waypoint model substantially outperformed the non-pretrained version.

That includes the model trained without gut samples. It also includes the model trained without human-associated samples. Even when the model had not seen the domain that dominates Compass, it still recovered the majority of the benefit. This is the key result: Waypoint is not only memorizing biome-specific signatures. It appears to learn representations of microbial communities that remain useful after a deliberate shift in ecological context. In plain terms, the model seems to carry useful biological signal across biomes.

Why This Matters

Most microbiome domains do not have the data density of the human gut. Public repositories contain far more samples for some environments than for others, and labelled datasets are even more uneven.

If every new application required a large, perfectly matched microbiome corpus, foundation models would be useful only for the best-sampled areas of the field. The transfer result points to a more practical possibility: models trained on broad microbial data can provide useful representations even for domains where data is limited.

That does not mean domain-specific data becomes unnecessary. Fine-tuning still needs relevant labelled examples. Evaluation still needs carefully designed benchmarks. And any real clinical, industrial, agricultural, or environmental application will still depend on high-quality data from that setting.

But the starting point changes. An under-sampled biome may be able to benefit from structure learned elsewhere in the microbial world.

For fields where data collection is slow, expensive, or logistically difficult, that is a meaningful shift.

What This Does Not Show

The result is encouraging, but it has boundaries.

Compass currently emphasizes gut and environmental microbiome tasks. We still need broader evaluation across oral, skin, respiratory, industrial, agricultural, and environmental microbiomes. We also need to understand how transfer behaves across sequencing platforms, disease contexts, intervention types, and functional readouts.

Finally, cross-biome transfer is not a substitute for good downstream data. It gives the model a better starting point, but real-world use still depends on task-relevant labels, careful validation, and benchmarks that reflect the biological question being asked.

The Bottom Line

The transfer experiments show that microbiome foundation models can learn representations that generalize across ecological domains.

Models trained without gut or human-associated samples still substantially outperform non-pretrained models on a benchmark dominated by human-gut tasks. That is the key result: Waypoint can learn useful structure from one set of microbial environments and apply it to another.

For microbiome AI, this is an important signal. Foundation models do not need to relearn biology from scratch for every new biome. They can learn from the microbial world at large, then adapt that knowledge to the specific biological question in front of them.

1. Treloar, N. J., Ur-Rehman, S. & Yang, J. Learning the Language of the Microbiome with Transformers. bioRxiv 2026.05.02.722381 (2026) doi:10.64898/2026.05.02.722381.

That imbalance creates a central question for microbiome AI: if a model learns from microbiomes in one set of environments, can that help us understand microbiomes from another?

This is the question we wanted to test directly. A useful microbiome foundation model should not only work in the exact ecological context it has already seen. It should learn patterns that remain useful when the biological setting changes.

In our broader work1, we built Atlas, a collection of 539,308 microbiome samples from MGnify, trained the Waypoint family of GPT-2-style microbiome foundation models, and evaluated them on Compass, a benchmark of eight tasks spanning biome classification, drug-microbiome interactions, drug degradation, and infant gut development.

Here, we focus on one result from that work: Waypoint models can transfer useful information between microbiome domains.

The Experiment

Compass is dominated by gut and other host-associated tasks. That makes it a useful benchmark, but it also creates an obvious concern. If a model does well on Compass, maybe it is just because it has already seen lots of gut and human-associated microbiomes during training.

To test this, we trained the same 6M-parameter Waypoint model on five different versions of Atlas:

·       The full Atlas dataset.

·       Only human-associated samples.

·       Only gut samples.

·       All samples except human-associated samples.

·       All samples except gut samples.

The last two conditions are the important ones. In one case, the model was trained without human-associated microbiomes. In the other, it was trained without gut microbiomes. We then fine-tuned and evaluated those models on Compass, where gut tasks make up most of the benchmark.

Everything else was held constant: the model architecture, tokenizer, training procedure, fine-tuning setup, and evaluation benchmark. The point was to change the microbiome domains available during training, while keeping the rest of the experiment the same.

We also repeated the experiment with each training subset downsampled to 110,000 samples. That gave us a way to check whether the result was simply driven by dataset size. So the first benchmark view reflects both the type of data used and the amount of data available. The size-controlled version asks whether the same pattern holds when each training set is reduced to the same number of samples. Samples with missing biome metadata were not used for the subset definitions, because we could not confidently say whether they belonged inside or outside a restricted domain.

Atlas subset / category

Samples

Full Atlas

539,308

Only human-associated

154,094

Only gut

112,709

Excluding human-associated

246,511

Excluding gut

287,896

Missing biome metadata (not used in subset models)

138,703

If Waypoint only learned the quirks of gut- or human-associated microbiomes, removing those samples should have removed most of the benefit, but if Waypoint learned broader patterns in microbial communities, then a model trained without gut or human-associated samples should still be capable on gut downstream tasks. That is the crux of the experiment. We are not just asking whether more training helps. We are asking whether information learned from one part of the microbial world can still be useful in another.

The Benchmark Results

First, panel A shows the full Compass benchmark with each training subset at its natural size. This is the broadest comparison. The model trained on the full Atlas dataset performs best, which is expected because it has the most data and the broadest coverage. But the key point is that every trained model beats the non-pretrained version, including the models trained without gut or human-associated samples.

Second, panel B repeats the benchmark with Task 1 removed. Task 1 is the broad environmental biome-classification task, and it is the only Compass task that is not focused on the human gut microbiome. Removing it gives a cleaner view of performance on the gut-heavy part of the benchmark. In this view, the gut- and human-focused models move toward the top, as expected, but the models trained without gut or human-associated samples still remain clearly above the non-pretrained model.

Third, panels C and D ask whether the result is just about dataset size. The full Atlas dataset is much larger than the domain-restricted subsets, so we also compare models where each training subset is downsampled to the same size. Scores drop slightly, which is expected, but the overall pattern remains: trained models outperform the non-pretrained version, and the excluded-domain models still retain much of the benefit.

Finally, the figure lets us compare models trained on data that matches the gut-heavy benchmark with models trained on data that deliberately does not match it. The only-human and only-gut models are the matched cases. The exclude-human and exclude-gut models are the deliberately mismatched cases. The matched models can do slightly better on the gut-focused benchmark, but the mismatched models still perform well above the non-pretrained baseline. That is the transfer result.

The Main Result: Transfer Works

Every trained Waypoint model substantially outperformed the non-pretrained version.

That includes the model trained without gut samples. It also includes the model trained without human-associated samples. Even when the model had not seen the domain that dominates Compass, it still recovered the majority of the benefit. This is the key result: Waypoint is not only memorizing biome-specific signatures. It appears to learn representations of microbial communities that remain useful after a deliberate shift in ecological context. In plain terms, the model seems to carry useful biological signal across biomes.

Why This Matters

Most microbiome domains do not have the data density of the human gut. Public repositories contain far more samples for some environments than for others, and labelled datasets are even more uneven.

If every new application required a large, perfectly matched microbiome corpus, foundation models would be useful only for the best-sampled areas of the field. The transfer result points to a more practical possibility: models trained on broad microbial data can provide useful representations even for domains where data is limited.

That does not mean domain-specific data becomes unnecessary. Fine-tuning still needs relevant labelled examples. Evaluation still needs carefully designed benchmarks. And any real clinical, industrial, agricultural, or environmental application will still depend on high-quality data from that setting.

But the starting point changes. An under-sampled biome may be able to benefit from structure learned elsewhere in the microbial world.

For fields where data collection is slow, expensive, or logistically difficult, that is a meaningful shift.

What This Does Not Show

The result is encouraging, but it has boundaries.

Compass currently emphasizes gut and environmental microbiome tasks. We still need broader evaluation across oral, skin, respiratory, industrial, agricultural, and environmental microbiomes. We also need to understand how transfer behaves across sequencing platforms, disease contexts, intervention types, and functional readouts.

Finally, cross-biome transfer is not a substitute for good downstream data. It gives the model a better starting point, but real-world use still depends on task-relevant labels, careful validation, and benchmarks that reflect the biological question being asked.

The Bottom Line

The transfer experiments show that microbiome foundation models can learn representations that generalize across ecological domains.

Models trained without gut or human-associated samples still substantially outperform non-pretrained models on a benchmark dominated by human-gut tasks. That is the key result: Waypoint can learn useful structure from one set of microbial environments and apply it to another.

For microbiome AI, this is an important signal. Foundation models do not need to relearn biology from scratch for every new biome. They can learn from the microbial world at large, then adapt that knowledge to the specific biological question in front of them.

1. Treloar, N. J., Ur-Rehman, S. & Yang, J. Learning the Language of the Microbiome with Transformers. bioRxiv 2026.05.02.722381 (2026) doi:10.64898/2026.05.02.722381.

Related articles