---
title: "How Effective is Byte Pair Encoding for Out-Of-Vocabulary"
description: "Araabi and colleagues test how well byte pair encoding helps machine translation systems translate words absent from their training data."
canonical: "https://research.elamur.ai/free/en/papers/araabi-2022-how-effective-is-byte-pair/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/araabi-2022-how-effective-is-byte-pair/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / How Effective is Byte Pair Encoding for Out-Of-Vocabulary Words in Neural Machine Translation?

# How Effective is Byte Pair Encoding for Out-Of-Vocabulary Words in Neural Machine Translation?

Paper · 2022 · Ali Araabi, Christof Monz and Vlad Niculae

**Authors:** Ali Araabi, [Christof Monz](https://md.research.elamur.ai/free/en/authors/christof-monz/) and [Vlad Niculae](https://md.research.elamur.ai/free/en/authors/vlad-niculae/) · **Year:** 2022 · **Venue:** Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **6** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/araabi-2022-how-effective-is-byte-pair/cited-by/) · Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2022.amta-research.9/)
- [PDF](https://aclanthology.org/2022.amta-research.9.pdf)

## Summary

A translation system can break an unfamiliar word into familiar pieces and still get its meaning wrong. Araabi and colleagues examine how often that happens in neural [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/) that uses byte pair encoding, or BPE. This form of [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) builds a vocabulary by repeatedly joining frequent pairs of adjacent units. A word absent from training can then enter the system as a sequence of known units. The authors ask how much this ability to represent unfamiliar words helps the system translate them.

The study combines sentence-level evaluation with manual judgments of individual words. In published human assessments of Kazakh–English and Russian–English translations, sentences with more out-of-vocabulary words generally received lower scores. In a separate Romanian–English experiment, the researchers deliberately made some test words unfamiliar by removing their occurrences from training. A system that used fewer BPE merges, and consequently split words into smaller pieces, lost less ground on the [BLEU score](https://md.research.elamur.ai/free/en/concepts/bleu/) than a system that used whole words. The manual analysis of German–English, Russian–English, and Romanian–English output found that even with the more favorable segmentation, roughly 60% of unfamiliar words were translated correctly. The aggregate score could stay close to its original level while errors persisted on the words the experiment was designed to test.

Performance varied with what kind of word was unfamiliar. Names generally fared better, especially in German–English and Romanian–English, while previously unseen inflected forms had the lowest correct-translation rates in all the language directions studied. The length of the segmented word showed different patterns across directions. Correct translations also tended to be associated with stronger cross-attention, a signal the authors used to identify where in the English output a source word had been translated. The training frequencies of individual pieces and short sequences of pieces yielded no statistically significant separation among the translation-quality groups in the comparisons the authors ran.

The paper’s contribution is to measure what happens after segmentation has made a word readable by the system. Finer segmentation was helpful in the tested settings, and the authors propose that shared spelling and lexical similarities may help explain why some words travel more readily between languages. The word-level judgments show how much of the open-vocabulary problem remains after the system has acquired the means to encode unfamiliar spellings.

## Deep dive: How Effective is Byte Pair Encoding for Out-Of-Vocabulary Words in Neural Machine Translation?

Araabi and colleagues test how well byte pair encoding helps machine translation systems translate words absent from their training data. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### An unfamiliar word can be made of familiar units

Machine translation is an open-vocabulary task because the text a system encounters after training can contain forms absent from its training material. An author can use a person’s name for the first time, combine familiar words into a compound, or choose an inflected form that never appeared in the training sentences. An unfamiliar spelling may even be a variation or error in a word the system has already encountered in another form. The paper uses *out-of-vocabulary*, abbreviated OOV, for a complete word absent from training before the words are broken into smaller units. The central experiments start with unfamiliar words on the source side, the side the system reads. The target side is the English text the system produces.

This definition matters because what counts as a unit of input depends on [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/), the way text is divided into pieces for processing. If the units are whole words, an unseen word falls outside the learned vocabulary. If the units are sub-words, a new word can fit entirely inside the vocabulary at the level of its pieces. A useful way to understand the study is to follow that same source word through both descriptions. It remains an unseen whole form in the training record, and its segmented representation may give the translation system several familiar pieces to work with. The study tracks the first property after the system has acquired the second.

The problem persists at very different training scales. The paper reports that even in its example of Russian–English with millions of training sentence pairs, 15% of test sentences contained an unseen word. In the limited-data Kazakh–English example, more than 60% of test sentences contained one. These are proportions of sentences affected, a different quantity from the proportion of distinct test words that were unseen. A sentence-level proportion shows how widely the problem is distributed through a test set. A vocabulary-level proportion shows how much of the range of forms in that test set is new. The paper uses both viewpoints because the prevalence of unfamiliar forms and the consequences for full sentences are separate questions.

An unknown source word puts pressure on more than the translation of one isolated item. A reader encountering a new compound in a sentence can use the visible components together with the context to infer its meaning. The analogous task for a translation system includes preserving the relationship between the components and finding an English expression that fits the sentence. A name poses a different problem. Preserving its written form, or producing an appropriate rendering, can be central to getting the sentence right. For an unfamiliar inflection, a system may need to convey grammatical information as well as identify the underlying word. These cases motivate studying the kind of form that is missing from training alongside the fact of its absence.

#### What earlier systems did about vocabulary sparsity

The paper places the question in the development of neural translation, where early work established methods for generating a target sequence from a source sequence. It cites sequence-to-sequence learning as part of that background and points to joint learning of alignment and translation as another foundational approach. Alignment concerns which parts of a source sentence correspond to which parts of the output. That problem later becomes important to the authors’ evaluation, since scoring a source word requires locating its translation in a generated sentence. [Sequence to Sequence Learning with Neural Networks](https://md.research.elamur.ai/free/en/papers/sutskever-2014-sequence-sequence-learning-neural-networks/) · [Neural Machine Translation by Jointly Learning to Align and Translate](https://md.research.elamur.ai/free/en/papers/bahdanau-2014-neural-machine-translation-jointly-learning/)

Earlier ways of handling unknown words approached the vocabulary boundary directly. A larger vocabulary could keep more known words available to the system. A dictionary could supply a translation when ordinary processing met an unknown word. A copying mechanism could carry a source form into the output, a possibility of particular interest when the source spelling is itself useful. Each approach gives the system a way to deal with a vocabulary gap. Their usefulness depends on what information is available for the particular word and what form the translation requires. [On Using Very Large Target Vocabulary for Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/jean-2015-very-large-target-vocabulary-neural/) · [Addressing the Rare Word Problem in Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/luong-2015-addressing-rare-word-problem-neural/) · [Pointing the Unknown Words](https://md.research.elamur.ai/free/en/papers/gulcehre-2016-pointing-unknown-words/)

Segmentation attacks the same problem by changing the units the system learns. The authors distinguish methods based on language-specific structure, methods designed to work without such language-specific information, and approaches that add linguistic information to a general segmentation method. Work cited in the paper includes statistical tools for dividing words according to [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/), the internal structure of words, as well as translation approaches that operate at the character level. Other cited work studies alternative sub-word segmentations. These are different ways to decide what the recurrent building blocks of a sentence should be. [Morfessor 2.0](https://md.research.elamur.ai/free/en/papers/smit-2014-morfessor-2-0-toolkit-statistical/) · [Character-based Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/jussa-2016-character-based-neural-machine-translation/) · [Subword Regularization](https://md.research.elamur.ai/free/en/papers/kudo-2018-subword-regularization-improving-neural-network/)

BPE became the mainstream approach in the account the authors give. It is simple to apply across languages and had performed well under automatic translation evaluation. It starts from smaller units and joins adjacent pairs according to their frequency. Common words can survive as whole units, while rarer words are more likely to be broken down. A new form can therefore be processed using units whose behavior the translation system had opportunities to learn during training. That property explains why BPE was seen as an answer to vocabulary sparsity. [Neural Machine Translation of Rare Words with Subword Units](https://md.research.elamur.ai/free/en/papers/sennrich-2016-neural-machine-translation-rare-words/)

The authors identify a gap in how that answer had been evaluated. Previous comparisons usually measured the effect of a segmentation strategy on translation performance across a test set. That evaluation is valuable when the question is how good the resulting translations are overall. The vocabulary question concerns a more specific set of events: whether the system recognizes and translates the meanings of full source words it has never encountered. Very few unknown sub-word tokens establish that the system can take in most of the text using the vocabulary it has learned. To evaluate the translation of an unseen word, the researchers must trace that word into the output and judge what the system did with it. The paper adds that measurement to the established comparisons.

### The method, step by step

#### Track whole words through segmentation

The study begins by comparing whole words in the source test material with whole words in the corresponding training material. An unseen [word form](https://md.research.elamur.ai/free/en/concepts/word-form/) is the particular spelling or inflected form found in the test sentence. Familiarity with a related spelling can be useful to the translation system, and the definition still treats the new form as unseen. This keeps the measure focused on the experience the system actually had with that surface form before it encountered the test sentence.

The authors count both types and tokens. A type is a distinct word form. A token is an occurrence of a form in a sentence. When the same unseen word recurs, it contributes one type and several tokens. The distinction shapes the manual evaluation. Drawing a sample of types gives the researchers a collection of different unfamiliar forms to inspect. Counting tokens as well describes how frequently test sentences present the system with those vocabulary gaps.

For the experiments that express novelty as an OOV rate, the paper’s verbal definition can be written as follows.

```
R = U / V
```

R is the OOV rate for a source test set, expressed as a proportion. U is the number of distinct source test forms absent from training. V is the total number of distinct word forms on the source side of that test set. The slash indicates division. The paper reports this proportion as a percentage. It uses sentence counts and occurrence counts separately when the question concerns where or how often unfamiliar words appear.

Next the researchers determine how to segment the data. Each BPE merge joins a frequent adjacent pair into a larger unit. With a smaller merge budget, the sequence stays closer to the original small units. With more merges, learned units can become longer, and the system can represent more familiar forms in larger pieces. The merge count is a setting selected before training the translation system. The number of pieces actually used to represent an individual word is a separate quantity, determined by its form and the learned merges. The study changes the former experimentally and examines the latter in an analysis of the resulting translations.

A familiar unit can recur in different settings. Part of an unseen test word may have been seen as a unit of a different training word, and adjacent pieces of the test form may also have been seen together inside a longer training word. Neither of those possibilities changes the original whole-word OOV label. Both matter to what the translation system has had an opportunity to learn. The paper therefore follows whole forms for evaluation and also inspects the segmented training data to characterize those opportunities.

From unseen source words to translation judgments The steps in order.

#### Prepare the data and train the systems

The main experiments translate German, Russian, and Romanian into English. The authors select these directions to work with substantial amounts of training data while covering differences in inflection and compounding. They associate Russian, Romanian, and German with Slavic, Romance, and Germanic language families, respectively. The selection gives them cases in which the character of unseen forms can differ. It also allows them to examine each direction separately when an overall tendency might mask an important difference.

For Russian–English, they use Yandex, Wiki Titles, Common Crawl, and News Commentary from WMT2020. They filter by sentence length and by the length ratio of the source and target sentences. The maximum sentence length is 200 tokens, and they exclude pairs whose source-to-target length ratio exceeds 1.5. The test material pools newstest2017, newstest2018, and newstest2019. The authors follow earlier WMT work for the preprocessing and for training BPE separately on the two sides of Russian–English. Separate training allows the source and English vocabularies of pieces to be derived independently. [Facebook FAIR’s WMT19 News Translation Task Submission](https://md.research.elamur.ai/free/en/papers/ng-2019-facebook-fair-s-wmt19-news/)

German–English uses WMT2017 training data from News Commentary, Europarl, and Common Crawl, with newstest2014 as the test set. Romanian–English uses the available WMT2016 training material and evaluates on newstest2016. The paper describes similar preprocessing for the other directions. For both German–English and Romanian–English, the authors learn BPE jointly from the source and English data. Joint learning gives the procedure a common inventory of merges for the two languages in a direction. This distinction between joint and separate segmentation matters when interpreting later comparisons among the language pairs.

The authors train the translation systems in Fairseq using the base [Transformer and attention](https://md.research.elamur.ai/free/en/concepts/transformer/) architecture. They retain the settings specified for the original base configuration, citing the size of the training sets as their reason for using those defaults. An encoder represents the source sentence, and a decoder generates the target sentence. Cross-attention is the decoder’s mechanism for drawing information from source positions as it generates the output. The segmentation settings change what counts as a position in this process. With BPE, one source word can occupy several positions whose contributions the decoder can treat differently. [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/)

The authors include a system trained with whole words in the Romanian–English stress test and train BPE systems at different levels of granularity. For the manual comparison, they focus on systems trained with 10K and 37K merges. The training and evaluation setup lets the researchers ask how an explicit change in segmentation affects results while keeping the underlying translation architecture in the same family. Later analyses of naturally varying properties, such as the number of pieces a given word receives, use the translations these systems produced.

#### Sample words and identify their translations

The manual analysis draws 400 distinct OOV source forms at random for each language. A qualified native annotator for each source language assigns categories to the selected words. The paper allows an item to belong to more than one category. A label identifies a property relevant to how the unfamiliar form arose or what sort of translation problem it presents. The categories therefore support comparisons by property, with overlap possible between groups.

The authors describe names, compounds, morphological variants, spelling errors, technical words, and foreign words. For names, the evaluation can turn on retaining the identity of a person, place, or other named referent. Compounds bring together material whose contribution has to be interpreted as part of the whole expression. A morphological variant may share material with training words and have an inflection absent as a complete form. A spelling error can produce an unfamiliar sequence even when the intended form is common. Technical words and foreign words give the study other ways in which new spellings can enter a sentence. The labels keep these different cases visible when the authors assess what segmentation accomplished.

A word-level translation judgment requires two correspondences. First the authors need the expression in the English reference, the translation against which the generated sentence is assessed. They locate it by inspecting the reference sentence. Then they need the expression in the generated English sentence that can reasonably be attributed to the source word. That correspondence can be harder to locate because the system may have chosen an unexpected word, used several pieces, or left the content out. The authors considered ordinary statistical alignment and explain that its accuracy suffers on words with little training evidence. They instead use the translation system’s cross-attention to propose where to look, then manually check the proposal. [Jointly Learning to Align and Translate with Transformers](https://md.research.elamur.ai/free/en/papers/garg-2019-jointly-learning-align-translate-transformer/)

The attention comes from the next-to-last decoder block. Each attention head produces its own weights, which describe how strongly a generated position attends to source positions in that head. The authors average over heads at the chosen block. For a given source piece, they search across target tokens for the position that gives the source piece its highest averaged weight. The position is a candidate alignment, and the weight at that position is used later as a measure of the attention received by the piece. These are different outputs of the search. The first points to a location in the sentence, and the second is a quantity the researchers can compare across cases.

The average over heads can be expressed directly from the procedure described in the paper.

```
A(t, s) = (Σₕ aₕ(t, s)) / H
```

A(t, s) is the weight averaged over the attention heads for the target token at position t and the source piece at position s. The quantity aₕ(t, s) is the weight for that same pair of positions in head h of the next-to-last decoder block. Σₕ means to sum over all the heads, and H is the number of heads included in the average.

```
m(s) = maxₜ A(t, s)
```

The quantity m(s) is the largest head-averaged attention weight received by source piece s. The notation maxₜ means to search over target token positions t. A(t, s) is the average defined above. The target position where the maximum occurs supplies the proposed correspondence for the source piece. The authors check the output correspondence by hand before using it in the translation assessment.

The word-level attention measure averages the piece-level quantities for the pieces in that word. The paper also checks the highest of those quantities as another way of summarizing the attention the word received. The average gives each source piece a role in the measure. The maximum asks how strongly the best-attended piece was attended to, which can be useful for seeing whether the broad pattern depends on averaging across all pieces.

```
M(w) = (Σₛ∈S(w) m(s)) / |S(w)|
```

M(w) is the mean attention measure for source word w. S(w) is the collection of source positions occupied by its BPE pieces, with each occurrence represented by its own position s. The summation adds m(s), the maximum weight for each of those positions. The vertical bars in |S(w)| denote the number of positions in the collection. This is a way of writing the paper’s averaging procedure. The study uses the resulting value to compare groups of words after their translations have been judged.

#### Judge meaning and fluency in context

The human judgment asks how the generated English expression would work in the reference sentence. Adequacy concerns whether the expression conveys the intended meaning. Fluency concerns whether it fits as acceptable English in that context. This substitution test allows cases where the system chooses different wording from the reference. The expression *throat inflammation*, for example, can be an acceptable rendering where the reference has *laryngitis*. Its wording differs, and it can still communicate the intended content fluently enough to receive the correct label.

The partly correct category covers cases where the evaluation finds a problem in either adequacy or fluency. A form such as *reserves* can need a small grammatical change in a context that calls for *reserve*. The authors also allow a single spelling error in this category, including in a name or technical term. They deliberately give partial credit in some cases where the result can be factually wrong. The middle label thus records proximity under the study’s rubric, with room for errors that could matter to an actual reader.

Wrong translations include missed content, additions, and substitutions that substantially change the meaning. A generated expression such as *donated* where the intended meaning is *imposing* illustrates the kind of lexical choice that bears little relation to the source in context. A system can also preserve a portion of an unfamiliar word’s meaning and lose another portion, a possibility the evaluators consider when examining compounds and other segmented forms. The evaluators work from the sentence and the intended expression because the mere presence of English tokens near an attention alignment would give too weak a basis for a word-level judgment.

#### Count recurring pieces and sequences

The authors also analyze the evidence available in the segmented training material. An [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) is a run of adjacent units, with its order given by its length. Here the units are BPE pieces. A unigram is an individual piece, a bigram an adjacent pair, and a trigram an adjacent sequence of three pieces. The authors first ask which such sequences occur at all in training. Later they ask whether the frequencies of sequences distinguish words translated with different degrees of success.

The two questions use different comparisons. The presence analysis describes how much of an unfamiliar segmented form has appeared somewhere in training, including inside another word. In the quality analysis, the authors group examples by their human translation labels and compare the training frequencies of the sequences associated with those labels. They compare each pair of categories: correct with partly correct, wrong with correct, and wrong with partly correct.

```
n ∈ {1, 2, 3, 4, 5}
```

The symbol n is the length of a sequence of adjacent BPE pieces. The membership sign ∈ means that n takes a value from the set in braces. The values specify the sequence lengths from individual pieces through sequences of five pieces, tested separately. The authors use a one-sided Mann–Whitney U test, a comparison based on the ordering of observations from the groups.

```
α = 0.1
```

The symbol α is the significance threshold used for those comparisons. The value 0.1 is the threshold reported by the authors. The statistical question is whether the observed training frequencies give evidence of the directional difference under test for the groups being compared. It differs from the descriptive question of how frequently a short sequence can be found somewhere in the training material.

### Experiments and results

#### The training collections and the unfamiliar test vocabulary

The Russian–English collection contains 2.64M training sentences after preparation. Across the pooled Russian test material, the authors identify 1078 distinct unseen source forms and 1363 occurrences of those forms. German–English has 3.95M training sentences and, on the German source side of newstest2014, 1830 unseen types and 2411 unseen tokens. Romanian–English has 612K training sentences. On the Romanian source side of newstest2016, the corresponding counts are 926 types and 1385 tokens.

These figures describe the vocabulary problem before segmentation. The token counts show that some unfamiliar forms recur. The type counts describe the distinct forms the authors can draw on for annotation. The manual study uses the same sample size of 400 source types in each direction even though the available sets differ in size. A comparison of the annotated types can therefore examine the character of translation errors without weighting each direction by the total number of times unfamiliar words appeared in its test sentences.

The paper also shows how much the OOV rate can move when the evaluation material changes. With the Romanian–English training set of 612K sentences, 10% of the distinct Romanian words in newstest2016 are unseen, while the rate for the Romanian portion of [FLORES-101](https://md.research.elamur.ai/free/en/papers/goyal-2022-flores-101-evaluation-benchmark-low/) is 42%. For Kazakh–English with 100K training samples, the corresponding source vocabulary rates are 19% on newstest2019 and 30% on the FLORES-101 test set. These are whole-word type rates relative to the stated training sets. They illustrate why the paper treats higher novelty as a realistic test condition and why the choice of evaluation corpus affects the measured burden of unfamiliar words.

#### What human sentence scores show

For the sentence-level human comparison, the authors use Direct Assessment scores already available for WMT19 outputs. Direct Assessment gives a sentence a score between zero and 100 according to how adequately it expresses the meaning of a reference translation. The authors use the TALP-UPC submission for Kazakh–English and the Facebook FAIR submission for Russian–English. Both were selected as well-performing systems trained on BPE-segmented data for which the human scores were available. The two directions give the paper a relatively low-resource case and a relatively high-resource case. [Continuous Measurement Scales in Human Evaluation of Machine Translation](https://md.research.elamur.ai/free/en/papers/graham-2013-continuous-measurement-scales-human-evaluation/)

The authors group sentences by the number of unfamiliar whole source words they contain. They use medians because the assessment scores do not follow a normal distribution. Within the WMT19 Russian–English outputs, the median is 92 for sentences without an unseen source word and 90 when there is one. It falls to 80 for sentences containing two, and to 62 for sentences in the group with at least three. These four medians describe groups of sentences translated by the same submission. The chart marks the group with the best median.

Median Direct Assessment by unseen source word count on WMT19 Russian–English Sentences containing more unseen source words receive lower median adequacy scores.

**The numbers**

| System or setting | Direct Assessment score |
| --- | --- |
| No unseen words (this paper) | 92 |
| One unseen word | 90 |
| Two unseen words | 80 |
| At least three unseen words | 62 |

The WMT19 Kazakh–English output shows the same ordering. Median Direct Assessment is 78 for sentences with no unfamiliar source word, 74 for those with one, 70 for those with two, and 69 for those with at least three. Across both directions, the scores worsen as more words in the source sentence fall outside the whole-word training vocabulary. The medians come from different systems and test sets. The relevant comparison is the ordering among the sentence groups within each direction.

This part of the evaluation concerns the adequacy of each complete sentence. A sentence with an unfamiliar source word may also contain unusual phrasing, difficult terminology, or other material that is challenging to translate. The grouping identifies an association in evaluated output. The Romanian experiment complements it by deliberately changing which of the same test words the system has seen in training. The manual study then inspects the words themselves and can identify errors whose effect is hard to locate in an adequacy score for a whole sentence.

#### What happens when more Romanian test words become unseen

The Romanian–English stress test uses BLEU to follow the behavior of whole-word and BPE systems as the OOV rate rises. BLEU evaluates generated output by comparing recurring sequences of words with a reference. A corpus-level score aggregates matches across substantial amounts of text. In this experiment the reference distributions and the source test sentences stay in place. The authors change the training material so that selected words become unfamiliar in those test sentences.

They select words that occur in both the training and the test material, starting with the least frequent ones in training, and replace their training occurrences with a special unknown-word token. A word selected this way is still present in its original form in the test sentence. Its new status reflects the removal of evidence from training. The targeted replacements have another potential effect because they put extra unknown-word tokens into the training text. To examine that possibility, the authors use the same replacement rates and place the new tokens randomly in an additional comparison. In their setup, the random replacement check supports attributing the observed BLEU deterioration to the removal of training occurrences of the selected test words.

The whole-word baseline uses the training vocabulary of full forms with no BPE segmentation. Each BPE setting is also compared against its own baseline score on the version of the training data without the added OOVs. Those baselines matter because the experiment is about how far performance falls as unfamiliarity increases. Two systems could have different BLEU scores at the start and also differ in how strongly they respond to the same change in the training data.

The reported curves show falling Romanian–English BLEU as the OOV rate rises, with the smallest deterioration for systems using relatively few merges. At a test OOV rate of 32%, the curve for BPE-10K is described as very close to that setting’s baseline without the added unfamiliar words. The whole-word system loses more ground, and settings with larger merge counts behave more like it as the OOV rate increases. The 32% figure refers to the proportion of distinct Romanian test forms that are unfamiliar under the altered training condition. It measures the size of the vocabulary change and does not give the magnitude of the BLEU loss.

An important feature of this comparison is that each setting still has to translate the same source passages. Finer segmentation leaves the system more chances to reuse small units that occur elsewhere in the training data after the full word has been removed. The outcome is consistent with that mechanism. The random token comparison addresses the extra markers introduced by the intervention, while the different merge budgets show that the effect of removing test-word evidence depends in part on the units the system uses.

#### How many unfamiliar words translate correctly

The word-level comparison examines 10K and 37K merge settings in German–English, Russian–English, and Romanian–English. Its metric is the distribution of manual judgments among correct, partly correct, and wrong translations for the sampled unseen types. This evaluation credits acceptable alternatives to the reference. It also makes the unfamiliar source item the unit of assessment. An otherwise strong translation earns the same local judgment for a missed word as a weaker sentence would earn for the same error.

The manual comparison favors the smaller merge budget among the settings tested. It also reports a remaining gap: BPE correctly translates roughly 60% of the sampled OOV words in the paper’s overall account of the manual results. The authors present that figure as an approximate description of the result, with separate plots breaking down the performance across the language directions and categories. It should be read as an approximate level of success in the manual evaluation, instead of an exact rate for every direction and BPE setting.

This result helps explain what the Romanian BLEU curve establishes. A small corpus-wide loss under BPE-10K shows that overall output retains much of its agreement with the reference under the intervention. The manual judgments ask whether each unfamiliar source word has a usable English expression. The remaining errors can be consequential for what a particular sentence says even while most of its words still match the reference. The authors use the contrast between evaluations to argue for inspecting the local translations when the object of study is vocabulary coverage in practice.

The most favorable category is generally [named entities](https://md.research.elamur.ai/free/en/topics/named-entity-recognition/). The plots show fewer wrong name translations than for other OOV categories, with the advantage particularly apparent in German–English and Romanian–English. The authors suggest that shared Latin spelling and lexical similarities in these directions make some names easier to render in English. For Russian–English the paper finds more limited success on unfamiliar words overall. Script and lexical similarity are plausible interpretations of the pattern alongside differences that the experiments leave entangled.

Of the forms examined across the translation directions studied, morphological variants are translated correctly least often. This result matters in particular for Russian and Romanian, given the authors’ interest in languages with substantial inflection. German compounds are another demanding group. For the German–English manual sample, the paper reports that 56% of the unfamiliar compounds are translated accurately. That figure describes the correct-translation share for the compound category. It does not measure overall German–English quality or the proportion of all German OOVs that are compounds.

Spelling errors, technical words, and foreign words appear less frequently in the annotated material than names, compounds, and morphological variants. The paper plots a category for a language direction only when its sample contains more than 10 unfamiliar types of that category. The qualitative account describes moderate performance for the less prevalent groups, with somewhat better results for foreign words in cases where they are already in English. The reporting rule matters when reading the category plots. A missing category can reflect too few sampled examples to display, and only the displayed categories support the paper’s plotted comparisons.

### What the ablations show

#### Changing a merge budget and changing a training vocabulary

The paper varies vocabulary exposure and segmentation in the Romanian stress test and compares merge settings in the manual study. Its remaining analyses examine relationships within the resulting translations. These comparisons answer different kinds of questions. Removing the training occurrences of selected words deliberately changes what the system has seen. Changing the merge budget deliberately changes the available representation. Grouping translated words by attention, category, or length examines properties that vary among examples after training.

The stress test gives the clearest evidence that the choice of segments moderates the loss associated with unfamiliar words. BPE settings with fewer merges preserve finer units across training and test cases. The whole-word system has fewer opportunities to reuse a part of a word whose complete form has been removed. Larger merge budgets make the segmented systems more vulnerable in the experiment, and the manual comparison between 10K and 37K agrees with the broad conclusion that the finer setting is helpful. Agreement across these evaluations is informative because one study tracks an aggregate decline under an intervention, while the other judges a sample of naturally unseen words in context.

The randomly assigned replacement tokens are a control for a specific rival explanation of the Romanian BLEU decline. The targeted intervention changes two properties of the training text at once: the occurrence of the chosen test words and the number of special tokens. Applying replacement at the same rates to random locations tests the effect of introducing those tokens when the locations are chosen differently. The comparison supports the authors’ interpretation for this setup. Removing evidence of words known to occur in evaluation makes a difference that can be moderated by segmentation.

A smaller merge budget often divides more of the vocabulary into short pieces. This changes the translation system’s experience of both familiar and unfamiliar words. The resulting difference therefore measures the effect of a segmentation setting as a whole. A word-level analysis can ask a more specific question about the representation of an individual unfamiliar word. The paper takes up that question by examining the lengths that a fixed BPE setting actually assigns and by checking what training evidence those sequences contain.

#### Where familiarity runs out in the German data

The authors’ first German–English analysis tracks which sequences inside an unseen German test word have occurred in the segmented German training text. For OOV words represented by three BPE pieces, all of the individual pieces are present in training. The paper reports that 72% of their bigrams occur and that 0.5% of their trigrams occur. A trigram can count as present because it occurs inside a longer word. The whole test form remains unseen as a separate word under the definition used in the study.

This comparison isolates a distinction the whole-word OOV label alone cannot express. Two unfamiliar forms can each be composed entirely of known pieces yet offer different amounts of evidence that the pieces belong together. Training might contain each piece of either form, and only one of the forms might have an adjacent pair already used in a similar sequence. A sequence may also occur in training in a context with a different meaning. The presence measure says that the system had an opportunity to encounter the combination in some context. The success of transfer to the new word still has to be assessed in its own sentence.

Across the German lengths examined, the authors observe that the presence of BPE sequences in training generally increases for words made of more pieces. Short sequences, especially individual pieces and adjacent pairs, recur more frequently than longer sequences. The authors interpret the novelty of an unseen spelling as concentrated in the longer arrangements of its pieces. This is evidence about where the training vocabulary offers familiar material. It also motivates testing whether greater frequency of that material, once found, leads to better translation.

#### What the attention comparisons establish

The authors group unfamiliar source words by their assessed translation quality and compare the attention received by their pieces. Correctly rendered words tend to receive stronger cross-attention than words classified as wrong. The measure averages the strongest weights received by the pieces of a word, and a comparison based on the maximum over the pieces gives the same broad pattern. The result associates translation success with a feature of how the decoder and encoder interacted on those examples.

This finding has a specific scope. The words were already translated when the researchers calculated the weights and assigned the quality categories. A strong correspondence between a source piece and a generated term can reflect successful processing on that example. The paper has no intervention in which increasing attention to a chosen source word is shown to improve its translation. The weights also helped locate the output expressions that were inspected. The authors manually checked the proposed alignments, and the dependence of both analyses on the same attention signal limits what can be inferred from their agreement.

Attention differs across the language directions as well. The reported comparison shows stronger attention for correctly translated OOV items in Romanian–English and German–English than for their counterparts in Russian–English. The authors connect this with the relative difficulty they observe in translating Russian OOVs. They suggest that language distance and the morphological richness of Russian may help explain the pattern. The comparisons establish a joint pattern of attention and judged quality in the observed output. A test that varied factors such as script, morphology, and lexical similarity independently would be needed to estimate the contribution of each.

#### Why the number of pieces has different effects

Once the authors establish that 10K merges performed better in the manual comparison, they use that setting to examine the number of pieces assigned to individual OOV words. Within each language they find no significant correlation between the word’s category and the length of the segmented sequence. The quality patterns also differ by direction. Shorter segmented forms tend to do better in Russian–English. In Romanian–English, the tendency favors longer sequences. German–English shows somewhat higher correct-translation rates for words divided into 3 or 4 pieces in the plot of the sampled types.

The comparison between these natural lengths and the earlier comparison of merge settings gives the results their proper scope. Altering the number of merges changes how the entire training corpus is segmented and what the system learns. Observing the number of pieces in a test word under a fixed merge budget compares different words as they happen to be segmented. The test forms can differ in spelling, structure, and meaning as well as in length. The length analysis helps identify where the observed benefits accumulate, and the chosen merge comparison provides evidence about the effects of changing settings.

The attention analysis by length follows the same direction as the quality analysis. In each language pair, the lengths associated with better translations tend to receive stronger attention. The authors interpret the results as consistent with the possibility that finer decomposition is especially useful when the source and target have greater lexical similarity. In such a setting, a sequence of smaller pieces may preserve familiar source information that carries over into the target expression. Russian–English shows that the observed direction of the length relationship depends on the pair being studied.

#### Which frequency effects the authors could detect

The frequency analysis asks whether training examples of the short sequences supply an advantage visible in the translation labels. For each sequence length, the authors compare the frequency distributions for the human quality groups using the one-sided test described earlier. None of the pairwise comparisons yields a statistically significant difference at the stated threshold of 0.1. The paper therefore finds no evidence in these data that training frequency of a piece or short sequence separates the quality groups under the tests it runs.

The German coverage result and the frequency comparison concern two successive questions. The coverage analysis shows that the novel word can contain many pieces and short sequences that have occurred in training. The comparison by quality asks how informative the amount of recurrence is once the authors examine how those words were translated. A familiar sequence can occur often in contexts far removed from its use in the test word. The frequency test treats those occurrences as counts and leaves their contextual relevance unmeasured. Its result limits the evidence for a simple explanation based on counts of pieces alone.

There is also a distinction between a statistically undetected relationship and the shape of any relationship that might exist. The tests compare groups at the chosen sequence lengths and with the given quality categories. The paper does not establish how unusual particular forms would have to be for training frequency to matter, or whether frequency interacts with a property such as morphology. The authors’ conclusion stays at the level of the observed comparisons: within the data and measure they used, the proposed frequency advantage did not show up as a significant group difference.

#### When the English expression is unfamiliar too

Finally the authors examine cases where the source form is unseen and the correct English expression, or the reference expression, is absent from target-side training as well. The question is whether being unfamiliar on the target side adds another obstacle to successful translation of the source word. The comparison is possible because the English output can also be assembled from smaller pieces. The authors observe correct outputs whose English expression was unseen as a whole during training, giving concrete evidence that the translation process can produce unfamiliar full forms on the target side.

In German–English and Russian–English, the paper reports more correct source-OOV translations with an unfamiliar target expression than with a familiar target expression. The ordering is reversed in Romanian–English. The authors describe counts of correct translations for each kind of case. To measure an advantage or disadvantage in probability, a reader would need the corresponding totals of familiar and unfamiliar target expressions as denominators. The observed counts and the differing direction across the three cases support the narrower point that concurrent target novelty does not present a uniform pattern in these results.

### Limitations

#### Limits recognized by the authors

The authors treat the manual word analysis as essential to their question and recognize its cost. Each source language requires an annotator able to categorize the unfamiliar forms, trace their intended translations, and judge English output in context. The scale of the study gives the paper a sample of distinct forms for each direction and leaves few instances in some categories. The cutoff used in the category plots is one visible consequence. The method is especially informative where it has enough examples to compare patterns, and repeating it across more languages requires additional linguistic judgment.

The rubric is deliberately lenient for partly correct translations. A misspelling in a name or a small difference in form can receive partial credit. The authors acknowledge that some such outputs can be factually wrong in consequential ways. The distinction between correct and partly correct is therefore important when the results are used to understand why a system fails. Combining those outcomes would answer a different question about how often the system produces something close to the intended expression. The study’s correct label is the more direct measure when the issue is whether the generated expression conveys the intended meaning fluently.

The paper also states a limit on the perspective of sentence-level evaluation. BLEU can give relatively little weight to an error at the particular source word that motivated an evaluation. Human sentence adequacy offers a complementary assessment of the output as a whole. Here direct word-level annotation is needed to find out whether a specific source form was handled successfully. This scope is why the authors propose future comparisons of segmentation approaches for morphologically rich languages using word-level judgments. The current work tests BPE and variations in its granularity, with a whole-word baseline in the Romanian stress test. It leaves the word-level performance of morphology-aware alternatives open.

Target-side novelty is exploratory in the paper. The central definition and annotated samples focus on unseen source words. The authors extend the analysis to whether the corresponding English forms are familiar, within the cases selected for source-side novelty. Broader assessment of English expressions generated from familiar source forms would be a different sampling task. The observed target-side successes establish that generation of an unfamiliar English expression occurs in this setup, with the overall difficulty of that task left to separate evaluation.

#### Limits of the experimental design

The language comparisons bundle several properties of the setup. German and Romanian are handled with joint source–target BPE, while Russian is handled with separately learned segmentation. The languages and corpora also differ in morphology, script, lexical similarity, training amount, and which kinds of unseen words occur in the test sentences. The study can describe how the tested directions behave and suggest plausible reasons for the differences. An estimate of the effect of script or language distance alone would require a comparison that separated it from those other properties. The evidence for such explanations is comparative and observational.

The paper chose its main language directions in part because the authors regarded the training sets as sufficiently large for their inquiry. Training scale still varies across those directions. The Kazakh–English evidence comes from published sentence-level human scores for a different system, with the fine-grained annotation conducted on German, Russian, and Romanian. A reader can use the Kazakh result as evidence that the sentence-level association also appears in the low-resource setting examined. The category-specific results come from the three manually studied directions and give no direct category-by-category test in Kazakh.

The Romanian intervention deliberately selects rare training words by checking whether they also occur in the test material. That makes the test useful for studying a known increase in unfamiliarity. It narrows the scope of the intervention to the selected words, their contexts, and the particular removal procedure. The random replacement control supports the interpretation that losing training evidence of those words matters. Other routes to a high OOV rate, such as choosing evaluation material with different subject matter, can also change the context in which words are used. The comparison with FLORES-101 documents variation in vocabulary novelty between test sets and leaves those additional changes outside the intervention.

The manual study reports that a native annotator for each language labeled the sampled forms, and the authors describe manually verifying the output alignments. Agreement among independent judges is unreported. Consequently the reader can inspect the rubric and examples, while the stability of borderline decisions across annotators remains unknown. The use of overlapping categories also means that group performance need not isolate the effect of one property of a word. An item can contribute to multiple groups, and a category comparison can reflect the characteristics those groups share.

The attention analysis uses one layer and a particular averaging convention. Taking a maximum over target positions gives the researchers a consistent way to seek an alignment. An unfamiliar source word can still influence English output in less localized ways, including through wording spread across a phrase. The manual checks make the judgments more closely tied to the actual output. They do not turn the attention weights into independently manipulated causes of correctness. The association may help describe where successful translations tend to have strong links to the source, with causal interpretation requiring a different kind of experiment.

Finally, the reported absence of significant frequency effects is tied to the sequence lengths, quality labels, and data included in those tests. Frequency of a piece in relevant contexts, the meaning it contributes to different words, and its interaction with nearby pieces are separate questions. The paper’s measurements support a limited conclusion about the simple counts examined. Much of the value of the study comes from specifying these levels of evidence: whether a word can be segmented, whether its pieces or sequences have appeared in training, and whether the translation actually conveys the information the word contributes.

### What came after

*Tokenization on Trial* (2025) cites Araabi and colleagues in work on Kalaallisut–Danish legal translation. Its title places the choice of tokenization at the center of a case study in a different language pair and a specific domain. That focus connects with Araabi and colleagues’ finding that the effect of segmentation depends on the material being translated and on what the evaluation measures. The citation establishes the connection between the papers. The later work’s title identifies its language pair and legal setting, while its particular comparisons and findings are unspecified. [Tokenization on Trial: The Case of Kalaallisut–Danish Legal Machine Translation](https://md.research.elamur.ai/free/en/papers/ploeger-2025-tokenization-trial-case-kalaallisut-danish/)

## Cite

Cite as Ali Araabi, Christof Monz and Vlad Niculae. 2022. How Effective is Byte Pair Encoding for Out-Of-Vocabulary Words in Neural Machine Translation?. Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{araabi2022how,
  title = {{How Effective is Byte Pair Encoding for Out-Of-Vocabulary Words in Neural Machine Translation?}},
  author = {Ali Araabi, Christof Monz and Vlad Niculae},
  booktitle = {Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track)},
  year = {2022},
  url = {https://aclanthology.org/2022.amta-research.9/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
