Word2vec
Word2vec is a method published by Google researchers in 2013 that learns a numerical vector for each word from large amounts of text, so that words used in similar contexts get similar vectors.
Word2vec came from a team at Google led by Tomas Mikolov, with Kai Chen, Greg Corrado and Jeffrey Dean, in a paper posted in January 2013. It rests on a simple idea: you can tell a lot about a word from the words around it. The method turns each word into a list of numbers, typically between 100 and 1,000 of them, learned so that words appearing in similar contexts end up close together.
It offered two simple architectures. Continuous bag-of-words predicts a word from its neighbours, like filling in a blank. Skip-gram does the reverse, predicting the neighbours from the word. Both are shallow networks, which made them fast: the authors reported learning high-quality vectors from 1.6 billion words in less than a day. A follow-up paper in October 2013, adding Ilya Sutskever, introduced negative sampling to speed training further and showed how to learn vectors for phrases such as Air Canada, whose meaning is not the sum of its parts. That paper received the NeurIPS Test of Time award in 2023.
The vectors captured relationships in a way that surprised many people. Simple arithmetic worked: the vector for king, minus man, plus woman, landed closest to queen. The same trick could pair countries with capitals, as in France is to Paris as Germany is to Berlin. Researchers could download pretrained vectors and drop them into translation, search and classification systems.
Word2vec also made the problem of bias in AI easy to see. In 2016 Tolga Bolukbasi and colleagues showed that vectors trained on Google News encoded gender stereotypes, captured in their paper's title, which asked whether man is to computer programmer as woman is to homemaker.
Its main limit is that each word gets one fixed vector, whatever the context, so bank means the same thing beside river as beside loan. Later models such as ELMo and BERT produced contextual representations that change with the surrounding words, and today's large language models learn their own embeddings as part of training. Word2vec's core idea, that meaning can be represented as position in a learned space, carried straight through to them.
It turns words into vectors that capture their meaning and relationships, which other systems can use for tasks such as search, recommendation, classification and translation. It was widely used as a building block in language processing in the years after 2013. Continuous bag-of-words predicts a word from the words around it, while skip-gram predicts the surrounding words from the word itself. The authors found CBOW faster to train and skip-gram better for rare words. It is still used where a fast, lightweight method is enough, and it remains a standard teaching example. For most demanding language tasks it has been replaced by contextual models such as BERT and by embeddings from large language models. It shows that word2vec vectors encode relationships as directions. Subtracting the vector for man from king and adding woman gives a point closest to queen, meaning the gender relationship is captured as a consistent offset in the space.Common questions
What is word2vec used for?
What is the difference between skip-gram and CBOW?
Is word2vec still used?
What does king minus man plus woman equals queen mean?
Search for "word2vec explained skip-gram", "Mikolov 2013 word vectors" or "word embedding bias". The original arXiv papers are short and readable, and university course notes on natural language processing explain the training process well. Open-source libraries such as Gensim document how to train and use the vectors in practice.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.