Word2vec

Words used in similar contexts often have something in common. Word2vec uses a word-prediction task to learn vectors that capture useful regularities in those surrounding words.

15 sections · 15 questions · 3 coding challenges

1 / 15

Could a Small Prediction Task Learn Useful Word Relationships?

BOTIE

Learning a complete language model can be expensive when our immediate goal is only a useful vector for each word. We would like a simpler task that still forces those vectors to capture relationships in the text.

Mikolov and colleagues' 2013 word2vec work used efficient prediction objectives to learn word representations from large corpora. Continuous bag of words predicts a word from nearby context, while skip-gram predicts nearby words from a central word. Later work that year described negative sampling and other practical improvements.

The vectors become useful because training repeatedly asks them to support these local predictions. Words appearing in comparable environments receive related learning signals. Negative sampling contrasts observed pairs with sampled alternatives, reducing the work needed for each update. Similarity then reflects the corpus and prediction objective, with one stored vector per word unable to cleanly separate every possible sense.

Sources for this history