CBOW Model › Subsampling Frequent Words

Michael BrenndoerferApril 3, 20252 min read
Language AI HandbookAll chapters
Part 4 of 67Word Embeddings
Chapter 20CBOW Model › Subsampling Frequent Words
Reading section 11 of 15 · Subsampling Frequent Words · 2 minSection 11 of 15 · 2 min

Book contents

Section 11 of 15 · 2 min read

CBOW Model › Subsampling Frequent WordsOne section · Sections in this chapter11 / 15 ↓
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 original Word2Vec paper introduced an important technique called subsampling (or frequency-based downsampling) that significantly improves embedding quality. The idea is simple: very frequent words like "the," "is," and "a" appear in almost every context and provide little useful signal about the meaning of their neighbors. Instead of using every occurrence of these words in training, the model randomly discards them with a probability that increases with word frequency.

The subsampling probability for word ww with frequency f(w)f(w) in the corpus is:

P(discard)=1−tf(w)P(\text{discard}) = 1 - \sqrt{\frac{t}{f(w)}}

where:

  • f(w)f(w): the fraction of the corpus occupied by word ww (frequency divided by total tokens)
  • tt: a threshold hyperparameter, typically set to 10−510^{-5}

Words with frequency below tt are never discarded. Words with frequency much greater than tt are discarded with high probability. The threshold t=10−5t = 10^{-5} means that any word making up more than 1 in 100,000 tokens is a candidate for subsampling. In a typical English corpus, this catches words like "the" (which might appear in 5% of all positions) very aggressively, while leaving most content words untouched.

Subsampling has two distinct benefits. First, it speeds up training by reducing the number of training examples from very common words that provide little discriminative signal. Second, it improves embedding quality: when "the" is discarded from a context window, the remaining context words form more semantically meaningful co-occurrences. Instead of "fox" co-occurring with "the" (a useless relationship), "fox" is more likely to co-occur with semantically rich words that happen to appear within the same window after "the" is removed.