Back to all work
Machine Learning· 2025· Solo projectShipped

Word2Vec Galaxy

Interactive 3D word-embedding space - semantic neighborhoods and vector arithmetic you can stand inside

Word2Vec Galaxy

Everyone learns word embeddings the same way: "similar words end up close together," plus the king - man + woman = queen party trick. Both are usually taken on faith - a high-dimensional vector space is not something you can look at. I built Word2Vec Galaxy to change that: an interactive 3D projection of Word2Vec space where semantic neighborhoods and vector arithmetic stop being abstractions and become something you can rotate, zoom, and wander through.

Learn how it works in a blog I wrote from understanding the research papers.

06.03.2026 Update - Version 2

After almost a year, I updated to version 2 of this tool and deployed it on Hugging Face Spaces for dry runners and demo purposes. If you want a hands-on experience, check out the GitHub repository.

Word2Vec Galaxy Version 2 Interface
Word2Vec Galaxy Version 2 Visualization

Interactive 3D visualization with enhanced controls and visualization in V2.

How Word2Vec Works

Word2Vec creates dense vector representations of words by learning from their contextual relationships in large text corpora. The model captures semantic similarities by positioning related words closer together in high-dimensional space. The tool uses Google's pre-trained model, with PCA reducing the vectors to three dimensions - the projection loses detail by necessity, but preserves enough global structure for the clusters and analogies to survive the trip down from high dimensions.

Application Interface

Two-dimensional PCA projection of the 1000-dimensional Skip-gram vectors.

Key Features

  • 3D Word Vector Visualization: Explore semantically similar words in interactive 3D space using PCA dimensionality reduction
  • Interactive Controls: Intuitive sidebar controls for customizing visualizations and selecting parameters
  • Real-time Processing: Instant visualization updates with progress indicators for model loading

Usage Examples

1. Similar Words Exploration

  1. Enter a word (e.g., "technology", "emotion", "animal")
  2. Adjust the number of similar words (5-50)
  3. Visualize the semantic neighborhood in 3D space
  4. Explore relationships through interactive rotation and zoom
3D Word Space Exploration

3D visualization of word clusters with color-coded similarity scores.

2. Vector Arithmetic Operations

The analogies everyone quotes, actually computed and drawn:

  • king - man + woman = queen (Gender relationships)
  • walking - walk + run = running (Verb tense patterns)
Vector Arithmetic Visualization

Vector arithmetic operation showing a classic analogy

Installation & Setup

For detailed installation and setup instructions, please refer to the instructions in the Word2Vec Galaxy repository.

References

  • T. Mikolov, K. Chen, G. Corrado, and J. Dean, "Efficient estimation of word representations in vector space," arXiv preprint arXiv:1301.3781, 2013. arXiv:1301.3781
  • T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean, "Distributed representations of words and phrases and their compositionality," Advances in Neural Information Processing Systems 26, 2013.
  • Gensim Word2Vec - Word2Vec model

For full code, examples, and configuration, see the GitHub Repository.