bioRxiv Science⌕ Search

bioRxiv · 10.64898/2025.12.04.692328

MeLSI: Metric Learning for Statistical Inference in Microbiome Community Composition Analysis

Abstract

Microbiome beta diversity analysis relies on distance-based methods including PERMANOVA combined with fixed ecological distance metrics (Bray-Curtis, Euclidean, Jaccard, and UniFrac), which treat all microbial taxa uniformly regardless of their biological relevance to community differences. This "one-size-fits-all" approach may miss subtle but biologically meaningful patterns in complex microbiome data. We present MeLSI (Metric Learning for Statistical Inference), a novel machine learning framework that learns data-adaptive distance metrics optimized for detecting community composition differences in multivariate microbiome analyses. MeLSI employs an ensemble of weak learners using bootstrap sampling, feature subsampling, and gradient-based optimization to learn optimal feature weights, combined with rigorous permutation testing for statistical inference. The learned metrics can be used with PERMANOVA for hypothesis testing and with Principal Coordinates Analysis (PCoA) for ordination visualization. Comprehensive validation on synthetic benchmarks and real datasets shows that MeLSI maintains proper Type I error control while delivering competitive or superior F-statistics when signal structure aligns with CLR-based weighting and, crucially, supplies interpretable feature-weight profiles that clarify which taxa drive group separation. On the Atlas1006 dataset, MeLSI achieved stronger effect sizes than the best traditional methods, and even when performance was comparable, the learned feature weights provided biological insight that fixed metrics cannot supply. MeLSI therefore offers a statistically rigorous tool that augments beta diversity analysis with transparent, data-driven interpretability. IMPORTANCEUnderstanding which microbes differ between groups of interest could reveal therapeutic targets and diagnostic biomarkers. However, current analysis methods treat all microbes equally (similar to using the same ruler to measure everything, regardless of what matters most). This means subtle but clinically important differences may go undetected, especially when only a few key species drive disease while hundreds of "bystander" species add noise. MeLSI solves this by learning which microbes matter most for each specific comparison. In comparing male and female gut microbiomes, MeLSI identified specific bacterial families driving the differences, providing actionable biological insights that standard methods miss. This capability is particularly crucial for detecting early disease biomarkers, where differences are subtle and masked by biological variability. By telling researchers not just whether groups differ, but which specific microbes drive those differences, MeLSI accelerates the path from microbiome data to testable biological hypotheses and clinical applications.

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Bresette, N., Ericsson, A. C., Woods, C., Lin, A.-L.. 2025-12-04. MeLSI: Metric Learning for Statistical Inference in Microbiome Community Composition Analysis. https://doi.org/10.64898/2025.12.04.692328

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Rapid and largely reversible shifts in the canine fecal metabolome during dietary change

Diet can rapidly change the fecal metabolome, but less is known about recovery after the original diet is restored. We used untargeted UPLC-MS metabolomics to analyze 72 fecal samples from nine Pumi dogs during an owner-managed switch from dry food to raw food and back to dry food. Diet phase accounted for a large proportion of variation in both ionization modes. More than 13,000 LC-MS features changed at the first sampling point after the switch to raw food, with a similarly large response after return to dry food. Among features significant in both comparisons, more than 99% changed in opposite directions. At the final sampling point, no positive-mode (ESI+) features and only 13 negative-mode (ESI-) features differed from the second dry-food baseline under the same threshold. BARF-associated patterns persisted in analyses excluding individual dogs and in pedigree-adjusted candidate models, although individual feature effects depended on normalization. Putative metabolites from several biochemical classes differed in their response and recovery. The fecal metabolome therefore changed rapidly and returned largely toward baseline, with differences among dogs.

microbiology↗

Taxonomic and functional concordance between full-length ONT 16S and ONT shotgun metagenomics in the canine gut microbiome

Background: Full-length Oxford Nanopore Technologies (ONT) 16S rRNA sequencing provides a scalable view of microbial community composition and can support phylogeny-based functional prediction, but it is not equivalent to shotgun metagenomics. We asked which biological conclusions are preserved when the same canine fecal specimens are profiled by full-length ONT 16S and ONT whole-genome shotgun (WGS) sequencing, and how their agreement depends on analytical scale, reference representation and classifier. Methods: Ninety-seven fecal specimens from 51 dogs were profiled with both assays from the same DNA extract. Functional profiles predicted from NanoASV/NanoPredict with PICRUSt2 were compared with WGS-supported KEGG Ortholog (KO) profiles generated by Kadath. Taxonomy was benchmarked in a source-genome-matched RefSeq universe and in a host-specific DogMAG universe using minitax and Kraken2. Agreement was evaluated at whole-profile, feature-abundance, detection, between-sample structure and biological-inference scales. Age-associated transfer was assessed with dog-aware continuous mixed models, grouped signed-score analyses and paired/dog-blocked PERMANOVA. Results: Functional whole-profile concordance was high: median within-sample CLR Spearman correlations ranged from 0.781 to 0.860 across developmental strata, while between-sample functional structure remained significant by Mantel (rho=0.543) and Procrustes (r=0.693; both p=0.001). Feature-wise transfer was substantially weaker (median KO-wise CLR Spearman=0.318). Continuous age-associated KO slopes showed substantial cross-assay concordance (Spearman=0.727; signed-score Spearman=0.753; direction agreement=77.9%), although 1,290/5,258 eligible KOs retained significant assay-by-age interactions. Taxonomically, exact genus/species abundance agreement was much lower than agreement in between-sample ecological structure. Host-specific DogMAG improved species-level median Spearman from 0.261 to 0.656 for minitax SpeciesEstimate and from 0.181 to 0.512 for Kraken2. The classifier effect was independent of reference choice: under both RefSeq and DogMAG, minitax yielded stronger 16S-WGS concordance than Kraken2, with all eight prespecified RefSeq paired genus/species endpoints and all 10 DogMAG primary paired endpoints significant after BH correction. The same ordering extended to developmental inference, with DogMAG genus/species age-slope concordance of 0.795/0.799 for SpeciesEstimate versus 0.693/0.702 for Kraken2. Taxonomic Aitchison PERMANOVA detected age-associated structure in every assay/reference/classifier/rank combination, whereas age-by-assay interactions were consistently significant but small (R2 approximately 1.1 to 2.2%). Stricter NanoASV identity thresholds removed substantial 16S abundance without improving species-level agreement. Conclusions: The extent of cross-assay agreement depends on the level of analysis. Full-length ONT 16S preserves broad functional organization, ecological structure and much of the direction of age-associated change, but exact fine-rank composition, individual-feature abundance and effect magnitude remain assay dependent. Host-specific reference representation substantially narrows the taxonomic gap, and classifier choice exerts an additional independent effect: within the same matched reference set, minitax consistently yields stronger 16S-WGS concordance than Kraken2 across abundance, detection, ecological-distance and developmental-inference endpoints. Full-length ONT 16S is therefore well suited to broad ecological screening and hypothesis generation, whereas WGS remains preferable when conclusions depend on quantitative fine-rank composition, directly supported gene content or precise feature-level effect estimates.

microbiology↗

Matrix-controlled emergence of biofilm architecture shapes antimicrobial survival

Biofilms are structured microbial communities whose extracellular matrix is widely regarded as a basis of their protection against antimicrobial compounds. Yet how matrix production by individual bacteria gives rise to collective architecture and antimicrobial protection remains poorly understood. Here, we systematically varied expression of the master biofilm regulator csgD in Salmonella enterica and found that increasing matrix production reorganizes biofilms from dense, isotropic packings into sparse, nematically aligned communities by altering cell-cell interactions. By combining experimentally measured biofilm architectures with reaction-diffusion modeling, we show that these structural changes produce distinct patterns of antimicrobial killing, ranging from preferential killing near the liquid-biofilm interface to more uniform killing throughout the community. Consequently, increasing matrix production unexpectedly reduces antimicrobial survival by shifting the biofilm into different transport regimes, while strain-specific physiological differences further modulate antimicrobial depletion. Rather than acting as a passive barrier, EPS therefore shapes antimicrobial susceptibility by reorganizing biofilm architecture and its transport properties. EPS thus provides a physical link between molecular regulation, collective architecture and antimicrobial survival, providing a quantitative framework for understanding how cellular matrix production generates emergent biofilm function.

microbiology↗