Word2Vec
A classic method of word vector representation: the model learns to predict a word from its neighbors (or vice versa) and in the process obtains a vector for each word.
Main Idea
Words appearing in similar contexts receive close vectors. 'King' and 'queen' end up close, while 'king' and 'cucumber' are far apart.
Two Architectures
- CBOW — predict the central word from its neighbors;
- Skip-gram — predict neighbors from the central word.
Skip-gram works better with rare words, so it is more commonly used in practice.
What These Vectors Can Do
The most famous example is analogies: king − man + woman ≈ queen. Vectors encode relationships between meanings, which became the breakthrough of early embeddings.
Legacy
Modern embeddings have moved beyond Word2Vec, but the idea — 'meaning through context' — lies at the heart of all language models, including transformers.