Word Embeddings in NLP
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
20 questions
- 1All pairs of one-hot encoded words have the same Euclidean distance of_____.
Hint
Consider the distance between two vectors that each have a single 1 in different positions.
Answer
√2
- 2One-hot vectors are as long as the_____size, causing computational inefficiency.
Hint
Think about the dimension of the vector in relation to the number of unique words.
Answer
vocabulary
- 3Word embeddings are_____vectors that capture semantic relationships between words.
Hint
In contrast to one-hot vectors which are sparse, these have most entries non-zero.
Answer
dense
- 4The key insight behind word embeddings, attributed to John Firth, is 'You shall know a word by the_____it keeps.'
Hint
Think about what surrounds a word in text.
Answer
company
- 5A_____matrix counts how often two words appear in the same sentence across a corpus.
Hint
It's a word-word matrix where each cell counts joint occurrences.
Answer
co-occurrence
- 6The GloVe model predicts the_____of the co-occurrence count as the sum of word biases plus the dot product of their embeddings.
Hint
This transformation squashes large ranges to make regression more stable.
Answer
logarithm
- 7In GloVe, the bias term for each word captures its inherent_____.
Hint
Some words like 'the' occur very frequently regardless of context.
Answer
popularity
- 8The loss function used to train GloVe embeddings is typically_____between predicted and actual log co-occurrence.
Hint
This is the most common regression loss.
Answer
mean squared error
- 9Stochastic_____descent can be used to minimize the GloVe loss because the model is differentiable.
Hint
This algorithm iteratively updates parameters to reduce the loss.
Answer
gradient
- 10The dimensionality of word embeddings is a_____that controls model capacity and risk of overfitting.
Hint
It must be chosen before training, like the number of hidden units in a neural network.
Answer
hyperparameter
- 11Two words with similar meanings will have similar_____vectors in the co-occurrence matrix.
Hint
Each word corresponds to a row in the matrix; compare rows for similarity.
Answer
row
- 12Standalone word embeddings fail to handle_____, where a word has multiple meanings.
Hint
Words like 'bank' have different senses depending on context.
Answer
polysemy
- 13Pre-trained embeddings are especially useful when you have a_____amount of task-specific data.
Hint
They provide general linguistic knowledge that can be transferred.
Answer
small
- 14In Keras, the embedding layer looks up embedding_____for each integer token index.
Hint
It's essentially a dictionary mapping indices to dense vectors.
Answer
vectors
- 15To make sequences of different lengths uniform, we use_____and truncation.
Hint
We add a special token to shorter sequences to match a fixed length.
Answer
padding
- 16The_____layer in Keras combines all embedding vectors for a sequence into a single vector by averaging each dimension.
Hint
It operates across the sequence dimension, reducing a table to a vector.
Answer
GlobalAveragePooling1D
- 17Setting the embedding layer's_____
trainableattribute toallows backpropagation to update the embeddings during training.Hint
This unleashes gradient descent on the embedding weights.
Answer
True
- 18The relationship 'king - man + woman ≈_____' is an example of word vector algebra.
Hint
This shows that embeddings capture analogies through vector arithmetic.
Answer
queen
- 19Embeddings learned from biased data will_____those biases.
Hint
The model faithfully reproduces patterns in the training data.
Answer
perpetuate
- 20Word embedding algebra relies on both the_____and direction between vectors to represent semantic relationships.
Hint
It's not just how close they are, but also the orientation matters.
Answer
distance

Ask anything
We've read this whole study set, so questions about it get the best answers.