Welcome to the next lesson in our journey through the world of embeddings. In the last few lessons, we took a deep dive into Word2Vec, understanding its core architectures (CBOW and Skip-gram) and the incredible way it maps semantic relationships onto a geometric space. You've seen how these models learn from local context and how vector arithmetic can solve word analogies.
Today, we will zoom out from our focused look at Word2Vec to survey the broader landscape of what are known as "static" word embeddings. We will compare Word2Vec with two other foundational models: GloVe and fastText. By the end of this lesson, you will be able to describe the distinct training philosophy behind each model and articulate their unique strengths and weaknesses, giving you a comprehensive understanding of this pivotal era in NLP.
Three Models, Three Philosophies
Word2Vec, GloVe, and fastText all aim to solve the same problem: representing words as dense numerical vectors. However, they approach this goal with fundamentally different strategies.
A great way to start is with a high-level overview. The following video provides a concise and clear introduction to the core idea behind each of these three influential models.
⚡ NLP Changed Forever: Word2Vec 🧠 | GloVe 🌐 | FastText 🧩 Explained 🤯📊 [Part 2/6]
This video from the channel "Daniel Jora | AI Learner" serves as an excellent primer, comparing the philosophy of each model.
Please watch the entire video (from start to finish). Pay close attention to the analogies used, especially the "street-level navigation vs. satellite view" comparison for Word2Vec and GloVe, and the "house numbers and alleyways" analogy for fastText.
Now that you have a high-level mental map, let's explore each model's approach in more detail.
A Quick Recap: Word2Vec's Predictive, Local Approach
As we've covered, Word2Vec is a predictive model. Its training objective is to predict a word from its immediate neighbors (CBOW) or predict the neighbors from a central word (Skip-gram).

The key takeaway is that Word2Vec learns embeddings by processing a corpus sequentially and considering only local context windows. Its understanding of word relationships is built up implicitly from these local observations.
GloVe: A Global, Count-Based Approach
GloVe, which stands for Global Vectors for Word Representation, takes a different path. Instead of learning from local context windows one at a time, it is a count-based model that first aggregates global statistics from the entire corpus.
Training Approach:
- Build a Co-occurrence Matrix: GloVe's first step is to construct a massive word-word co-occurrence matrix, which we can call . An entry in this matrix stores the number of times word j appears in the context of word i across the entire corpus. This is the "global" aspect.
- Factorize the Matrix: The model then learns word vectors such that their dot product relates to the probability of their co-occurrence. The objective function aims to learn two sets of vectors, and , such that for any two words i and j: Here, and are bias terms. The model uses stochastic gradient descent to learn the vectors that best satisfy this relationship. The final embedding for a word is typically the sum of its corresponding vectors from both sets ().
Given your background in data science, you can think of this as a specialized form of matrix factorization, akin to what's used in recommender systems, but adapted specifically for the statistical properties of word co-occurrences.
The following article gives a clear explanation of GloVe's mechanics.
Advanced Word Embeddings: Word2Vec, GloVe, and ...
This article provides a concise summary of the GloVe model.
Please read the section titled GloVe. Focus on understanding the two main steps: the formation of the word-context matrix and the factorization process.
Strengths of GloVe:
- Explicitly leverages global statistics, which can lead to high-quality embeddings.
- Often performs exceptionally well on word analogy tasks.
- Can train faster than Word2Vec since it iterates over the aggregated counts.
Weaknesses of GloVe:
- Requires significant memory to store the large co-occurrence matrix.
- Like Word2Vec, it cannot create vectors for words that were not in its training vocabulary (Out-of-Vocabulary or OOV words).
fastText: Embracing the Subword
While Word2Vec and GloVe treat words as atomic units, fastText, developed by Facebook AI Research, introduces a groundbreaking idea: representing a word as a bag of its character n-grams.
Training Approach:
The training process itself is nearly identical to Word2Vec's Skip-gram or CBOW models. The crucial difference is in how it represents a word. For example, with 3-grams (n=3), the word "apple" would be represented by the set of its character n-grams, plus the word itself:{"<ap", "app", "ppl", "ple", "le>", "<apple>"}
(Special boundary symbols < and > are added to distinguish prefixes and suffixes).
The model then learns vectors for all these character n-grams. The final vector for the word "apple" is simply the sum or average of the vectors for its constituent n-grams.

This subword approach gives fastText its primary superpower. Let's watch a short clip that explains this idea very clearly.
Training Word Vectors with Facebook's fastText
This video from Tanmay Bakshi's channel explains the core mechanism of fastText.
Watch the segment from "the fast text library doesn't exactly use this algorithm". This part clearly explains the character n-gram technique and why it's so powerful for handling unknown words.
Strengths of fastText:
- Handles OOV words: This is its key advantage. It can generate a vector for a word it has never seen before (e.g., "vectorizeable" or even a typo like "embddings") by summing the vectors of its n-grams.
- Excels with morphologically rich languages: In languages like German or Turkish where words have many forms (e.g., run, running, ran), fastText can capture the shared meaning because the word stems share common character n-grams.
Weaknesses of fastText:
- Increased memory and training time: The model needs to store vectors for a vast number of character n-grams, making it larger and potentially slower to train than Word2Vec.
Putting It All Together
We've examined the unique philosophy behind each model. To solidify your understanding, let's bring it all together in a comparative summary.
The following article offers a useful wrap-up, including a section on how to choose the right model for a given task.
Advanced Word Embeddings: Word2Vec, GloVe, and ...
Let's return to the same article to read its breakdown of fastText and its final comparison.
First, read the section on fastText. Then, read the short concluding section, Choosing the Right Model, which provides practical heuristics.
Here is a summary table that contrasts the three models:
| Feature | Word2Vec | GloVe | fastText |
|---|---|---|---|
| Core Idea | Predictive, local context | Count-based, global co-occurrence | Predictive, local context with subword information |
| Training Unit | Words in a sliding window | Word-word co-occurrence matrix from entire corpus | Character n-grams within words in a sliding window |
| Handles OOV Words? | No | No | Yes |
| Primary Strength | Speed and efficiency for general-purpose tasks | High performance on word analogy tasks | Robustness to rare/OOV words & morphologically rich languages |
| Primary Weakness | Ignores global statistics, can't handle OOV | High memory usage for co-occurrence matrix | Larger model size and longer training time |
Conclusion
In this lesson, you've broadened your understanding of static word embeddings beyond Word2Vec. You can now compare and contrast the three major players of that era.
Here are the key takeaways:
- Word2Vec is a predictive model that learns from local context windows.
- GloVe is a count-based model that learns by factorizing a global word-word co-occurrence matrix.
- fastText is a predictive model that enhances Word2Vec by representing words as a bag of character n-grams, enabling it to handle out-of-vocabulary words.
A crucial point to carry forward is that all three of these models produce static embeddings. The word "bank" has the same vector in "river bank" as it does in "investment bank." This is a significant limitation.
This sets the stage perfectly for our next module, where we will begin our journey toward contextual embeddings. In the next lesson, we will explore Recurrent Neural Networks (RNNs), the first major architecture designed to process sequential data like text and a foundational step toward models that can understand that the meaning of a word depends on its context.