TOPICS
Search

Uniform Manifold Approximation and Projection


Uniform manifold approximation and projection (UMAP) is a nonlinear dimensionality reduction algorithm that constructs a weighted graph of local similarities and computes low-dimensional coordinates for its vertices (McInnes et al. 2020). Its two stages are construction of local affinity weights and optimization of a layout. The weights are interpreted as membership strengths in a fuzzy set of graph edges.

For a nondegenerate formulation, let x_1,...,x_n be distinct points in a metric space with distance d, and let N_i contain the indices of the k closest other points to x_i, where 3<=k<n. Assume that each x_i has a unique closest neighbor, and put rho_i=min_(j in N_i)d(x_i,x_j). For j in N_i, define the directed affinity

 p_(j|i)=exp(-(max{0,d(x_i,x_j)-rho_i})/(sigma_i)),
(1)

where the local scale sigma_i>0 is chosen so that

 sum_(j in N_i)p_(j|i)=log_2k.
(2)

Set p_(j|i)=0 for j not in N_i, including j=i. Under the stated assumptions, the sum increases continuously from 1 to k as sigma_i increases from zero to infinity, so the scale is uniquely determined. Tied or repeated data require additional conventions for the local scales.

The two directed affinities are combined into the symmetric weight

 w_(ij)=p_(j|i)+p_(i|j)-p_(j|i)p_(i|j).
(3)

This is the probabilistic union rule for two fuzzy set membership strengths. It produces a weighted graph with 0<=w_(ij)<=1 and at most nk graph edges. A large weight denotes strong local similarity rather than a large distance.

For low-dimensional coordinates y_i in R^m, define

 q_(ij)=1/(1+a||y_i-y_j||_2^(2b)),
(4)

where a,b>0 control the similarity curve, R denotes the real numbers, and ||·||_2 is the l2-norm. The ideal layout objective is the sum of pairwise Bernoulli cross entropies,

 C(Y)=-sum_(1<=i<j<=n)[w_(ij)lnq_(ij)+(1-w_(ij))ln(1-q_(ij))],
(5)

with limiting conventions at zero. This differs from the original fuzzy-set objective only by terms independent of the coordinates Y=(y_1,...,y_n). It favors proximity for pairs with large w_(ij) and separation for pairs with small w_(ij).

The practical algorithm samples attractive interactions along graph edges. It approximates repulsion by sampling pairs of vertices, a procedure called negative sampling. Damrich and Hamprecht (2021) showed that negative sampling changes the relative weighting of attraction and repulsion. These updates therefore are not unbiased stochastic gradients of the full pairwise cross entropy above.

The layout stage can also start from an existing weighted graph with affinity weights, without constructing it from a collection of points. For m=2, these coordinates can be used for graph drawing. Such a layout need not be a crossing-free graph embedding and does not guarantee preservation of all graph distances.


See also

Cross Entropy, Dimensionality Reduction, Graph Drawing, Weighted Graph

Explore with Wolfram|Alpha

References

Damrich, S. and Hamprecht, F. A. "On UMAP's True Loss Function." In Advances in Neural Information Processing Systems 34 (Ed. M. Ranzato, A. Beygelzimer, Y. Dauphin, P. S. Liang, and J. Wortman Vaughan). Red Hook, NY: Curran Associates, pp. 5798-5809, 2021. https://proceedings.neurips.cc/paper/2021/hash/2de5d16682c3c35007e4e92982f1a2ba-Abstract.html.McInnes, L.; Healy, J.; and Melville, J. "UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction." 18 Sep 2020. https://arxiv.org/abs/1802.03426.

Cite this as:

Weisstein, Eric W. "Uniform Manifold Approximation and Projection." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/UniformManifoldApproximationandProjection.html

Subject classifications