Description

UMAP (Uniform Manifold Approximation and Projection) is a non-linear dimensionality reduction method that turns high-dimensional data into a two- or three-dimensional map for plotting. It assumes the data lie on a lower-dimensional curved surface, called a manifold, and links each point to its nearest neighbours, giving each link a strength that says how likely the two points are to be neighbours. It then arranges the points on the map so that the link strengths there match those in the original space as closely as possible. Like t-SNE, it concentrates on keeping near neighbours together, so groups of similar items appear as clusters, whether the points are raw data or a model's embeddings. Its authors argue that it keeps more of the large-scale layout than t-SNE and runs faster, but gaps between clusters and cluster sizes should not be read as exact.

Example Use Cases

Explainability

A bioinformatics team projects single-cell expression data with UMAP and checks whether cell populations annotated by hand form distinct groups before using those labels to train a classifier. Populations that merge on the map are flagged as labels the classifier may struggle to separate.

A language-technology team projects the sentence embeddings of a customer-support classifier with UMAP, colouring each message by the queue the model routes it to. It checks whether each queue is a coherent topic or a mix of unrelated ones, and decides whether to retrain the model.

A retail analytics team reduces several hundred behavioural and demographic features to two dimensions with UMAP and colours customers by the segments used in a churn model. It checks whether the segments occupy separate regions and where they overlap, so that segment boundaries are treated as soft.

Limitations

  • The number of neighbours sets the scale at which structure is detected. Small values show fine detail but fragment the data and read noise as structure, and large values blur small groups, so the same dataset can tell different stories. Report the settings used.
  • UMAP preserves neighbourhood topology, not distances or densities. Gaps between clusters and cluster sizes should not be read as quantities, and the map's axes have no meaning, so it cannot show which features separate the groups.
  • It can find apparent structure in noise, especially in small or very noisy samples, where the authors warn of poor maps below about 500 points. A tidy-looking cluster is not evidence on its own.
  • Results vary between runs and under subsampling because neighbour search and optimisation are stochastic. Fix the random seed and check that the conclusion survives a rerun on a subsample.
  • It rests on a chosen distance measure and on the data forming a connected, locally smooth manifold. Where the distance suits the data badly, for example mixed numeric and categorical features, the neighbour graph and so the map may mislead.

Resources

Research Papers

UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
Leland McInnes, John Healy, and James Melville•Feb 9, 2018

UMAP (Uniform Manifold Approximation and Projection) is a novel manifold learning technique for dimension reduction. UMAP is constructed from a theoretical framework based in Riemannian geometry and algebraic topology. The result is a practical scalable algorithm that applies to real world data. The UMAP algorithm is competitive with t-SNE for visualization quality, and arguably preserves more of the global structure with superior run time performance. Furthermore, UMAP has no computational restrictions on embedding dimension, making it viable as a general purpose dimension reduction technique for machine learning.

UMAP: Uniform Manifold Approximation and Projection
Leland McInnes et al.•Sep 2, 2018

Uniform Manifold Approximation and Projection (UMAP) is a dimension reduction technique that can be used for visualisation similarly to t-SNE, but also for general non-linear dimension reduction. UMAP has a rigorous mathematical foundation, but is simple to use, with a scikit-learn compatible API. UMAP is among the fastest manifold learning implementations available -significantly faster than most t-SNE implementations.

Software Packages

umap
Jul 2, 2017

Uniform Manifold Approximation and Projection

Tutorials

Basic UMAP Usage — umap documentation
Uniform manifold approximation and projection
John Healy and Leland McInnes•Nov 21, 2024

Documentations

How UMAP Works — umap 0.5.8 documentation
Umap-learn Developers•Jan 1, 2018

Tags

Explainability Dimensions

Representation Analysis:
Explanation Target:
Properties:
Explanatory Scope:

Other Categories

Applicable Models:
Data Requirements:
Data Type:
Evidence Type:
Expertise Needed:
Lifecycle Stage: