From -SNE to UMAP with contrastive learning
Sebastian Damrich, Jan Niklas Böhm, Fred A. Hamprecht, Dmitry Kobak
Abstract
Neighbor embedding methods -SNE and UMAP are the de facto standard for visualizing high-dimensional datasets. Motivated from entirely different viewpoints, their loss functions appear to be unrelated. In practice, they yield strongly differing embeddings and can suggest conflicting interpretations of the same data. The fundamental reasons for this and, more generally, the exact relationship between -SNE and UMAP have remained unclear. In this work, we uncover their conceptual connection via a new insight into contrastive learning methods. Noise-contrastive estimation can be used to optimize -SNE, while UMAP relies on negative sampling, another contrastive method. We find the precise relationship between these two contrastive methods and provide a mathematical characterization of the distortion introduced by negative sampling. Visually, this distortion results in UMAP generating more compact embeddings with tighter clusters compared to -SNE. We exploit this new conceptual connection to propose and implement a generalization of negative sampling, allowing us to interpolate between (and even extrapolate beyond) -SNE and UMAP and their respective embeddings. Moving along this spectrum of embeddings leads to a trade-off between discrete / local and continuous / global structures, mitigating the risk of over-interpreting ostensible features of any single embedding. We provide a PyTorch implementation.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
12 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Dimension Reduction with Locally Adjusted Graphs cites Unsupervised visualization of image datasets using contrastive learning
- Unsupervised visualization of image datasets using contrastive learning cites On UMAP's True Loss Function
- Unsupervised visualization of image datasets using contrastive learning cites A Simple Framework for Contrastive Learning of Visual Representations
- Unsupervised Learning of Visual Features by Contrasting Cluster Assignments cites A Simple Framework for Contrastive Learning of Visual Representations
- Understanding Negative Samples in Instance Discriminative Self-supervised Representation Learning cites Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
- Understanding Negative Samples in Instance Discriminative Self-supervised Representation Learning cites A Simple Framework for Contrastive Learning of Visual Representations
- Contrastive and Non-Contrastive Self-Supervised Learning Recover Global and Local Spectral Embedding Methods cites A Simple Framework for Contrastive Learning of Visual Representations
- Navigating the Effect of Parametrization for Dimensionality Reduction cites Unsupervised visualization of image datasets using contrastive learning
- Navigating the Effect of Parametrization for Dimensionality Reduction cites Contrastive and Non-Contrastive Self-Supervised Learning Recover Global and Local Spectral Embedding Methods
- Improving neural network representations using human similarity judgments cites A Simple Framework for Contrastive Learning of Visual Representations
Cited by top-tier papers12
- Improving neural network representations using human similarity judgmentsLukas Muttenthaler, Lorenz Linhardt, Jonas Dippel, Robert A. Vandermeulen et al.NeurIPS 2023 · 61 citations
- Dimension Reduction with Locally Adjusted GraphsYingfan Wang, Yiyang Sun, Haiyang Huang, Cynthia RudinAAAI 2025 · 10 citations
- Navigating the Effect of Parametrization for Dimensionality ReductionHaiyang Huang, Yingfan Wang, Cynthia RudinNeurIPS 2024 · 8 citations
- Random Forest Autoencoders for Guided Representation LearningAdrien Aumon, Shuang Ni, Myriam Lizotte, Guy Wolf et al.NeurIPS 2025 · 7 citations
- Unsupervised visualization of image datasets using contrastive learningJan Niklas Böhm, Philipp Berens, Dmitry KobakICLR 2023 · 6 citations
Builds on10
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Unsupervised Learning of Visual Features by Contrasting Cluster AssignmentsMathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal et al.NeurIPS 2020 · 5,249 citations
- Contrastive and Non-Contrastive Self-Supervised Learning Recover Global and Local Spectral Embedding MethodsRandall Balestriero, Yann LeCunNeurIPS 2022 · 189 citations
- On UMAP's True Loss FunctionSebastian Damrich, Fred A. HamprechtNeurIPS 2021 · 58 citations
- Understanding Negative Samples in Instance Discriminative Self-supervised Representation LearningKento Nozawa, Issei SatoNeurIPS 2021 · 56 citations
Related papers
- Interactive Visual Cluster Analysis by Contrastive Dimensionality ReductionJiazhi Xia, Linquan Huang, Weixing Lin, Xin Zhao et al.IEEE VIS 2022 · 38 citations
- Your Contrastive Learning Is Secretly Doing Stochastic Neighbor EmbeddingTianyang Hu, Zhili Liu, Fengwei Zhou, Wenjia Wang et al.ICLR 2023 · 3 citations
- SpaceMAP: Visualizing High-Dimensional Data by Space ExpansionXinrui Zu, Qian TaoICML 2022 · 12 citations
- Joint t-SNE for Comparable Projections of Multiple High-Dimensional DatasetsYinqiao Wang, Lu Chen, Jaemin Jo, Yunhai WangIEEE VIS 2021 · 33 citations
- Federated t-SNE and UMAP for Distributed Data VisualizationDong Qiao, Xinxian Ma, Jicong FanAAAI 2025 · 3 citations
