Interpolated absolute discounting uses with . Choose so that the distribution sums to , and prove it. Then explain why Kneser–Ney replaces the lower-order unigram by the continuation probability , and check that this also sums to . If with distinct followers and , what is ?
Sequence models and transformers, Language modelling
Level L3 Intermediate. Length Long. Nature Th+Mat Both.
What's being asked
Whether you can prove normalisation and give the right reason for the continuation probability.
Key idea
, the mass taken away by discounting. For the lower-order model, Kneser–Ney uses the number of distinct left contexts of , not its raw count.
Steps
- Let be the number of distinct words seen after . Every seen has , so , and unseen words contribute .
- Sum the first term over : .
- If sums to , the second term sums to . Total exactly when .
- Numbers: . So of the mass is passed to the lower-order model.
- Why continuation: the lower-order model is used only when the higher-order context failed, i.e. for a word that has not been seen after . A word such as "Francisco" is frequent but almost always follows "San", so as a fresh continuation it is unlikely. The raw unigram count would wrongly give it a high probability.
- Define , where is the number of distinct words preceding and is the number of distinct bigram types.
- Normalisation: by definition of the denominator.
Common mistakes
- Setting using the number of tokens rather than the number of distinct follower types.
- Choosing . A seen count of then becomes or negative after the discount, and the normalisation proof, which needs for every seen word, fails.
- Describing Kneser–Ney as "frequency of the word"; it counts distinct contexts, not occurrences.
How long your answer should be
One page; 8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Sequence models and transformers: Show that the cross-entropy of a model on text from the true distribution equals , so perplexity can never go below . Why can the perplexities of two models with different tokenisers not be compared directly, and how do you convert to bits per character? For a model with perplexity per token and characters per token, what is the bits per character?
Next in Sequence models and transformers: In connectionist temporal classification (CTC), an acoustic model gives, for each of frames, a distribution over the symbols . How are alignments mapped to labels, how many alignments of length 4 collapse to the label "ab", how many to "aa", and what is the probability of "ab" if every frame is uniform over the three symbols?