SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.01816 · ICLR · 2023

FROM t-SNE TO UMAP WITH CONTRASTIVE LEARNING

Sebastian Damrich, Jan Böhm, Fred Hamprecht, Dmitry Kobak

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
berenslab/contrastive-ne canonical 6 of 7
FunctionStatusWhere it lives
jitter Ran berenslab/contrastive-ne/src/cne/_cne.py
code served (permissive licence) · get_code("57eb0722ae52ab9d")
make_neighbor_indices Ran berenslab/contrastive-ne/src/cne/cne.py
code served (permissive licence) · get_code("0b838b46c498ed21")
make_neighbor_indices Ran berenslab/contrastive-ne/src/cne/old_loss_implementation.py
code served (permissive licence) · get_code("5d3d1d040a36375b")
new_lr Ran berenslab/contrastive-ne/src/cne/cne.py
code served (permissive licence) · get_code("bd38d9c485386351")
rescale Ran berenslab/contrastive-ne/src/cne/_cne.py
code served (permissive licence) · get_code("926a223b1588a59c")
spectral Ran berenslab/contrastive-ne/src/cne/_cne.py
code served (permissive licence) · get_code("e3479555196b6fc9")
train Not yet run berenslab/contrastive-ne/src/cne/cne.py
code served (permissive licence) · get_code("86079601d15d218a")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Neighbor embedding methods t-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 t-SNE and UMAP have remained unclear. In this work, we uncover their conceptual connection via a new insight into contrastive learning methods. Noisecontrastive estimation can be used to optimize t-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 t-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) t-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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2206.01816")
get_code_for_paper("2206.01816")
have("2206.01816")

Connect an agent — have() is free.