The Distributional Hypothesis › The Vector Space Model

Michael BrenndoerferMarch 29, 20254 min read
Language AI HandbookAll chapters
Part 3 of 67Distributional Semantics
Chapter 15The Distributional Hypothesis › The Vector Space Model
Reading section 4 of 16 · The Vector Space Model · 4 minSection 4 of 16 · 4 min

Book contents

Section 4 of 16 · 4 min read

The Distributional Hypothesis › The Vector Space ModelOne section · Sections in this chapter4 / 16 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The distributional hypothesis gives us a qualitative principle: similar contexts imply similar meanings. The vector space model (VSM) gives this principle a precise mathematical form.

The core idea is to represent each word as a vector in a high-dimensional space where each dimension corresponds to a context word. The value in each dimension records how strongly the target word is associated with that context. Words with similar meanings will have vectors that point in similar directions in this space. Geometric operations on vectors then correspond to semantic operations on words.

Formally, let VV be our vocabulary of ∣V∣|V| words. The co-occurrence matrix M∈R∣V∣×∣V∣M \in \mathbb{R}^{|V| \times |V|} has entry:

Mij=f(wi,wj)M_{ij} = f(w_i, w_j)

where f(wi,wj)f(w_i, w_j) is some measure of association between word wiw_i and context word wjw_j. The simplest choice is raw count: f(wi,wj)=count(wi,wj)f(w_i, w_j) = \text{count}(w_i, w_j), the number of times wjw_j appears in the context window of wiw_i across the corpus.

The ii-th row of MM, written mi\mathbf{m}_i, is the distributional vector for word wiw_i. This vector lives in R∣V∣\mathbb{R}^{|V|}, a space where each of the ∣V∣|V| axes corresponds to one vocabulary word playing the role of context.

Vector Space Model

A vector space model represents each word as a real-valued vector in a high-dimensional space. The dimensions correspond to context words, and the values encode association strength. Semantic similarity is measured geometrically, typically using cosine similarity between vectors.

The power of this formulation is that it converts a linguistic question (are these two words semantically related?) into a geometric question (do these two vectors point in similar directions?). Geometric operations are well-understood mathematically, can be computed efficiently on modern hardware, and generalize naturally to the continuous representations learned by neural networks.

The Geometry of Semantic Space

When we project distributional vectors into two or three dimensions (using PCA or t-SNE), we reliably observe that semantically similar words cluster together. Animals are near other animals. Countries are near other countries. Verbs of motion are near other verbs of motion. This geometric structure is not something we impose; it emerges from the distributional patterns in the text.

What is more striking is that the geometry encodes structured relations. The vector from "king" to "queen" is approximately parallel to the vector from "man" to "woman." The vector from "France" to "Paris" is approximately parallel to the vector from "Germany" to "Berlin." These parallel relationships in the vector space correspond to systematic semantic relationships (gender, capital city) in the world.

This structure arises because paradigmatically related words (words that substitute for each other) have vectors pointing in similar directions, while the systematic differences between related words (the gender difference between "king" and "queen," the country-to-capital mapping) appear as consistent vector offsets. The vector space encodes which words are similar and how they are similar.

This geometric regularity is one of the most striking empirical discoveries in NLP. It suggests that distributional training, despite its simple co-occurrence-counting objective, implicitly discovers the latent semantic structure that humans recognize as meaningful relations. Understanding why this structure emerges is still an active research question, but the fact that it emerges reliably across many corpora and many languages has been thoroughly documented.

Dimensionality and the Curse

A vocabulary of 100,000 words implies a co-occurrence matrix of 101010^{10} entries. In practice, the vast majority of these entries are zero: most word pairs never co-occur. This extreme sparsity means that storing the full matrix is expensive, and computing cosine similarities between sparse vectors can be slow.

The standard solution is dimensionality reduction. Techniques like Singular Value Decomposition (SVD) find a low-dimensional approximation to the co-occurrence matrix that preserves as much of the variance as possible. Typically, the top 100–300 dimensions capture the most important semantic distinctions, compressing from ∣V∣|V| dimensions to a manageable dense representation.

The key insight is that the semantic structure of language is low-dimensional relative to the vocabulary size. Most of the variation in distributional profiles can be explained by a small number of underlying semantic factors (animacy, concreteness, domain, syntactic category, sentiment). Dimensionality reduction methods discover these underlying factors automatically, without being told what they are.

We'll explore SVD and its relationship to neural word embeddings in later chapters. For now, remember that the transition from sparse count vectors to dense embedded representations is motivated by exactly these considerations: sparsity, dimensionality, and the desire to generalize to contexts not seen in training.