Intermediate level · Module 3: Word Embeddings and Word2Vec · Lesson 1 of 3
From Counts to Dense Word Vectors
Learners see why counts treat every word as unrelated and how dense vectors place words with similar contexts close together.
In this lesson you will
- Explain the limits of one-hot word representations
- Explain the distributional hypothesis
Key concepts
one-hot vectordense vectordistributional hypothesiscontext windowembedding dimension
The lesson
In bag of words, every word is its own column, so 'fees' and 'payment' are as different as 'fees' and 'mango'. These are one-hot representations: long, sparse and without any notion of similarity.
The distributional hypothesis says that words used in similar contexts have similar meanings. 'Fees', 'payment' and 'tuition' all appear near 'pay', 'school' and 'receipt'. An embedding is a short, dense vector (for example 100 numbers) learned so that words with similar contexts get similar vectors.
Word2Vec (Mikolov et al., 2013) learns embeddings with a small neural network that predicts context words from a word (skip-gram) or a word from its context (CBOW). GloVe is a related method based on co-occurrence counts.
Step by step
- Write the one-hot vectors for five words and compute their similarities.
- For three target words, list the words that appear within two positions in the project corpus.
- Predict which words should end up with similar embeddings.
- Read the Word2Vec paper abstract and summarise skip-gram in two sentences.
Practice activity
Write a short explanation, with a context table, of why 'fees' and 'payment' should get similar embeddings.
Expected result: A clear, correct explanation supported by context counts from the corpus.
Check your understanding
-
What is the distributional hypothesis?
Show answer
Words that appear in similar contexts tend to have similar meanings.
-
What does skip-gram predict?
Show answer
The context words around a given word.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.