tensorflow / tensorflow/tensorboard

Embedding Projector: UMAP and TSNE projections broken for embeddings that are not normalized

Open
#6,271 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

Chrome 111.0.5563.64

Issue description

When using embeddings that are not normalized and sphereized, the UMAP and T-SNE are incorrect or not simply loading.
See #5547 for a previous bug report.

the reason is that knn expects normalized vectors for cosine distance (cosDistNorm) rather than arbitrary vectors.

Alternative repo:

  • Build and launch projector (must be from master, not https://projector.tensorflow.org)
  • Uncheck "Sphereize data" on the default Word2Vec 10k dataset
  • Switch projection from "PCA" to either t-SNE or UMAP
  • See the UI breaks with "Initializing t-SNE..."/"Initialize UMAP..." modal loading forever

related to: #2421

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tensorboard/plugins/projector/vz_projector/data.ts around the cited knn cosine-distance logic, then follow the projector build instructions in tensorboard/plugins/projector/README.md. Reproduce the Iris or Word2Vec 10k case with Sphereize data unchecked and compare T-SNE and UMAP behavior; done means both projections initialize and produce the expected result for non-normalized embeddings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.