tensorflow / tensorflow/tensorboard
Embedding Projector: UMAP and TSNE projections broken for embeddings that are not normalized
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.
- Build and launch projector (must be from master, not https://projector.tensorflow.org)
- Select Iris demo tensor dataset
- Keep "Sphereize data" unchecked
- change projection type to T-SNE
- The end result is different from what happens when using https://projector.tensorflow.org/
- change projection tyoe to UMAP
- See "Initialize UMAP..." modal loading forever
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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