Skip to Content
DocumentationExample-driven tutorial: multimodal experimentsOverview

Overview

This tutorial demonstrates how to run a multimodal experiment that fuses microbiota taxonomic profiles with metabolomics data. Both modalities come from the same IBD cohort (Franzosa et al., 2019) used in the single-modality tutorials.

What changes compared to single-modality experiments

A single-modality experiment uses one data source. A multimodal experiment adds one or more secondary modalities and a set of fusion strategies that control how the modalities are combined during training and prediction. The key additions are:

  • ModalityConfig describes each secondary modality (file path, sample ID column, NaN handling).
  • MultimodalConfig groups the secondary modalities, lists the fusion strategies to evaluate, and controls whether single-modality baselines are also produced (run_siso).
  • FusionConfig specifies the fusion approach (early or late) and the concrete algorithm (e.g., CONCAT, MEAN).

The primary modality (microbiome) is still configured through microbiome_file, taxonomic_configs, and transform_configs as before. The secondary modalities are passed through multimodal_config.

Fusion strategies used in this tutorial

StrategyTypeDescription
Early fusionCONCATConcatenates microbiome and metabolomics features into a single feature matrix before training.
Late fusionMEANTrains separate models on each modality, then averages their prediction probabilities.

For a full list of available fusion strategies, see Fusion strategies.

Tutorial structure

PageContent
Data preparationWhere to find download and preparation scripts for both modalities.
Experiment configurationSecondary modality, fusion strategies, and full experiment assembly.
Running the experimentExecution and output structure.

Source files

The complete experiment script is at example/IBD/ibd_franzosa_multimodal.py.

Last updated on