Uniform Manifold Approximation and Projection (UMAP) Reveals Composite Patterns and Resolves Visualization Artifacts in Microbiome Data

George Armstrong, Cameron Martino, Gibraan Rahman, Antonio González, Yoshiki Vázquez‐Baeza, Gal Mishne, Rob KnightmSystems 2021 · DOI

TL;DR

This paper introduces Uniform Manifold Approximation and Projection (UMAP) as a powerful alternative to Principal Coordinate Analysis (PCoA) for visualizing high-dimensional microbiome data. UMAP excels at revealing complex cluster structures and ecological gradients, offering improved interpretability and potentially resolving visualization artifacts often seen with PCoA.

What Problem Does This Paper Address?

Microbiome data is notoriously sparse and high-dimensional, making it challenging to visualize and understand the relationships between microbial communities. The standard approach involves calculating beta diversity (differences between samples) and then reducing dimensionality using Principal Coordinate Analysis (PCoA). While PCoA is widely adopted, it can sometimes introduce visualization artifacts or obscure subtle patterns, especially when clusters are composed of multiple subgroups or when dealing with ecological gradients. This paper addresses the need for a more robust and informative dimensionality reduction technique for microbiome data.

Methods

The core of this paper is a comparative analysis of Uniform Manifold Approximation and Projection (UMAP) and Principal Coordinate Analysis (PCoA) for microbiome data visualization.

  • UMAP: This method constructs a high-dimensional graph representing local relationships between data points and then optimizes a low-dimensional embedding to preserve as much of this graph structure as possible, while also attempting to maintain global structure. Key parameters explored are n_neighbors (controlling local neighborhood size) and min_dist (controlling how tightly clustered points can be).
  • PCoA: This is the established method, performing an eigendecomposition on a distance matrix to preserve pairwise distances linearly.
  • Beta Diversity Metrics: Both UMAP and PCoA were applied to generalized distance matrices, allowing for the use of various beta diversity metrics suitable for sparse microbiome data, such as Bray-Curtis and UniFrac.
  • Evaluation Metrics: The authors used both qualitative visual inspection of the embeddings and quantitative measures like Linear Discriminant Analysis (LDA) for classification accuracy and silhouette scores for cluster separation and density.

Datasets

The authors evaluated UMAP and PCoA using three distinct real-world datasets:

  1. Keyboard and Finger Data: A small dataset (99 samples, 1,399 features) from different subjects' keyboards and fingers, used to assess cluster recovery and subject-specific patterns.
  2. "88 Soils" Data: A larger dataset (88 samples, 5,628 features) from soil samples with associated environmental measurements (pH, soil moisture deficit, mean annual temperature), used to evaluate the visualization of ecological gradients.
  3. Human Microbiome Project (HMP) Data: A very large dataset (8,280 samples, 13,318 features) from various body sites and processed with different sequencing primers, used to assess scalability and the ability to resolve technical variations and biological differences.

Key Insights and Ideas

  • UMAP Uncovers Hidden Clusters: UMAP can reveal finer-grained cluster structures within microbiome datasets, particularly when existing clusters are composed of multiple subgroups that PCoA might merge.
  • Resolving Ecological Gradients: UMAP demonstrates a superior ability to visualize ecological gradients (e.g., along pH or temperature) compared to PCoA, often resolving the "horseshoe artifact" seen in PCoA and showing clearer correlations with environmental variables in fewer dimensions.
  • Preserving Global Geometry is Key: The authors emphasize that parameter choices for UMAP, particularly n_neighbors, are crucial for preserving the global structure of the data, which is essential for understanding the relationships between different clusters.
  • Complementary, Not Replacement: UMAP is presented as a valuable complement to PCoA, offering different perspectives and potentially resolving artifacts that PCoA might introduce.

Key Results

  • Improved Cluster Separation: In the keyboard data, UMAP (with specific parameter settings) achieved higher LDA classification accuracy for sample type compared to PCoA, indicating better separability.
  • Clearer Gradient Visualization: For the soil data, UMAP showed a stronger correlation with environmental variables like pH and mean annual temperature in its first two dimensions compared to PCoA, which often struggled with the horseshoe artifact.
  • Scalability and Technical Variation Resolution: On the large HMP dataset, UMAP effectively separated samples based on sequencing primers and body sites in just two dimensions, outperforming PCoA which required more dimensions to resolve these differences.
  • Parameter Recommendations: The authors suggest parameter settings that prioritize preserving global geometry, recommending high n_neighbors values (e.g., 80 for soils, 800 for HMP) and min_dist=1.

Limitations and Future Work

  • Initialization Sensitivity: The authors note that UMAP's results can be sensitive to initialization, particularly when preserving global structure. They found that only about 34/50 initializations with specific parameters produced the correct relative positioning of clusters.
  • Parameter Tuning: While they provide recommendations, finding the optimal UMAP parameters for a specific dataset might still require some experimentation.
  • Future Work: The paper highlights the availability of UMAP via QIIME 2 and Qiita plugins, encouraging its routine adoption in microbiome research. Further exploration of UMAP's performance with different beta diversity metrics and its application to other types of biological data are implied.

Summary updated

Abstract

Microbiome data are sparse and high dimensional, so effective visualization of these data requires dimensionality reduction. To date, the most commonly used method for dimensionality reduction in the microbiome is calculation of between-sample microbial differences (beta diversity), followed by principal-coordinate analysis (PCoA). Uniform Manifold Approximation and Projection (UMAP) is an alternative method that can reduce the dimensionality of beta diversity distance matrices. Here, we demonstrate the benefits and limitations of using UMAP for dimensionality reduction on microbiome data. Using real data, we demonstrate that UMAP can improve the representation of clusters, especially when the clusters are composed of multiple subgroups. Additionally, we show that UMAP provides improved correlation of biological variation along a gradient with a reduced number of coordinates of the resulting embedding. Finally, we provide parameter recommendations that emphasize the preservation of global geometry. We therefore conclude that UMAP should be routinely used as a complementary visualization method for microbiome beta diversity studies. <b>IMPORTANCE</b> UMAP provides an additional method to visualize microbiome data. The method is extensible to any beta diversity metric used with PCoA, and our results demonstrate that UMAP can indeed improve visualization quality and correspondence with biological and technical variables of interest. The software to perform this analysis is available under an open-source license and can be obtained at https://github.com/knightlab-analyses/umap-microbiome-benchmarking; additionally, we have provided a QIIME 2 plugin for UMAP at https://github.com/biocore/q2-umap.
BibTeX
@inproceedings{armstrong2021uniform,
  author = {George Armstrong and Cameron Martino and Gibraan Rahman and Antonio González and Yoshiki Vázquez‐Baeza and Gal Mishne and Rob Knight},
  title = {{Uniform Manifold Approximation and Projection (UMAP) Reveals Composite Patterns and Resolves Visualization Artifacts in Microbiome Data}},
  booktitle = {mSystems},
  year = {2021},
  doi = {10.1128/msystems.00691-21},
}
Figure