Notes

Linear Interpolation Smoothing

A trigram model that has never seen "predicts the weather" gives it probability zero, and one zero makes a whole sentence impossible. Linear interpolation smoothing takes the obvious way out: when the trigram knows nothing, let the bigram and the unigram speak.

Mixing the orders
Rather than committing to one n-gram order, the model blends them. The probability of a word given the two before it becomes a weighted sum of the trigram, bigram and unigram estimates, with weights lambda that are non-negative and sum to one — which keeps the result a proper distribution. The unigram term is never zero for a word in the vocabulary, so the mixture is never zero either. The lambdas are fitted on held-out data, and can be conditioned on how often the context was seen: a trigram context observed hundreds of times deserves more weight than one seen twice.

Against backoff

  • Backoff consults a lower order only when the higher order has no count; interpolation always uses every order, weighted.
  • It is simpler to implement and needs no discounting scheme to free up probability mass.
  • Also called Jelinek-Mercer smoothing, it is the baseline Kneser-Ney improves on by fixing what the lower-order distribution counts.

Why it matters
Language is open-ended: however large the corpus, the next sentence contains sequences it never held. Interpolation states the fix cleanly — trust specific evidence where you have it, general evidence where you do not — and it is what lets an n-gram model be scored by perplexity on unseen text at all. The same mixing reappears in retrieval, where a document's language model is blended with a collection-wide one so a missing query term does not zero the score.

Linear interpolation smoothing estimates an n-gram probability as a weighted mixture of all lower orders — trigram, bigram and unigram — with weights that sum to one and are fitted on held-out data. Because the unigram term is never zero, no in-vocabulary sequence receives zero probability. Unlike backoff, which drops to a lower order only when a count is missing, every order always contributes. Also known as Jelinek-Mercer smoothing.

Suppose a friend asks what you think of a restaurant you have never visited. You would not refuse to answer. You would reason from the chain it belongs to, or from other places in that part of town — less specific knowledge, but better than nothing.

Software that predicts the next word in a sentence needs the same habit. When it has never seen a particular three-word run, the exact evidence is missing, so linear interpolation smoothing mixes in what it knows about shorter runs: pairs of words, then single words. Each source gets a share of the vote. Nothing is ever declared impossible merely because it has not been seen before.