Smoothing Techniques › Add-k Smoothing
Language AI HandbookAll chapters Smoothing Techniques › Add-k SmoothingOne section · Sections in this chapter4 / 13 ↓
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
A natural generalization is to add a fractional amount instead of 1. This is called add-k smoothing or Lidstone smoothing. Rather than inflating every count by a full unit, we inflate by a fraction :
where:
- : a hyperparameter in the range controlling how much mass to redistribute to unseen events
- : raw bigram count
- : raw unigram count of the context
- : vocabulary size
When , this reduces to Laplace smoothing. When is small (for example, ), the adjustment is gentler and less mass is stolen from seen bigrams.
Choosing k
The value of should be tuned on a held-out development set. You train the model on training data, then try different values of and pick the one that minimizes perplexity on the held-out data. Typical values range from 0.001 to 0.5.
However, even with optimally tuned , add-k smoothing remains a relatively poor performer. The core problem is that it uses the same for all n-grams, regardless of how often they appear. A word that appears once in the training set and a word that appears 1,000 times receive the same additive adjustment, which isn't what the data suggests. More principled methods use different discount amounts for different n-grams based on their observed counts.
There's a deeper issue too. The add-k family of methods treats the lower-order distribution (what probability to give unseen bigrams) as uniform: every word in the vocabulary gets the same small baseline probability of , regardless of how common the word is. But in reality, some words are much more likely to appear in new contexts than others. A common function word like "the" is far more likely to follow any given word than a rare content word. The lower-order distribution should reflect this, and add-k doesn't.