Neural Machine Translation
Language AI HandbookAll chapters A phrase-based statistical machine translation system of the kind described by Koehn et al. (2003) estimates word alignments, extracts phrase pairs, adds target-language scores, and searches over phrase options. See Statistical Machine Translation Foundations for the full pipeline.
Changing an upstream aligner can change the phrase table available to the decoder. To evaluate the change, rebuild the dependent artifacts, retune the feature weights if needed, and compare the completed translations on the same held-out inputs.
A supervised end-to-end NMT baseline trains one conditional neural model on pairs of source and reference sentences. The translation loss updates the components jointly. Explicit phrase tables and alignment labels are unnecessary for the encoder-decoder we build here.
We start with conditional generation and trace the encoder, attention, objective, data, and decoder choices. The worked example trains a small Transformer on a synthetic reordering language. It compares decoding policies and plots cross-attention for one held-out example.
As a quick orientation, you have already built the pieces:
- The Encoder-Decoder Framework from Part XII gives us the conditional language model skeleton.
- Bahdanau Attention and Luong Attention explain the alignment mechanism we will treat here as a translation-specific component.
- Encoder-Decoder Architecture and Cross-Attention from Part XVI give us the transformer version.
- SentencePiece and Tokenization Challenges from Part V explain the subword vocabulary that makes open-vocabulary translation possible.
- Beam Search from Part XII gives us the decoding algorithm, which we will now specialize for translation.
A translation model scores a target sequence conditional on a specific source. Reference-token likelihood rewards assigning probability to the translated text in the data. To check meaning preservation, inspect translations against their sources or use an appropriate evaluation metric.
Neural machine translation uses a neural model to translate a source in one language into another. Our supervised setup learns a conditional distribution from parallel sentence pairs, with source and target . At inference we search for a target sequence under that model.
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!