How does Word2Vec learn word vectors — what's the difference between CBOW and Skip-gram?medium
Word2Vec has two training architectures. CBOW (Continuous Bag of Words) predicts the target word from its surrounding context words; Skip-gram does the reverse, predicting the surrounding context words from a single center word. CBOW is faster and works well on frequent words; Skip-gram tends to work better on rare words because each occurrence generates multiple training examples from its context.
For the sentence "The cat sits on the mat," CBOW takes the context {The, cat, on, the} and learns to predict the target "sits" — surrounding words → center word. Skip-gram takes the center word "cat" and learns to predict its surrounding context {The, sits, on, mat} — center word → surrounding words. Word2Vec embeddings capture semantic similarity (king close to queen, car close to vehicle) and even analogy-like relations such as king − man + woman ≈ queen, because certain relationships end up encoded as consistent vector directions. The well-known limitation is that Word2Vec is static: each word gets exactly one vector regardless of context, so "bank" gets the identical vector in "I deposited money in the bank" and "I sat near the river bank" — it has no mechanism to disambiguate polysemy, which is exactly the gap that contextual embedding methods like ELMo and later Transformer-based models closed.