# On UMAP's true loss function

arXiv: https://arxiv.org/abs/2103.14608 · HTML: https://mlsanity.com/paper/2103.14608/

## Key facts

- Cited by 32 papers in the map (data through 14 Oct 2026).
- Builds on 8 of its 23 references that are in the map.
- First posted on arXiv 26 Mar 2021.

## Builds on (most cited first, 8 of 8)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction](https://mlsanity.com/paper/1802.03426/) (2018)
- [Understanding How Dimension Reduction Tools Work: An Empirical Approach to Deciphering t-SNE, UMAP, TriMAP, and PaCMAP for Data Visualization](https://mlsanity.com/paper/2012.04456/) (2020)
- [Kernel Operations on the GPU, with Autodiff, without Memory Overflows](https://mlsanity.com/paper/2004.11127/) (2020)
- [Visualizing Large-scale and High-dimensional Data](https://mlsanity.com/paper/1602.00370/) (2016)
- [TriMap: Large-scale Dimensionality Reduction Using Triplets](https://mlsanity.com/paper/1910.00204/) (2019)
- [Clustering with t-SNE, provably](https://mlsanity.com/paper/1706.02582/) (2017)
- [Consistency of modularity clustering on random geometric graphs](https://mlsanity.com/paper/1604.03993/) (2016)

## Built on by (most cited first, 30 of 32)

- [Learning Topology-Preserving Data Representations](https://mlsanity.com/paper/2302.00136/) (2023)
- [From t-SNE to UMAP with contrastive learning](https://mlsanity.com/paper/2206.01816/) (2022)
- [Geometric Autoencoders -- What You See is What You Decode](https://mlsanity.com/paper/2306.17638/) (2023)
- [Unsupervised visualization of image datasets using contrastive learning](https://mlsanity.com/paper/2210.09879/) (2022)
- [Uniform Manifold Approximation and Projection (UMAP) and its Variants: Tutorial and Survey](https://mlsanity.com/paper/2109.02508/) (2021)
- [ActUp: Analyzing and Consolidating tSNE and UMAP](https://mlsanity.com/paper/2305.07320/) (2023)
- [The Shape of Attraction in UMAP: Exploring the Embedding Forces in Dimensionality Reduction](https://mlsanity.com/paper/2503.09101/) (2025)
- [ParaDime: A Framework for Parametric Dimensionality Reduction](https://mlsanity.com/paper/2210.04582/) (2022)
- [RTD-Lite: Scalable Topological Analysis for Comparing Weighted Graphs in Learning Tasks](https://mlsanity.com/paper/2503.11910/) (2025)
- [Relating tSNE and UMAP to Classical Dimensionality Reduction](https://mlsanity.com/paper/2306.11898/) (2023)
- [Persistent Homology for High-dimensional Data Based on Spectral Methods](https://mlsanity.com/paper/2311.03087/) (2023)
- [Towards One Model for Classical Dimensionality Reduction: A Probabilistic Perspective on UMAP and t-SNE](https://mlsanity.com/paper/2405.17412/) (2024)
- [IsUMap: Manifold Learning and Data Visualization leveraging Vietoris-Rips filtrations](https://mlsanity.com/paper/2407.17835/) (2024)
- [Sailing in high-dimensional spaces: Low-dimensional embeddings through angle preservation](https://mlsanity.com/paper/2406.09876/) (2024)
- [EmbedOR: Provable Cluster-Preserving Visualizations with Curvature-Based Stochastic Neighbor Embeddings](https://mlsanity.com/paper/2509.03703/) (2025)
- [MS-IMAP -- A Multi-Scale Graph Embedding Approach for Interpretable Manifold Learning](https://mlsanity.com/paper/2406.02778/) (2024)
- [FedNE: Surrogate-Assisted Federated Neighbor Embedding for Dimensionality Reduction](https://mlsanity.com/paper/2409.11509/) (2024)
- [Attraction-Repulsion Swarming: A Generalized Framework of t-SNE via Force Normalization and Tunable Interactions](https://mlsanity.com/paper/2411.10617/) (2024)
- [Node Embeddings via Neighbor Embeddings](https://mlsanity.com/paper/2503.23822/) (2025)
- [MAPLE: Self-Supervised Learning-Enhanced Nonlinear Dimensionality Reduction for Visual Analysis](https://mlsanity.com/paper/2601.20173/) (2026)
- [On the continuum limit of t-SNE for data visualization](https://mlsanity.com/paper/2604.12041/) (2026)
- [GiDR-DUN; Gradient Dimensionality Reduction -- Differences and Unification](https://mlsanity.com/paper/2206.09689/) (2022)
- [On the Selection of Tuning Parameters for Patch-Stitching Embedding Methods](https://mlsanity.com/paper/2207.07218/) (2022)
- [Supervised Stochastic Neighbor Embedding Using Contrastive Learning](https://mlsanity.com/paper/2309.08077/) (2023)
- [Merging Hazy Sets with m-Schemes: A Geometric Approach to Data Visualization](https://mlsanity.com/paper/2503.01664/) (2025)
- [Probabilistic Foundations of Fuzzy Simplicial Sets for Nonlinear Dimensionality Reduction](https://mlsanity.com/paper/2512.03899/) (2025)
- [UMAP Is Spectral Clustering on the Fuzzy Nearest-Neighbor Graph](https://mlsanity.com/paper/2602.11662/) (2026)
- [A Spectral Decomposition Framework for Multiscale Nonlinear Dimensionality Reduction](https://mlsanity.com/paper/2604.02535/) (2026)
- [On Out-of-sample Embedding in UMAP](https://mlsanity.com/paper/2606.04451/) (2026)
- [Symmetric Divergence and Normalized Similarity: A Unified Topological Framework for Representation Analysis](https://mlsanity.com/paper/2606.06342/) (2026)

## Abstract (arXiv)

UMAP has supplanted t-SNE as state-of-the-art for visualizing high-dimensional datasets in many disciplines, but the reason for its success is not well understood. In this work, we investigate UMAP's sampling based optimization scheme in detail. We derive UMAP's effective loss function in closed form and find that it differs from the published one. As a consequence, we show that UMAP does not aim to reproduce its theoretically motivated high-dimensional UMAP similarities. Instead, it tries to reproduce similarities that only encode the shared k nearest neighbor graph, thereby challenging the previous understanding of UMAP's effectiveness. Instead, we claim that the key to UMAP's success is its implicit balancing of attraction and repulsion resulting from negative sampling. This balancing in turn facilitates optimization via gradient descent. We corroborate our theoretical findings on toy and single cell RNA sequencing data.
