Paper commentary
Neural Machine Translation of Rare Words with Subword Units
Subword units let NMT translate rare words
- Problem Neural machine translation works with a fixed vocabulary, so words missing from it need a dictionary back-off. That back-off cannot transliterate names or produce morphological changes, so rare words are often translated poorly.
- Method Subword NMT splits rare words into smaller units learned by byte pair encoding, instead of backing off to a dictionary. The network then translates each word piece by piece, so it can produce words it never saw in training.
- Results On the English to German newstest2015 set, the subword models raise rare-word unigram F1 to 41.8% from 36.8% for the back-off dictionary baseline.

Figure 1 : BPE merge operations learned from dic- tionary {‘low’, ‘lowest’, ‘newer’, ‘wider’}.
Original paper · CC BY 4.0 · Rico Sennrich, Barry Haddow, Alexandra Birch · Neural Machine Translation of Rare Words with Subword Units · Original paper figure · Extracted the figure area from page 4 of the original PDF.Why word-level models stall on rare words
Neural machine translation usually works with a fixed vocabulary of 30 000–50 000 words. Translation is still an open-vocabulary problem, and this bites hardest in languages that build long words by compounding or agglutination. A German compound for a sewage water treatment plant is easier to handle as several segments than as one fixed-length vector.
The usual workaround for word-level models is a back-off to a dictionary when a word is missing. That workaround rests on assumptions that often fail in practice. Source and target words don't pair one to one, because languages differ in how much morphology they pack into a word. Copying an unknown name works, but a word that needs morphological change or transliteration can't be produced this way, especially when alphabets differ.
So the authors aim to model open-vocabulary translation inside the network itself, without a back-off model for rare words.
Translating rare words through smaller units
The key idea is to split rare words into smaller units, so the network can translate them piece by piece. The authors' intuition is that many word classes translate through smaller units: names by copying or transliteration, compounds by composition, and cognates or loanwords by regular sound and morphology changes. In an analysis of 100 rare tokens from the German training data, most looked translatable through smaller units, including 56 compounds and 21 names.
The hypothesis is that a suitable split of rare words is enough for the network to learn transparent translations and to produce words it hasn't seen. Not every split is transparent, but the authors report that their NMT models tolerate oversplitting. Fixed-length character-based word vectors were tried for NMT without a significant gain over word models, because attention still works on whole words.
A variable-length segmentation lets attention place weight on different subword units at each step, so it avoids that fixed-length bottleneck.
How byte pair encoding builds the segments
Byte pair encoding is a compression method that repeatedly merges the most frequent adjacent pair of symbols. The authors adapt it from merging bytes to merging characters or character sequences. Each word starts as a sequence of characters plus an end-of-word symbol, so the original tokenization can be restored after translation.
Each round counts all adjacent symbol pairs and replaces the most frequent pair with one new symbol. Pairs don't cross word boundaries, and each word is weighted by its frequency, so the procedure runs on a dictionary of words. The final symbol vocabulary is the initial character vocabulary plus the number of merges, and the merge count is the only hyperparameter.
At test time each word is split into characters, and the learned merges are applied in order. A word like lower therefore becomes a sequence of known pieces, such as low and er·, even though it never appeared in training. Figure 1 shows the merges learned from a toy dictionary, which is the example the text follows.
Unknown symbols at test time are rare: they come only from unknown characters or from symbols whose every training occurrence was merged away. The authors observed none of these in the test set. The authors compare two ways to apply BPE: separate encodings per language, or one joint encoding learned on the union of both vocabularies. Separate encodings are more compact and guarantee each unit was seen in its language, while the joint encoding makes source and target segmentations more consistent.
For English→Russian the Russian side is transliterated into Latin letters with ISO-9 to learn joint merges, and the merges are then mapped back to Cyrillic.
Segment counts and vocabulary sizes
Plain words give 100 m tokens and 1 750 000 types, with 1079 unknown tokens in newstest2013. Character bigrams shrink the vocabulary to 20 000 types but stretch the text to 306 m tokens. BPE gives 112 m tokens and 63 000 types, with no unknown tokens in the same count. BPE used 59 500 merge operations and joint BPE used 89 500.
The authors leave very infrequent subword units out of the network vocabulary, because foreign-alphabet characters add noise to the symbol set. Classic SMT segmenters such as compound splitting, Morfessor and hyphenation reduce vocabulary only moderately and don't solve the unknown word problem.
Data, models and training
The English→Russian training set has 2.6 million sentence pairs. newstest2013 is the development set, and results are reported on newstest2014 and newstest2015. Translation quality is scored with BLEU and CHR F3, and rare and unseen words with unigram F1.
Training uses Adadelta with a minibatch size of 80, and a shortlist of 30000 words is kept in memory. The authors trained for about 7 days, then continued the last 4 saved models for 12 hours with a fixed embedding layer. Two gradient clipping cut-offs, 5.0 and 1.0, gave two runs, and the 1.0 runs produced better single models for most settings.
Reported results come from the best single system on the development set and an ensemble of all 8 models, decoded with a beam of 12.
English→German results
The question is whether subword models beat a strong back-off baseline. Table 2 lists every English→German system on newstest2015 with BLEU, CHR F3 and unigram F1.
The clearest effect is on rare words, where unigram F1 rises from 36.8% for WDict to 41.8% for BPE-J90k. Those words make up only 9-11% of the test sets, so BLEU moves less than the rare-word score does.
On BLEU the best subword system is C2-50k, at 25.3 as an ensemble, while BPE-J90k has the best CHR F3 at 54.1. The authors attribute the split to BLEU's precision bias and CHR F3's recall bias. Luong et al. report 25.9 BLEU, but that result uses an ensemble of 8 models and dropout, which this work didn't use.
English→Russian results
The back-off dictionary can't transliterate names, so the baseline is weaker when the alphabets differ. Table 3 gives the full English→Russian comparison on newstest2015.
The gain is largest on OOV words, where unigram F1 rises from 6.6 for WDict to 18.3 for BPE-J90k. On rare words, unigram F1 moves from 26.5 to 29.7. The CHR F3 ensemble gain of BPE-J90k over WDict is 2.0 points.
The authors describe the subword models as a step toward closing that gap.
Rare-word gains across frequency ranks
The authors plot unigram F1 against training frequency rank for English→German ensembles on newstest2015. The comparison includes C2-3/500k, which has the same vocabulary size as WDict but uses character bigrams for unseen words.
For the 50 000 most frequent words, all systems perform comparably. Between ranks 50 000 and 500 000, C2-3/500k degrades heavily, while C2-50k remains more stable. The authors attribute this to subword units being less sparse than whole words. Rank 50 000 corresponds to a training frequency of 60, and rank 500 000 to a frequency of 2.
So a smaller network vocabulary with more subword units can perform better than a large vocabulary of whole words.
Precision and recall on OOV words
WDict produces few OOV outputs, with recall of 26.5% and precision of 60.6%. The subword systems reach higher recall, but with lower precision. C2-50k produces the most OOV words, with precision of 29.1% and recall of 33.0%.
BPE-60k has precision of 32.4% and recall of 26.6%, and the authors attribute its transliteration and copy errors to inconsistent segmentation. Joint BPE in BPE-J90k lifts both measures, to 38.6% precision and 29.8% recall. So the joint segmentation improves precision as well as recall, rather than trading one for the other.
For English→Russian, WDict's OOV precision is 9.2% and its recall is 5.2%. BPE-J90k reaches 21.9% precision and 15.6% recall on the same words.
What the translation examples show
In the manual examples the baseline either deletes content or copies source words it should translate. Heavy oversplitting of research still gives a correct translation, showing the subword systems can learn from fragments. A rare word such as forasinine gets a wrong but plausible loanword-style output when the system hasn't learned its translation.
The Russian examples show that the subword systems can transliterate, but transliteration errors still occur. The authors trace BPE-60k's inserted and deleted characters to training pairs with inconsistent segmentations. Joint BPE segments the source and target of the same example more consistently.
Limitations
Rare and unseen words make up only 9-11% of the test sets, so BLEU and CHR F3 may understate their effect. The authors argue that the rare-word gains are orthogonal to other improvements, but this paper doesn't test that combination.
Models differ by up to 1 BLEU on the development set, and the authors leave controlling that randomness to future work. The unigram character representation performed poorly in preliminary experiments, so the reported results use bigrams.
The vocabulary size is somewhat arbitrary and was mainly set by comparison to prior work. Joint BPE can produce segments unknown on the target side, though these make up only 0.05% of test tokens.
Paper info
- Authors
- Rico Sennrich, Barry Haddow, Alexandra Birch
- Venue
- arXiv · Preprint
- First published
- 2015-8-31
- Added
- 2026-10-20
- Updated
- 2016-6-10
- Version
- v5
- arXiv
- 1508.07909
- Category
- cs.CL
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Neural machine translation (NMT) models typically operate with a fixed vocabulary, but translation is an open-vocabulary problem. Previous work addresses the translation of out-of-vocabulary words by backing off to a dictionary. In this paper, we introduce a simpler and more effective approach, making the NMT model capable of open-vocabulary translation by encoding rare and unknown words as sequences of subword units. This is based on the intuition that various word classes are translatable via smaller units than words, for instance names (via character copying or transliteration), compounds (via compositional translation), and cognates and loanwords (via phonological and morphological transformations). We discuss the suitability of different word segmentation techniques, including simple character n-gram models and a segmentation based on the byte pair encoding compression algorithm, and empirically show that subword models improve over a back-off dictionary baseline for the WMT 15 translation tasks English-German and English-Russian by 1.1 and 1.3 BLEU, respectively.
Quote from the paper
Rico Sennrich, Barry Haddow, Alexandra Birch (2015). Neural Machine Translation of Rare Words with Subword Units. arXiv:1508.07909v5. https://arxiv.org/abs/1508.07909v5
BibTeX
@misc{sennrich2015neural,
title = {{Neural Machine Translation of Rare Words with Subword Units}},
author = {Rico Sennrich and Barry Haddow and Alexandra Birch},
year = {2015},
eprint = {1508.07909},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1508.07909v5}
}