The Distributional Hypothesis › The Co-occurrence Matrix as a Word Representation

Michael BrenndoerferMarch 29, 20252 min read
Language AI HandbookAll chapters
Part 3 of 67Distributional Semantics
Chapter 15The Distributional Hypothesis › The Co-occurrence Matrix as a Word Representation
Reading section 10 of 16 · The Co-occurrence Matrix as a Word Representation · 2 minSection 10 of 16 · 2 min

Book contents

Section 10 of 16 · 2 min read

The Distributional Hypothesis › The Co-occurrence Matrix as a Word RepresentationOne section · Sections in this chapter10 / 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

It is worth stepping back and thinking about what we have built. A co-occurrence matrix is a ∣V∣×∣V∣|V| \times |V| matrix where ∣V∣|V| is the vocabulary size. The entry at row ii, column jj records how often word ii appears in the context of word jj.

Mij=count(wi,wj,k)M_{ij} = \text{count}(w_i, w_j, k)

where count(wi,wj,k)\text{count}(w_i, w_j, k) is the number of times word wjw_j appears within a window of size kk around word wiw_i across the entire corpus.

This matrix is the distributional representation of the entire vocabulary. Each row is the distributional vector for one word. The columns represent context dimensions. The whole matrix is the computational realization of the distributional hypothesis.

This representation has some striking properties:

  • Symmetry: If we use a symmetric context window, Mij=MjiM_{ij} = M_{ji} because every time word jj appears in the context of word ii, word ii also appears in the context of word jj. The matrix is symmetric.
  • Sparsity: In any real vocabulary, most word pairs never co-occur. A vocabulary of 100,000 words would require a 101010^{10}-entry matrix, the vast majority of whose entries are zero. This sparsity is one motivation for the dimensionality reduction techniques covered in later chapters.
  • High dimensionality: Even for our toy corpus, the matrix has thousands of entries. For real corpora, the vocabulary might have hundreds of thousands of words, making the full matrix computationally expensive to store and compare.
  • Frequency bias: The matrix directly reflects word frequencies. Common words like "the" have large counts everywhere, distorting similarity estimates toward high-frequency vocabulary.

The progression from raw co-occurrence matrices to PMI-weighted matrices to dense word embeddings (word2vec, GloVe) is the story of how the field addressed these limitations while preserving the core distributional insight.