Machine translation and alignment
Problems
- Machine translation
Translate a text in a source language into a fluent text in a target language with the same meaning.
intro - Sentence alignment
Pair the sentences of a document with those of its translation, allowing one-to-many, many-to-one and unmatched sentences.
core - Word alignment
Find which words of a sentence correspond to which words of its translation, as a set of links between positions.
core
Algorithms
- Additive attention
At each decoder step score each encoder state by a small feedforward network of it and the decoder state, and take the softmax-weighted sum.
1 languagescore - BLEU
The geometric mean of clipped n-gram precisions for n = 1 to 4 against reference translations, times a brevity penalty. Higher is better, from 0 to 1, at the corpus level.
1 languagescore - Gale-Church alignment
Align sentences by dynamic programming with a cost from a Gaussian model of the ratio of character lengths of matched sentences.
1 languagescore - Grow-diag-final symmetrization
Combine the alignments of the two directions by starting from their intersection and adding neighbouring links from their union.
1 languagescore - Minimum error rate training
Tune the weights of a log-linear model to maximize BLEU on n-best lists by exact line search along one direction at a time.
1 languagescore - Multiplicative attention
Score each encoder state by its dot product, or bilinear form, with the current decoder state, then take the softmax-weighted sum, over all states or a local window.
1 languagescore - Phrase pair extraction
Extract every pair of source and target spans consistent with a word alignment, that is with no link leaving the pair.
1 languagescore - Stack decoding for phrase-based translation
Beam search with one stack per number of covered source words, adding phrase translations to hypotheses with a future cost estimate.
1 languagescore - Cube pruning
Approximate k-best combination of hypotheses at each chart cell with a language model, exploring a grid of sorted options lazily from a heap.
1 languagesadvanced - Fast align
A log-linear reparameterization of IBM model 2 that favors alignments near the diagonal, trained fast by EM with closed-form normalizers.
1 languagesadvanced - GHKM rule extraction
Extract minimal rules that pair a fragment of the target parse tree with a source string, cutting the word-aligned tree at its frontier nodes.
1 languagesadvanced - Translation edit rate
Word insertions, deletions, substitutions and block shifts from a translation to its closest reference, over the reference length. Greedy shifts make it an upper bound on the fewest edits.
1 languagesadvanced - chrF
An F-score of character n-gram precision and recall between a translation and a reference, weighting recall more. Higher is better, from 0 to 1, at the corpus level.
1 languagesadvanced
Techniques
- Back-translation
Translate monolingual target text into the source language with a reverse model, and add the synthetic pairs to the training data.
core - Minimum risk training
Train a sequence model to minimize the expected loss, such as 1 - BLEU, over a sample of its own outputs, renormalized.
1 languagesadvanced - Multilingual neural machine translation
One model translates among many languages by a token that names the target language, and can translate pairs never seen together.
advanced - Sequence-level knowledge distillation
Train a small translation model on the beam search outputs of a large one, rather than on the gold targets.
advanced
Definitions
- Parallel corpus
A collection of texts paired with their translations, aligned at the document or sentence level, the training data of translation models.
intro - Alignment error rate
1 - (|A and S| + |A and P|) / (|A| + |S|) for predicted links A, sure gold links S and possible gold links P.
1 languagescore - Synchronous context-free grammar
A grammar whose rules rewrite a nonterminal into a pair of strings with linked nonterminals, deriving a source and target sentence together.
advanced
Models
- Noisy channel model of translation
Find the target sentence e that maximizes P(e) P(f | e), a language model times a translation model, for the source sentence f.
intro - Encoder-decoder model
One network encodes the source sequence into vectors and another generates the target sequence one token at a time from them.
core - HMM alignment model
Word alignment as an HMM over source positions, with jump probabilities that depend on the distance between successive aligned positions.
1 languagescore - IBM model 1
A translation model in which each source word is generated by a uniformly chosen target word. EM reaches a global maximum of its concave likelihood, but the maximizer need not be unique.
1 languagescore - IBM model 2
IBM model 1 plus an alignment distribution over source positions that depends on the target position and the sentence lengths.
1 languagescore - Log-linear translation model
Score a translation by a weighted sum of feature functions, such as language and phrase model log-probabilities and penalties.
core - Phrase-based translation model
Translate by segmenting the source into phrases, translating each by a phrase table and reordering them, scored by a log-linear model.
core - Hierarchical phrase-based translation
Chiang's model of synchronous CFG rules with phrases and gaps learned from aligned text, decoded by CKY-style chart parsing.
advanced - IBM model 3
A translation model in which each source word has a fertility, the number of target words it produces, plus distortion; trained by approximate EM.
1 languagesadvanced - Inversion transduction grammar
Wu's synchronous grammar in binary normal form whose rules keep or invert the order of two children, biparsing a sentence pair in time cubic in each sentence length.
advanced - Lexicalized reordering model
The probability that a phrase pair is placed monotone, swapped or discontinuous relative to the previous phrase, learned per phrase pair.
advanced - COMET
A learned translation metric that predicts human scores from multilingual encoder embeddings of the source, hypothesis and reference.
research - Non-autoregressive translation
Generate all target tokens in parallel, or refine them over a few rounds, given a predicted length, trading quality for speed.
research