Statistical Machine Translation Foundations › The Translation Problem as Noisy-Channel Inference
Language AI HandbookAll chapters Suppose we want the most probable translation of a source sentence . Bayes' rule gives
The denominator does not depend on the candidate , so it drops out of the argmax:
Taking logs preserves this ranking for positive scores and turns the product into a sum:
Thirty factors of give , which fits in a double-precision float. Thirty factors of give , which rounds to zero in that format. The log score remains finite. Working in log space lets the decoder compare such scores by adding the log probabilities.
A generative model in which the observed data (here, the source sentence) is assumed to have been produced by passing the desired quantity (the target sentence) through a noisy channel. Translation becomes inference about the unobserved input: score candidate targets by how likely they were to generate the source () and by how likely they are as sentences in their own right ().
Why Split the Problem at All
The split is not cosmetic. It changes what data you need and what each model has to learn.
A direct model trained on parallel data learns from target sentences paired with each source. A separate target language model can also learn from unpaired target text.
The -gram language model from Part II can learn that “the house is small” is more common than “small is house the” from English text alone. The channel model can learn from aligned translations of “the house is small.” The two components can therefore draw on different data.
There is a second, subtler benefit. decomposes over a latent alignment between source and target words, and that decomposition is what allows training from sentence-aligned but word-unaligned bitext. That is the subject of the next section.
If you acquire more legal French, you can fit a language model on it and use its scores with the existing translation model. The new scores can change which candidate wins, so check adequacy on in-domain translations before choosing or retuning the weight.
Bayes' Rule in Log Space, and What Gets Lost
Three practical notes about the log-space form.
First, each log probability is , so extending a hypothesis by another term can only leave its accumulated score unchanged or lower it. If two candidates have the same average negative log score per word, the shorter candidate receives the smaller total penalty, which biases the search toward shorter outputs. Phrase-based systems add a tuned word penalty, an additive term proportional to output length, to offset that bias.
Second, the channel scores the observed input given a candidate output . Its alignment can map each observed to the candidate token that generated it. The decoder fixes and searches for .
Third, a vocabulary of 50,000 gives possible target strings of exactly 30 tokens before constraints. Phrase-based decoding narrows the search to permitted segmentations and reorderings. The toy decoder below keeps a single bounded beam at each expansion step. It ranks partial hypotheses by their accumulated scores, so it can discard one that would complete with a higher score.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!