GloVe Embeddings
GloVe (Global Vectors for Word Representation) is an unsupervised word embedding algorithm developed at Stanford that learns dense vector representations of words by factorizing a global word-to-word co-occurrence matrix computed from a…
Definition
GloVe (Global Vectors for Word Representation) is an unsupervised word embedding algorithm developed at Stanford that learns dense vector representations of words by factorizing a global word-to-word co-occurrence matrix computed from a large text corpus.
Overview
GloVe was introduced in 2014 as an alternative to the earlier word2vec approach for learning word embeddings. While word2vec learns embeddings by predicting words from their local context window using a shallow neural network, GloVe takes a different, more explicitly statistical approach: it first constructs a global co-occurrence matrix, counting how often each pair of words appears together within a context window across the entire training corpus, and then learns word vectors such that the dot product of any two word vectors approximates the logarithm of their co-occurrence probability. This design lets GloVe directly leverage global corpus statistics rather than only local context windows, aiming to capture both the fine-grained local relationships that word2vec is good at and broader statistical patterns across the whole corpus. GloVe embeddings, like word2vec's, exhibit the well-known property that vector arithmetic can capture semantic and syntactic relationships — for example, the vector difference between 'king' and 'man' plus 'woman' lands close to the vector for 'queen' — and words used in similar contexts end up close together in the embedding space. Stanford released several pretrained GloVe embedding sets trained on different corpora (including Wikipedia plus Gigaword, and a much larger Common Crawl web corpus) and at multiple vector dimensionalities (commonly 50, 100, 200, and 300 dimensions), which became widely used as off-the-shelf, pretrained embedding layers for downstream NLP models before contextual embeddings from transformers became dominant. GloVe's key limitation, shared with word2vec, is that it produces a single, static vector per word regardless of context, so it cannot distinguish between different senses of a polysemous word (like 'bank' as a financial institution versus a riverbank). This limitation motivated the shift toward contextual embeddings produced by models like BERT and later large language models, which generate different vectors for a word depending on its surrounding sentence. GloVe embeddings remain useful today as lightweight, fast, and interpretable baselines for simpler NLP pipelines or resource-constrained settings.
Key Concepts
- Learns word vectors by factorizing a global word-to-word co-occurrence matrix
- Combines global corpus statistics with local context window information
- Produces static, single vectors per word regardless of context
- Supports vector arithmetic capturing semantic and syntactic relationships
- Released as pretrained embeddings on Wikipedia, Gigaword, and Common Crawl
- Available at multiple dimensionalities, commonly 50 to 300 dimensions
- Lightweight and fast compared to training or running a full transformer
- Superseded for many tasks by contextual embeddings from transformer models
Use Cases
Frequently Asked Questions
From the Blog
RAG Explained: Retrieval-Augmented Generation
RAG is how you give an LLM access to your own private data without training a new model. This guide explains the full pipeline — chunking, embeddings, vector search, and augmented generation — with a working Python example using open-source tools.
Read More AI & TechnologyHow Large Language Models Actually Work
LLMs seem magical until you understand what they are: next-token predictors trained on massive text corpora. This guide explains tokenisation, embeddings, the transformer architecture, attention mechanism, and how training works — without requiring a maths degree.
Read More