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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext e756fde4-764b-4e1a-a703-915e3cc17386Cited 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
