Modelcore
Phrase-based translation model
Also called phrase-based SMT.
Translate by segmenting the source into phrases, translating each by a phrase table and reordering them, scored by a log-linear model.
The phrase-based translation model translates a sentence by cutting the source into phrases (any sequences of consecutive words, not necessarily linguistic phrases), translating each phrase with a phrase table learned from a word-aligned parallel corpus, and putting the translated phrases in some order. A log-linear model scores each such derivation with phrase translation probabilities in both directions, lexical weights, a phrase and a word penalty, a distortion cost for reordering, and an n-gram language model. It is the model of the Pharaoh and Moses systems. Phrases capture local context and local reordering that word-based models such as IBM Model 1 cannot express.
The machine
Direction and notation. Translation runs from the source to the target . Spans are fencepost: covers . Logs are natural.
Derivations. A derivation is a sequence of steps , , whose source spans cover every source word exactly once, and each is a translation of the source phrase that is listed in the phrase table. The target sentence is , in the order of the steps. So the segmentation of the source, the choice of a translation for each phrase, and the order of the phrases are all hidden, and different derivations can give the same .
The phrase table. It is built in three steps. Word-align the corpus in both directions and symmetrize. Extract all phrase pairs consistent with the alignment, up to 7 words on each side. Estimate, for each pair, four scores:
- the phrase translation probabilities and , by relative frequency of the extracted pairs;
- the lexical weights and , which check how well the words inside the pair translate each other. With the word translation table from the word-aligned corpus,
where an unaligned source word is aligned to a null word.
The score. A derivation is scored by with the features
| feature | value for a derivation |
|---|---|
| phrase translation, both directions | and |
| lexical weights, both directions | and |
| phrase penalty | , the number of phrases |
| word penalty | $ |
| distortion | $-\sum_k |
| language model |
The weights are tuned on held-out data, usually by minimum error rate training. The lexicalized reordering model adds orientation probabilities for each phrase pair as more features, next to the plain distortion cost.
Example. Suppose "das haus" was extracted 10 times in the corpus, 8 times with "the house" and 2 times with "the home". Then , with . For the pair geht ja nicht to does not go, with the links geht to go and nicht to both does and not, and ja unaligned, the lexical weight with , , and is
The low value comes from the unaligned ja, and it warns the model that this pair is less reliable than its relative frequency suggests.
What it counts
The model assigns a score to each derivation, and the system outputs the target of the best derivation, . It does not sum over the derivations that give the same ; this max approximation makes search simpler. Costs are counted in table lookups and arithmetic operations, as on the word RAM:
- Scoring one derivation costs lookups: the phrase features once per phrase, the language model once per target word.
- Training costs one pass of phrase extraction over the corpus and a count of the extracted pairs, so it is linear in the number of extracted pairs, which can be large.
- Decoding, the search over derivations, is the expensive part and is done by multi-stack beam search.
Errors are of two kinds: model errors (the best derivation is a bad translation) and search errors (the decoder misses the best derivation because of pruning).
Relation to other models
- Log-linear translation model. The log-linear model is the general framework: any features, combined with weights. The phrase-based model is one instance, with phrase-level features and a derivation made of phrase steps.
- Noisy channel model. With only two features, and the language model, both with weight 1, the score is a noisy channel score in which the channel model is the product of phrase translation probabilities.
- Word-based models. The IBM models translate word by word. The phrase-based model uses them only to align words before extraction, and it uses their word translation table in the lexical weights.
- Hierarchical phrase-based model. Hiero extends phrases with gaps, so that a rule can reorder whole sub-phrases; it is decoded by chart parsing instead of left-to-right search.
- Stack decoding. The stack decoder is the search algorithm for this model; the model defines what is scored, the decoder how the best derivation is found.
- Neural models. An encoder-decoder model replaces the phrase table, the reordering model and the language model by one network and has no explicit segmentation.
Known results in the model
- Decoding is NP-hard (theorem). With free reordering, finding the best derivation is NP-hard. It contains the decoding of IBM Model 1 with a bigram language model, whose decision version is NP-complete (Knight 1999). With a distortion limit, decoding is polynomial in the sentence length for a fixed limit.
- Phrases beat words (measurement). Koehn, Och and Marcu (2003) measured clearly higher BLEU for phrase-based translation than for word-based translation, and found that phrases from symmetrized word alignments did better than phrases restricted to syntactic constituents.
- Lexical weights help (measurement). In the same experiments, adding the lexical weights to the phrase probabilities improved the BLEU score.
- Long phrases give little (measurement). In those experiments, raising the maximum phrase length beyond about three words gave only small gains, while the phrase table grew much larger.
- Overestimated long phrases. Relative frequency gives a probability of 1 to many rare long phrase pairs seen once. This is a known weakness of the estimate; the lexical weights and smoothing reduce it.
References
- Koehn, Och and Marcu 2003, the phrase-based model, the phrase translation table by relative frequency, the lexical weighting and the distortion model
- Och and Ney 2004, phrase-level translation with alignment templates inside a log-linear model
- Koehn et al. 2005, Section 2.2 (the list of features), Equation 3 (phrase translation by relative frequency) and Equation 4 (lexical weighting)
- Philipp Koehn, Statistical Machine Translation, Cambridge University Press, 2010, Chapter 5 (phrase-based models)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 53WN6E Edit this page History Report an error Markdown