Home▸Machine Learning & Neural Networks▸Skip-Gram Word2Vec (2D): Live Embedding Map, Loss and Analogy Arrows

Skip-Gram Word2Vec (2D): Live Embedding Map, Loss and Analogy Arrows

A flat map of the same live embedding: PCA projection with labelled words, analogy arrows, nearest neighbours and curves of the training loss and analogy accuracy. Change the training settings and watch the geometry form.

Machine Learning & Neural Networks2DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
Skip-Gram Word2Vec (2D): Live Embedding Map, Loss and Analogy Arrows ↗ Open standalone

Train a skip-gram word2vec model with negative sampling live in your browser on a small synthetic corpus of royalty, animals, food, cities and countries. Watch the word vectors drift from random noise into clusters inside a Blender-built glass-frame display, change the dimension, window, number of negatives and learning rate, and test analogies such as man : king :: woman : queen with vector arithmetic and cosine similarity. Numerical checks of the gradients, PCA and sampling are built in.

⚙ Under the hood

A flat map of the same live embedding: PCA projection with labelled words, analogy arrows, nearest neighbours and curves of the training loss and analogy accuracy. Change the training settings and watch the geometry form.

Word2VecWord EmbeddingsSkip-GramNegative SamplingCosine Similarity

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)