Statistical Machine Translation Foundations › The Translation Problem as Noisy-Channel Inference

Michael BrenndoerferNovember 26, 20263 min read
Language AI HandbookAll chapters
Part 27 of 67Machine Translation and Speech Translation
Chapter 190Statistical Machine Translation Foundations › The Translation Problem as Noisy-Channel Inference
Reading section 2 of 12 · The Translation Problem as Noisy-Channel Inference · 3 minSection 2 of 12 · 3 min

Section 2 of 12 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Suppose we want the most probable translation of a source sentence f\mathbf{f}. Bayes' rule gives

P(e∣f)=P(f∣e) P(e)P(f).P(\mathbf{e} \mid \mathbf{f}) = \frac{P(\mathbf{f} \mid \mathbf{e})\,P(\mathbf{e})}{P(\mathbf{f})}.

The denominator P(f)P(\mathbf{f}) does not depend on the candidate e\mathbf{e}, so it drops out of the argmax:

e^=arg⁡max⁡e  P(f∣e) P(e).\hat{\mathbf{e}} = \arg\max_{\mathbf{e}} \; P(\mathbf{f} \mid \mathbf{e}) \, P(\mathbf{e}).

Taking logs preserves this ranking for positive scores and turns the product into a sum:

e^=arg⁡max⁡e  [log⁡P(f∣e)+log⁡P(e)].\hat{\mathbf{e}} = \arg\max_{\mathbf{e}} \; \big[ \log P(\mathbf{f} \mid \mathbf{e}) + \log P(\mathbf{e}) \big].

Thirty factors of 10−210^{-2} give 10−6010^{-60}, which fits in a double-precision float. Thirty factors of 10−1110^{-11} give 10−33010^{-330}, which rounds to zero in that format. The log score 30log⁡(10−11)30\log(10^{-11}) remains finite. Working in log space lets the decoder compare such scores by adding the log probabilities.

Noisy Channel Model

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 (P(f∣e)P(\mathbf{f}\mid\mathbf{e})) and by how likely they are as sentences in their own right (P(e)P(\mathbf{e})).

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 P(e∣f)P(\mathbf{e} \mid \mathbf{f}) 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 nn-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. P(f∣e)P(\mathbf{f} \mid \mathbf{e}) 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 ≤0\le 0, 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 f\mathbf{f} given a candidate output e\mathbf{e}. Its alignment can map each observed fjf_j to the candidate token eie_i that generated it. The decoder fixes f\mathbf{f} and searches for e\mathbf{e}.

Third, a vocabulary of 50,000 gives 50,0003050{,}000^{30} 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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy