Home▸Machine Learning & Neural Networks▸Skip-Gram Word2Vec: Negative Sampling Training, Cosine Similarity and Analogy Vectors

Skip-Gram Word2Vec: Negative Sampling Training, Cosine Similarity and Analogy Vectors

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.

Machine Learning & Neural Networks3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Skip-Gram Word2Vec: Negative Sampling Training, Cosine Similarity and Analogy Vectors ↗ 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

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.

Word EmbeddingsNLP VectorWord2VecSkip-GramNegative SamplingCosine Similarity

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)