Good-Turing Smoothing
You have netted eighteen fish spanning six species, and three species turned up exactly once. What is the chance the next fish is a species you have never seen? Good-Turing smoothing answers three in eighteen — and the same reasoning tells a language model how much probability to reserve for word sequences absent from its training text.
Counting the counts
The move is to look not at how often an n-gram occurred, but at how many distinct n-grams occurred that often — the counts of counts:
- the mass reserved for everything unseen is the number of n-grams seen exactly once, divided by the total number of n-gram tokens;
- each observed count is then discounted downwards, rescaled using the number of items at the next-higher count, so the probabilities still sum to one.
The estimate came out of I. J. Good's work on Alan Turing's wartime cryptanalysis, which is where the name comes from.
Making it work in practice
The raw formula breaks where the data is thinnest: high counts have one or two items each, and a count of counts that happens to be zero leaves the estimate undefined. Simple Good-Turing fits a smooth line through the counts of counts on log-log axes and uses the fitted values above a threshold. Even then it is rarely used alone — it supplies the discount inside Katz backoff.
Why it matters
An unsmoothed model gives probability zero to any sequence it never saw, so a single unseen bigram makes a whole sentence impossible and its perplexity infinite. Add-one smoothing avoids that but hands far too much mass to a vast space of unseen events. Good-Turing was the first estimate to size that budget from the data itself.
Good-Turing smoothing estimates how much probability an n-gram model should reserve for sequences it never saw, using the counts of counts — how many n-grams were observed exactly once, twice, and so on. Observed counts are discounted and the freed mass is assigned to unseen events. Without it, maximum-likelihood estimates make any unseen sequence impossible and perplexity infinite. It supplies the discount inside Katz backoff.
Suppose you have spotted eighteen birds in a park, of six species — and three of those species you saw only once. What are the odds the next bird is a species new to you? Those one-off sightings are the clue.
Good-Turing smoothing applies that reasoning to words. A program that has read a great deal of text will still meet new phrases, and if it treats anything unseen as impossible it breaks the moment one turns up. So it shaves a little likelihood off the phrases it did see and sets that aside for the ones it has not — a budget for surprise, sized by how many one-off phrases it found.