A telecom's search-box autocomplete uses a bigram language model with add-one (Laplace) smoothing, P(w | prev) = (c(prev, w) + 1) / (c(prev) + V). The table lists every word that followed "my" in the training text; "my" occurs 20 times and the vocabulary has V = 1,000 words. What is the smoothed P(bill | my), and what does the result reveal?
| Word after "my" | Bigram count c(my, w) |
|---|---|
| bill | 8 |
| plan | 6 |
| account | 4 |
| data | 2 |
| each of the other 996 words | 0 |
Show the answer and explanation
Correct answer: C, P(bill | my) = 9/1,020 ≈ 0.009 instead of the MLE 0.40: the 996 unseen words together receive 996/1,020 ≈ 98% of the mass, so add-one over-smooths when V is far larger than c(prev).
Explanation NLP
Add-one smoothing pretends every possible bigram was seen once more than it was. The denominator grows by V so that the distribution still sums to 1:
P(bill | my) = (8 + 1) / (20 + 1,000) = 9/1,020 ≈ 0.0088, versus the maximum-likelihood estimate 8/20 = 0.40.
| Continuations of "my" | Raw counts | Add-one counts | Share of the mass |
|---|---|---|---|
| bill, plan, account, data | 20 | 24 | 24/1,020 ≈ 2.4% |
| 996 unseen words | 0 | 996 | 996/1,020 ≈ 97.6% |
Each unseen word gets only 1/1,020 ≈ 0.001, but there are 996 of them, so together they take almost all of the probability mass. That is the over-smoothing problem: when V ≫ c(prev), the pseudo-counts swamp the real evidence. The model now says "my" is followed by some never-seen word about 98% of the time, although all 20 training occurrences were followed by one of four words. The ranking still puts "bill" first, but probabilities and perplexity are badly distorted.
Why the other readings fail: adding one only to the observed words leaves every unseen word at zero probability, and avoiding zeros is the whole point of smoothing. Add-one changes every count, not just the zeros, and the denominator grows by V. The 24/1,020 ≈ 2.4% share is the mass left for the seen words, not the unseen ones.
Better choices for language models: add-k with a small k (e.g. 0.01), interpolation or back-off to unigram probabilities, and Kneser–Ney smoothing, the classic choice for n-gram LMs.
Interview tip: say that add-one is acceptable for Naive Bayes features but poor for language models, and justify it with the share of mass moved to unseen events.