bioRxivMicrobiology
Interpretable Metric Learning in Comparative Metagenomics: The Adaptive Haar-like Distance
Abstract
Random forests have emerged as a promising tool in comparative metagenomics because they can predict environmental characteristics based on microbial composition in datasets where {beta}-diversity metrics fall short of revealing meaningful relationships between samples. Nevertheless, despite this efficacy, they lack biological insight in tandem with their predictions, potentially hindering scientific advancement. To overcome this limitation, we leverage a geometric characterization of random forests to introduce a data-driven phylogenetic {beta}-diversity metric, the adaptive Haar-like distance. This new metric assigns a weight to each internal node (i.e., split or bifurcation) of a reference phylogeny, indicating the relative importance of that node in discerning environmental samples based on their microbial composition. Alongside this, a weighted nearest-neighbors classifier, constructed using the adaptive metric, can be used as a proxy for the random forest while maintaining accuracy on par with that of the original forest and another state-of-the-art classifier, CoDaCoRe. As shown in datasets from diverse microbial environments, however, the new metric and classifier significantly enhance the biological interpretability and visualization of high-dimensional metagenomic samples. Author summaryTraditional phylogenetic {beta}-diversity metrics, particularly weighted and unweighted UniFrac, have had great success in comparing and visualizing high-dimensional metagenomic samples. Nonetheless, these metrics rely upon pre-established biological assumptions that might not capture key microbial players or relationships between some samples. On the contrary, supervised machine learning algorithms, such as random forests, can often capture intricate relationships between microbial samples; however, unveiling these relationships is often challenging due to the intricate inner mechanisms inherent to these algorithms. The adaptive Haar-like distance integrates the merits of {beta}-diversity metrics and random forests, allowing for precise, intuitive, and visual comparison of metagenomic samples, offering valuable scientific insight into the distinctions and associations among microbial environments.
- assay: metagenomics
- research focus: benchmarking
- research focus: clustering
- approach: deep learning
- approach: statistical model
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Beta Diversity Meta-Analysis Shows Transformations Have Broadly Similar Performance in Machine Learning Applications Regardless of Compositional or Phylogenetic Awareness
Daisy Fry Brumit, Alicia A. Sorgen, Anthony A. Fodor·bioRxiv·Jan 23, 2026
- Incorporating genome-based phylogeny and functional similarity into diversity assessments helps to resolve a global collection of human gut metagenomes
Nicholas D. Youngblut, Jacobo de la Cuesta‐Zuluaga, Ruth E. Ley·Environmental MicrobiologyPeer-reviewed·Jan 20, 2022
- MeLSI: Metric Learning for Statistical Inference in Microbiome Community Composition Analysis
Nathan Bresette, Aaron C. Ericsson, … Ai‐Ling Lin·mSystemsPeer-reviewed·Jun 29, 2026
- The Phylogenetic Structure of β-diversity: Covariance Matrix Sparsification of Critical Beta-splitting Trees
Sean S. Svihla, Manuel E. Lladser·bioRxiv·Feb 11, 2026
- Finding phylogeny-aware and biologically meaningful averages of metagenomic samples: L2UniFrac
Wei Wei, Andrew Millward, David Koslicki·BioinformaticsPeer-reviewed·Jun 1, 2023
- PhyloFunc: Phylogeny-informed Functional Distance as a New Ecological Metric for Metaproteomic Data Analysis
Luman Wang, Caitlin M. A. Simopoulos, … Leyuan Li·MicrobiomePeer-reviewed·Feb 11, 2025