Elamur Research

Optimizing Transformer for Low-Resource Neural Machine Translation

Paper · 2020 · Ali Araabi and Christof Monz

Summary

A translation system learns from examples of the same content in two languages. When those examples are scarce, the settings that work on a large collection can make poor use of a small one. This paper asks how much of the difficulty comes from the way researchers configure the system. Its focus is the Transformer, an architecture that uses attention to determine which parts of a sentence matter as it builds a representation or produces a translation. The authors keep that architecture and vary its settings, testing how much they can improve supervised machine translation.

The main experiments start with an IWSLT14 corpus of German and English TED talks. The authors train on randomly sampled portions of the corpus, from 5k sentence pairs through the full condition labeled 165k. They vary how text is split into smaller units, how much processing happens inside the encoder and decoder, and how strongly training discourages the system from relying on patterns peculiar to its examples. The smallest sample benefits from narrower feed-forward layers, fewer attention heads, and several forms of dropout. Ordinary dropout at 0.3 is selected across all the reported German-to-English sizes, while the preferred feed-forward width, amount of label smoothing, and batch size change with the amount of data.

The authors report a gain of up to 7.3 points over the standard settings on the BLEU score, which measures overlap between system output and reference translations. On the German-to-English test set, the 5k configuration scores 14.3 against Transformer-base at 8.3. The 20k configuration reaches 24.1 against 16.8. A recipe selected on 5k improves on Transformer-base when carried over to larger samples, but settings selected for each size generally yield stronger results. German-to-English settings also improve on Transformer-base when reused in the reverse direction and for Belarusian, Galician, Slovenian, and Slovak paired with English.

The comparison with recurrent translation systems sets an important boundary on that result. With standard settings and very little data, Transformer does better than the recurrent baseline in the authors’ replication. After tuning both architectures, the authors report a Transformer lead only beyond 20k training examples. They also find that reducing the number of sub-word merges produces a much smaller gain for Transformer than earlier work reported for a recurrent system. The experiments therefore make the baseline configuration part of the scientific question. Both the amount of parallel text and the architecture determine which settings are worth changing.

Deep dive: Optimizing Transformer for Low-Resource Neural Machine Translation

How tuning Transformer size, regularization, and vocabulary improves translation with little parallel text, and where a recurrent system still leads. · about 32 minutes to read

The problem and its context

When a strong architecture is trained on little parallel text

A parallel corpus pairs a sentence in one language with a translation in another. Each pair teaches the system something about producing target-language text from a particular source. A large corpus can illustrate recurring patterns in many contexts. A small corpus limits how often the system sees different uses of a word, construction, or sequence of words. The difficulty is especially visible for rare words. Even a useful word may appear too seldom in complete form for the training process to learn how it behaves.

The authors describe scarcity of parallel text as a challenge for most language pairs. Their framing makes the pair and the available corpus the practical unit of analysis. German and English, for instance, provide a way to investigate the effects of scarcity by taking smaller samples from a larger collection. The paper then turns to pairs for which the available experimental corpora are themselves small. Those parts of the study address complementary questions. The sub-sampling experiment varies the amount of data while keeping the language pair and source collection stable. The other pairs show what happens when the settings chosen that way are carried into different languages and corpora. This is the sense in which the paper studies low-resource languages.

In the earlier work it discusses, a common response was to find more signal outside the original parallel corpus. The authors cite work on using text available in a single language, along with work on methods for creating additional training examples. These approaches change the material from which the system learns. The intervention in this paper happens at a different stage. It asks what can be learned from the same pool of paired examples when the representation and training settings are chosen for that pool. The distinction matters when comparing scores. A gain from changing the configuration gives evidence about how the system uses its data. A gain from adding examples answers a question about what training material helps. The paper sets its own experiment against earlier work on using monolingual corpora and data augmentation for low-resource neural machine translation.

Earlier work by Sennrich and Zhang supplied the immediate reason to study settings. Their study showed that a recurrent neural translation system could benefit substantially from configuration changes when parallel data was scarce. A recurrent system processes a sequence by passing information through successive positions. In the encoder–decoder setup, the encoder reads the source and the decoder produces the target sequence. The Transformer also has an encoder and a decoder, but its processing relies on attention. Attention lets a position draw different amounts of information from other positions. It also gives the researcher settings with no direct equivalent in a recurrent system, such as the number of attention heads in a layer. The paper situates the recurrent approach in work such as Sequence to Sequence Learning with Neural Networks and takes its Transformer baselines from Attention Is All You Need.

Why the defaults are part of the question

A hyper-parameter is a choice made by the researcher, such as the width of a layer or the rate of dropout. The weights that implement the translation behavior are learned from examples. Hyper-parameters determine the structure in which those weights are learned, the conditions under which training takes place, or the way examples are presented. Two systems trained on the same sentence pairs can consequently have different capacities, learn from different segmentations of the same words, and receive different degrees of encouragement to generalize.

The paper observes that researchers often retain standard Transformer settings even when their data differs substantially from the conditions in which those settings were established. Defaults make a system easy to reproduce and provide a recognizable point of comparison. Their suitability for scarce data is a separate empirical question. A comparison with a default system measures the performance of a particular recipe, while a comparison after giving each architecture its own tuning effort gives different evidence about the architectures. Both comparisons are relevant to the authors because the earlier demonstration of strong low-resource performance used a tuned recurrent system.

The literature reviewed in the paper gives reasons to try widening or deepening a Transformer and reasons to try reducing its size. The authors describe studies in which increasing the parameter count improved performance, chiefly in richer data settings. They also cite work on low-resource translation that found benefits from using fewer Transformer layers. Depth is only one way to change how much processing the architecture can do. The authors therefore investigate the number of layers together with the width of feed-forward processing, the size of the token representation, and the number of attention heads. This expands the question posed by earlier work on depth and tests whether different parts of the architecture respond differently to data scarcity. The papers they discuss include Learning Deep Transformer Models for Machine Translation.

The recurrent results raise a similar question about how to represent the vocabulary. A rare word can be handled as a sequence of pieces, some of which occur elsewhere in the corpus. A larger set of allowed pieces can retain more complete forms, while a smaller set can make individual pieces recur in more contexts. How far to take that tradeoff is a choice made before the translation weights are learned. The earlier recurrent study found it important enough to warrant a separate experiment for Transformer. It also tried smaller training batches and several forms of regularization. These became comparison points for the new study rather than assumptions about what its Transformer should use.

The broader problem is thus concrete. Given a collection of parallel sentences, the researcher has to decide how to represent them, how much processing capacity to allocate, and how strongly to regularize training. Each choice can affect what the system learns from the available examples, and the choices can interact. The paper organizes its experiment around a practical search through those decisions, with development data used to judge candidates and test data used to report translation quality.

The method, step by step

Start with parallel sentences and choose their units

The search begins with a corpus whose source and target sentences already correspond. The authors use TED talk data from the IWSLT 2014 German–English shared task so that the main experiment can be compared with the earlier recurrent study. They use Moses scripts for punctuation normalization, tokenization, cleaning, and truecasing. In this pipeline, normalization makes punctuation conventions more consistent, tokenization identifies units in the text, and truecasing handles capitalization. The training setup also imposes a maximum sentence length of 175 tokens. After preprocessing, the German–English collection has 165,667 training pairs and 1,938 development pairs. The development portion has a separate job from the training portion. It supplies the translations against which candidate choices are compared.

From the training portion the authors sample sets of 5k, 10k, 20k, 40k, and 80k sentence pairs. They also train on the entire available corpus, labeled 165k in the comparison. This design gives the search several points at which to observe how a useful setting changes as examples become more abundant. It also makes it possible to take the choices made for the smallest sample and try them on the others. That transfer within the same pair is a distinct experiment from selecting settings on the development data separately at each size.

Before the system sees the sentences, the authors explore byte-pair encoding, or BPE, a form of subword tokenization. BPE learns which neighboring pieces to join. Each merge extends what the vocabulary can represent as a single unit. With fewer merge operations, a word is more likely to be represented by smaller pieces. A translation system can then encounter the same pieces in several words, even where some complete words occur seldom. With more merges, it can keep more sequences intact. The merge setting controls the vocabulary available to training and the sequences that the source and target sentences become.

The paper varies the number of BPE operations over a range from 1k to 30k. It also compares fitting the segmentation on the full training corpus with fitting it on the subsets, and experiments with discarding infrequent sub-word units when applying the learned segmentation. These choices ask different questions. The merge count controls how far the segmentation is allowed to combine pieces. The fitting corpus determines which examples inform the learned combinations. The frequency filtering experiment asks whether units that occur infrequently should be retained when segmenting text. The optimized runs use BPE trained on the relevant subset, with the merge count chosen for its data condition.

Selecting Transformer settings for a training corpus

The steps in order.

Selecting Transformer settings for a training corpusStep 1: Prepare and sample parallel sentences1. Prepare and sample parallel sentencesStep 2: Fit and compare subword segmentations2. Fit and compare subword segmentationsStep 3: Train candidates while varying one setting3. Train candidates while varying one settingStep 4: Keep the setting favored by development translations4. Keep the setting favored by development translationsStep 5: Continue through architecture and training choices5. Continue through architecture and training choicesStep 6: Score the selected configuration on test translations6. Score the selected configuration on test translationsStep 7: Reuse settings at comparable corpus sizes7. Reuse settings at comparable corpus sizes

Choose what happens inside the Transformer

The encoder turns the source sequence into a set of representations. The decoder uses information from the source and from the target sequence produced so far to predict what comes next. Both contain stacks of layers. Within a layer, attention moves information among positions and feed-forward processing transforms the representation at each position. Changing the number of layers changes how many successive stages of processing take place. Changing the size or number of components inside each layer changes what those stages can do. The authors explore these choices separately so that a shallower stack can retain ordinary token representations or a narrower feed-forward component can retain the original depth.

The paper denotes the feed-forward dimension by d_ff. The d refers to a dimension and the ff identifies the feed-forward component. This is the internal width of the feed-forward part of a layer. The paper denotes the embedding dimension by d_model. In that notation, d again refers to a dimension, and model identifies the width associated with the representations passed through the architecture. An embedding is the numerical representation used for a token. Reducing the feed-forward dimension and reducing the embedding dimension act on different parts of the system. A narrower feed-forward component can process representations of the same width as before, which is why the authors can test those two changes separately.

The feed-forward search considers widths of 128, 256, 512, 1024, 2048, and 4096. The embedding search considers 256, 512, and 1024. The width settings describe the architecture and carry no information about the number of sentences or the number of distinct words. The research question is whether a size that works on a larger corpus gives useful processing capacity at a given sample size, or whether the available examples favor a smaller component.

An attention head is one of the parallel parts of an attention operation. Each head can assign its own pattern of importance to positions in the sequence. The authors consider head counts of 1, 2, 4, 8, and 16. They also try stack depths from 1 to 7 layers, treating the layer count in the encoder and decoder as a setting to investigate. An attention head and a layer provide different forms of capacity. Several heads provide several ways of attending within a stage. Additional layers let the system repeat transformations on representations formed in earlier stages. By testing both, the authors can ask whether the data supports more parallel attention patterns or more successive stages of processing.

Those changes are modifications of the Transformer family. The paper describes them using widths, counts, and training settings. Its method is an experimental search over those settings, with no new mathematical objective or architecture equation to apply.

Decide what to disrupt during training

Regularization is the general term for choices intended to help a system perform on examples beyond its training set. Dropout is one form of regularization. During training it makes some information unavailable, so the rest of the system must learn to keep working without relying on that information every time. The authors test dropout in several places because dropping a component of a representation, an attention weight, a word representation, or a whole layer changes a different part of the calculation.

Ordinary Transformer dropout affects the output of sublayers. The paper names the feed-forward and self-attention sublayers and also describes applying dropout after positional information has been added to the embeddings in the encoder and decoder. Positional information gives the representations a way to distinguish where tokens occur. Changing this general dropout rate therefore affects several parts of the path from a sequence of embeddings to a prediction. The search tests rates from 0.1 to 0.5.

Attention dropout acts within the attention operation. Attention computes weights that describe how strongly a position draws from other positions. The paper applies this dropout after the softmax, the operation that turns attention scores into weights. Activation dropout acts inside the feed-forward sublayer, on the intermediate values produced as that sublayer transforms its input. The authors consider attention dropout rates from 0 to 0.3 and activation dropout rates from 0 to 0.5. Those are separate choices from the general dropout rate. In particular, the activation experiment can alter how a feed-forward component is used during training while holding its width fixed.

Layer dropout skips whole layers during training. The authors distinguish the encoder and decoder rates, so training can drop parts of the target-side processing stack while keeping the source-side stack intact. They examine rates from 0 to 0.4 for this setting. The distinction between layer dropout and reducing depth matters for interpreting the results. A reduction in depth changes the selected architecture. A layer dropout rate changes which layers participate on training examples. The search includes both options and can select shallower stacks that are also trained with layer dropout.

Word dropout acts on the entries used to represent words. Here the researchers distinguish the source and target sides and examine rates from 0 to 0.3. Target-side word dropout makes some target input information unavailable during training. It acts on the information entering the computation, while decoder layer dropout acts on the processing applied to it. The search can keep an adjustment on one side of the translation task without choosing the same rate on the other side. That distinction becomes relevant at the smallest sizes, where the selected settings treat the source and target differently.

Label smoothing changes the training target. In its ordinary form, a classification target puts all the weight on the recorded answer. Smoothing assigns some weight elsewhere so that the system is trained toward a less concentrated target distribution. In translation the relevant prediction is the target token. The factor controls the degree of smoothing, and the authors try values from 0.1 to 0.8. Label smoothing changes what distribution the system learns to predict from a training example, while dropout changes information or computations available when making the prediction. The two can therefore be selected together.

Search one setting at a time

Testing every combination would mean rerunning training for combinations of all the widths, head counts, depths, segmentation choices, and regularization settings. The authors describe that cost as prohibitive. They consider the possibility of random search, then choose a one-setting-at-a-time grid search for simplicity. For the current setting, they run through a finite list of candidate values. Once they select a value, it stays fixed as they test the next setting. Later candidates are consequently assessed in the context created by the earlier selections.

After the vocabulary exploration, the ordered search begins with feed-forward width and then moves through embedding width and the number of attention heads. It goes on to general dropout, the number of layers, and label smoothing. The next part tests encoder and decoder layer dropout, source and target word dropout, attention dropout, and activation dropout. This ordering helps interpret the paper’s cumulative results. By the time the authors test decoder layer dropout, for example, they have already selected the head count, the general dropout rate, the depth, and the label smoothing used in that sequence.

The later stages cover embedding layer normalization and training settings. Layer normalization adjusts the scale of values in a representation. The embedding normalization choice is tested as a yes-or-no setting. Batch size specifies how much training material contributes to an update. The candidate batch-size settings are 512, 1024, 2048, 4096, 8192, and 12,288. The learning rate controls the scale of parameter updates, and a scheduler changes that scale during training. The authors compare the original Transformer scheduler with the inverse-square-root scheduler implemented in Fairseq. They also try warm-up settings of 2000, 4000, 5000, 6000, 8000, and 10,000 steps and learning rates of 0.01, 0.001, 0.0001, and 0.00001. Warm-up controls the initial period over which the scheduler brings the learning rate up.

The arrangement makes the search feasible and gives the resulting configurations a clear history. It also means a selected value is the best candidate encountered at that point in the procedure. A choice made early can be favored with the settings then in place, even if the later choices would make a different value attractive. The paper explicitly treats the possibility of a better joint combination as open. Its configurations are empirical outcomes of an ordered search, and their scope is set by the options that search considered.

For the German-to-English experiment, the authors use the development data to choose settings at each training size. For English-to-German they reuse the configuration from the corresponding German-to-English size. For the other pairs they select the German-to-English configuration whose training size corresponds most closely to the corpus in question. In both cases the recipe carries over while training takes place on sentences for the intended language direction. What transfers is the choice of settings. The implementation for the translation experiments is Fairseq.

Experiments and results

How the tests separate sample size and transfer

The main test collection combines IWSLT 2014 sets identified as tst2010–2012, dev2010, and dev2012. Together they supply 6,750 German–English sentence pairs for test evaluation. The names of some constituent sets include “dev,” but in this design their concatenation is the test set. The separate development portion of 1,938 pairs is what the authors use to choose settings. Within a translation direction, the test collection gives the authors a common basis for scoring systems trained on different numbers of sentence pairs. That is what allows a change in the training sample to be studied without also changing the collection used for the reported evaluation.

The comparison also includes original test sets for Belarusian, Galician, and Slovak TED talks and Slovenian from IWSLT2014. Those corpora provide 4.5k Belarusian–English training pairs, 10k Galician–English pairs, 13k Slovenian–English pairs, and 55k Slovak–English pairs. German–English is where the authors vary the training count deliberately. The other pairs supply tests of whether a decision made from that experiment has value when corpus size and language identity change together. The paper describes the background to the Slovenian collection through its citation of WIT3.

The baselines are Transformer-base and Transformer-big, configured with the settings and optimizer choices described in the original Transformer work. Transformer-base is the baseline from which the paper’s main search proceeds. Transformer-big is a separate comparison with a larger standard configuration. The paper also replicates the earlier study’s baseline and optimized recurrent systems on the German–English data. That replication gives a comparison across architectures after tuning, in addition to the comparisons between settings within Transformer.

The scores are computed using sacreBLEU. BLEU compares system output with reference translations using matching sequences of words, accounting for output length. Higher scores indicate greater agreement by that measure. A test score summarizes the output on a collection and leaves room for individual translations to behave differently. Because the paper uses the same scoring approach for its baseline and its optimized systems, the reported comparisons can be interpreted as changes under a common metric. The paper cites A Call for Clarity in Reporting BLEU Scores.

What the smallest German-to-English recipe achieves

The first series starts with the choices made for 5k German-to-English training pairs. The authors show scores as they accumulate the successful changes and apply that same sequence to the other training sizes. For this series, the paper presents averages across three runs drawn from three distinct samples. A row in the series describes the recipe up to that point. A row labeled for decoder layer dropout, for example, still includes the earlier changes to width, attention, ordinary dropout, depth, and smoothing.

German-to-English test BLEU on IWSLT14 with 5k training pairs

The cumulative tuning sequence raises test BLEU above both standard Transformer configurations.

German-to-English test BLEU on IWSLT14 with 5k training pairsTransformer-big: 3.3Transformer-big3.3Transformer-base: 8.3Transformer-base8.3Narrower feed-forward layers: 8.8Narrower feed-forward layers8.8Fewer attention heads added: 9.2Fewer attention heads added9.2Higher ordinary dropout added: 10.6Higher ordinary dropout added10.6Shallower stacks added: 10.9Shallower stacks added10.9More label smoothing added: 11.3More label smoothing added11.3Decoder layer dropout added: 12.9Decoder layer dropout added12.9Target word dropout added: 13.7Target word dropout added13.7Activation dropout added (this paper): 14.3Activation dropout added (this paper)14.3
The numbers
System or settingBLEU
Transformer-big3.3
Transformer-base8.3
Narrower feed-forward layers8.8
Fewer attention heads added9.2
Higher ordinary dropout added10.6
Shallower stacks added10.9
More label smoothing added11.3
Decoder layer dropout added12.9
Target word dropout added13.7
Activation dropout added (this paper)14.3

The smallest sample shows why the paper treats the recipe as a combination. The first architectural changes make some progress, followed by larger steps from ordinary dropout and decoder layer dropout. Successive changes reach the final score of 14.3 on the shared German-to-English test set. The authors describe that result as a +6 BLEU improvement over Transformer-base. Transformer-big, by comparison, starts below Transformer-base on this sample and stays below it at every size reported in the series. Even on the full 165k German-to-English condition, Transformer-big scores 5.5 and Transformer-base scores 32.1. That gives a result for the particular default large configuration under these training conditions. The paper’s interpretation is that the much larger parameter count probably calls for substantially more data.

The recipe chosen at 5k can also be evaluated without a new search at each larger size. On the German-to-English test set, it scores 18.3 with 10k training pairs, 23.6 with 20k, and 27.4 with 40k. The corresponding base scores are 11.9, 16.8, and 23.2. At 80k and 165k the transferred recipe scores 30.4 and 32.6, respectively, against base scores of 28.0 and 32.1. In other words, the smallest-sample recipe improves the final score in each size column, while its margins over the base system are much smaller at the upper end of the series. The individual changes do not all remain helpful when moved to those larger samples.

That separation between whole-recipe transfer and individual effects is important. The comparison asks what happens when a practitioner carries over the entire bundle, including decisions that may no longer be preferred. A higher final score still gives evidence that something in the bundle is useful. The intermediate rows give more detail about where the gains can coexist with adverse changes. They also motivate the next comparison, in which the authors let the development data at each size select a different bundle.

For the size-specific German-to-English configurations, the final score is 14.3 on the 5k condition, the size on which the original tuning sequence was based. On the 10k test condition, the corresponding optimized system scores 18.7. The 20k condition reaches 24.1, and the 40k condition reaches 28.6. At 80k and 165k the size-specific scores are 31.9 and 35.2. Compared with the series that reused the 5k settings, the authors report gains as large as 3 BLEU points. The two experiments answer different practical questions. One measures what a reusable low-resource recipe can accomplish across sizes. The other measures what is gained by revisiting the decisions for the amount of data actually available.

German-to-English test BLEU on IWSLT14 with 20k training pairs

Size-specific tuning improves on both the base system and the recipe carried over from the smallest training set.

German-to-English test BLEU on IWSLT14 with 20k training pairsTransformer-big: 4.3Transformer-big4.3Transformer-base: 16.8Transformer-base16.8Recipe selected with 5k pairs: 23.6Recipe selected with 5k pairs23.6Recipe selected with 20k pairs (this paper): 24.1Recipe selected with 20k pairs (thispaper)24.1
The numbers
System or settingBLEU
Transformer-big4.3
Transformer-base16.8
Recipe selected with 5k pairs23.6
Recipe selected with 20k pairs (this paper)24.1

The settings themselves show which parts of the recipe vary. Transformer-base uses a feed-forward width of 2048, 8 attention heads, a dropout rate of 0.1, and 6 layers. The settings chosen at 5k use width 512, 2 heads, dropout of 0.3, and 5 layers. The 10k and 20k configurations select width 1024, and the conditions from 40k onward retain width 2048. The selected number of heads stays at 2 through 80k and rises to 4 for 165k. All the selected configurations use 5 layers and ordinary dropout of 0.3. The width and head choices therefore track corpus size more visibly than the chosen depth and ordinary dropout do in this experiment.

The vocabulary and regularization decisions also change with data. The default uses 37k BPE operations. The selected 5k configuration uses 5k operations, the 10k and 20k configurations use 10k, and the settings at 40k, 80k, and 165k use 12k, 15k, and 20k operations, respectively. The figures for operations count merges, while the figures for training size count pairs of sentences. Their equality in some conditions describes those particular choices. Smoothing goes from 0.6 in the 5k recipe to 0.3 in the 165k recipe. The largest condition also uses a batch-size setting of 12,288, compared with 4096 in the smallest condition. The size-specific search accordingly changes the vocabulary, training behavior, and internal architecture in different ways.

Translation in the reverse direction

For English-to-German, the authors train on the same size conditions and reuse the settings found for the corresponding German-to-English experiments. On the English-to-German test set with 5k training pairs, Transformer-base scores 6.4 and the transferred configuration scores 11.3. With 10k pairs the scores are 9.3 and 15.6, and with 20k they are 13.5 and 20.8. The paper’s headline gain, up to 7.3 BLEU over default settings in the German–English sub-sampling experiments, is reflected in that 20k English-to-German comparison. The reference translations here are German, and the source sentences are English.

At the larger English-to-German sizes, the configuration from German-to-English continues to help. With 40k training pairs it scores 24.5 on the test set against 20.2 for Transformer-base. With 80k, the comparison is 27.2 against 24.2. With 165k, it is 29.8 against 27.4. These scores support transfer across the two directions of the same language pair. A size-specific recipe chosen while translating into English also helps when German is the language the decoder must produce. The test compares each transferred setup with the corresponding English-to-German baseline, where both systems are judged against the same target-language references.

Translation on the other language pairs

For the additional corpora, the authors use the configuration selected for 5k German-to-English pairs on Belarusian, the 10k configuration on Galician and Slovenian, and the 40k configuration on Slovak. The original corpus sizes still determine the training runs. For example, the Belarusian experiment uses its 4.5k available training pairs together with settings borrowed from the smallest German-to-English condition. Slovenian uses its 13k pairs with the settings found at 10k. This is how the comparison puts corpus size to work without choosing a new set of hyper-parameters for each pair.

On the tests into English, Belarusian-to-English goes from 5.0 BLEU for Transformer-base to 8.1 for the transferred settings. For Galician-to-English the scores are 13.1 and 22.3. Slovenian-to-English scores 9.1 and 15.5, and Slovak-to-English scores 24.8 and 29.9. The baseline scores differ considerably between corpora. The relevant comparison in each case is the one made within a test, between systems trained on the same parallel corpus. Each of the transferred configurations improves that comparison.

The tests from English show the same direction of change. English-to-Belarusian scores 3.6 with Transformer-base and 6.6 with the transferred recipe. English-to-Galician scores 10.6 and 18.7. English-to-Slovenian scores 6.8 and 12.2, while English-to-Slovak scores 19.5 and 23.5. The authors frame translation from English into these languages as the more challenging direction. The results establish that the choices found by training German-to-English were useful even when the decoder was trained to produce another low-resource target language. The directions and corpora remain separate tests, with their own reference translations.

How the recurrent comparison changes the conclusion

The recurrent comparison uses systems the authors replicate from Sennrich and Zhang, including the baseline and the version configured for scarce data. With standard settings and very little training data, the Transformer already performs substantially better than the recurrent baseline in the authors’ comparison. Tuning changes the relative standing of the architectures. In the plot of optimized systems, the authors report that Transformer pulls ahead only with more than 20k training examples. They conclude that the optimized recurrent system remains stronger in the most data-scarce part of their experiment.

That result gives meaning to the choice of comparator. Transformer’s gains over Transformer-base hold throughout the sub-sampling experiment. The recurrent comparison asks a different question, because the alternative architecture also receives the benefit of settings chosen for the task. A reader deciding what the results establish about Transformer with little supervision needs both. The tuned architecture can make much better use of the sample than its default suggests, and a different tuned architecture can still give the better score when the sample is extremely small.

What the ablations show

The cumulative search identifies useful changes in context

The paper’s closest counterpart to an ablation is its ordered series of changes to Transformer-base. Each reported row adds a setting to the configuration built in earlier rows. Reading across training sizes shows how the same change behaves with more or fewer examples. Reading down a single column shows how the recipe was assembled for the smallest subset. This supports comparisons between adjoining configurations. A gain in one row is evidence for the change at that point in the sequence, with the earlier choices still active.

At 5k German-to-English training pairs, reducing feed-forward width from 2048 to 512 gives the first favorable change. Using the narrower width at 10k produces a modest favorable result as well, whereas at 20k the corresponding test score is 16.7, slightly below the base system’s 16.8. The authors judge the reduction to 512 effective only on the smallest two subsets in this series. The size-specific configurations sharpen that observation. Their selected width is 512 at 5k, 1024 at 10k and 20k, and 2048 from 40k onward. Capacity in this component has a different apparent value once the training set can supply more examples.

Reducing attention from 8 heads to 2 is the next reported adjustment. With 20k German-to-English training pairs, the cumulative configuration moves from 16.7 to 19.0 test BLEU at this step. The authors report a benefit of +0.5 BLEU from using 2 heads in their discussion of low-resource settings. In the size-specific search, 2 heads is the selected count for all subsets through 80k, and 4 is chosen for 165k. The paper contrasts this pattern with earlier reports that reducing head count hurt translation in high-resource conditions. It also discusses work suggesting that using a single head caused little degradation at a moderate training size. The comparison here shows that the count selected for a small Transformer can be below the standard count even when the feed-forward component retains its usual width.

Reducing depth from 6 layers to 5 is also part of the smallest-sample recipe. The result of that step varies. At 20k the scores before and after the depth change are both 21.9 test BLEU. At 40k the step moves from 26.7 to 26.0. Nonetheless, 5 layers is selected at each size in the development-based search. The two observations concern different comparisons. The cumulative test scores show what happens when the 5k decision is inserted into the recipe built up to that row. The search for each size selects a configuration on development data whose eventual test score also reflects the settings chosen later in the process.

The embedding-width experiment puts a boundary on an interpretation based simply on making Transformer smaller. The authors find reducing embedding dimension ineffective in their search. The beneficial reductions concern particular components, including the number of attention heads and the feed-forward width in some data conditions. The study tests architecture dimensions separately, so it can identify where a narrower choice appeared useful without needing to attribute the entire gain to a reduction in the total parameter count.

The regularization result depends on where it acts

Increasing ordinary dropout from 0.1 to 0.3 is among the biggest improvements in the 5k sequence. The paper reports +1.4 BLEU on that German-to-English test comparison. The increase remains useful when carried across sizes in the cumulative sequence. At 10k, the test score moves from 12.7 to 17.0 at this step. All the size-specific configurations use 0.3. The earlier optimized recurrent study used 0.5, so the paper’s search favors a milder setting for Transformer than the recurrent result might have suggested.

Decoder layer dropout gives the largest increment explicitly singled out for the smallest sample. At 5k, selecting a decoder rate of 0.3 in that cumulative recipe gives +1.6 BLEU. The size-specific search selects lower rates once the corpora get larger. The 10k and 20k configurations use decoder layer dropout of 0.2. The 40k, 80k, and 165k configurations use 0.1. The encoder side remains at zero in the reported selected settings. The experiment gives specific evidence about the location and strength of dropout. In this search, the decoding stack benefits from having layers skipped during training, with the stronger setting favored at the smallest size.

Higher label smoothing likewise appears more useful at the small end of the data range. The selected factor at 5k is 0.6, compared with the default 0.1. The settings for 10k, 20k, and 40k use 0.5, and the larger conditions choose 0.4 at 80k and 0.3 at 165k. The cumulative series illustrates a cost of transferring the smallest-sample setting without revisiting it. With 10k German-to-English pairs, the test score declines from 16.9 to 16.5 when the 5k smoothing factor is added to the recipe at that stage. A higher factor can therefore be broadly useful in the size-specific search while a particular high factor is a poor choice for the state of a transferred recipe.

Target word dropout provides another example of an adjustment that helps in the 5k context. The paper reports a gain of +0.8 BLEU for adding it to that cumulative German-to-English configuration. At the smallest size, the development-selected configuration uses 0.1 on the target side and 0.0 on the source side. The settings for 20k and 40k use 0.1 on both sides. The 80k and 165k configurations use 0.2 for both. The direction of this change across sizes is different from the pattern for label smoothing or decoder layer dropout. It shows why the paper separates forms of regularization by where they act. Stronger regularization of every kind would be a poor description of the selected small-data recipe.

Activation dropout is the last reported addition to the cumulative series. A rate of 0.3 is selected from 5k through 40k. At 80k and 165k the selected rate is 0. Applying the 5k recipe’s final activation adjustment to those larger conditions lowers test BLEU relative to the preceding row. Attention dropout offers a different outcome. The authors report that testing it yielded no improvement in their experiments. The success of ordinary dropout, layer dropout, word dropout, and activation dropout in particular cases therefore gives evidence for particular interventions. It leaves the effect of dropping normalized attention weights as an empirical matter, with an unfavorable result in this search.

Subword and training comparisons qualify the transfer from recurrent systems

The sub-word comparison changes the merge count from 30k to 5k. Earlier recurrent work reported +4.9 BLEU for that change. The authors report +0.6 BLEU for Transformer under the corresponding comparison. The direction favors fewer merges in both reports, but the magnitude gives a different picture of its importance. It helps explain why the paper treats segmentation as part of the search while identifying several architecture and regularization changes as more consequential in the cumulative 5k sequence.

The other segmentation tests help locate what the result depends on. Fitting BPE on the full corpus and fitting it on the subset give no significant differences in the authors’ account. They therefore fit the BPE segmentation on subsets for the optimized runs and use the selected number of merges. Applying the learned segmentation with infrequent sub-word units removed is detrimental in their extremely small data conditions. Fewer merges and frequency filtering consequently deserve separate descriptions. Fewer merges change the repertoire created by training the segmentation. Removing infrequent units changes which pieces are available when that segmentation is applied. The paper finds evidence for reducing the merge count in small conditions while retaining infrequent pieces.

Batch size also distinguishes the Transformer results from the earlier recurrent findings. The previous study found substantial benefits from small batches. Here the authors report that the Transformer favors larger batches even with very little training data. The selected setting is 4096 from 5k through 40k, the same as Transformer-base. It rises to 8192 with 80k examples and to 12,288 with the full 165k condition. A configuration that uses fewer layers or narrower feed-forward processing can thus keep the original batch size. Architecture capacity and batch size govern different parts of the experiment.

The authors also compare the standard Transformer learning-rate schedule with the inverse-square-root variant in Fairseq, trying changes to the learning rate and the warm-up period. Their experiments find no improvement over the standard schedule. This result has a narrower scope than the reported test comparisons between full configurations. It supports retaining the original schedule among the candidates explored. The sizes and regularizers provide evidence of worthwhile changes in the same search, whereas the scheduler variation does not contribute a reported improvement.

Taken together, the controlled steps explain why a recipe chosen for the smallest sample can remain helpful while losing much of its advantage at larger sizes. Some interventions, particularly the increase in ordinary dropout, give broad improvements. Others have a narrower effective range or a preferred value that shifts with the corpus. The evidence is strongest for the performance of the selected recipes and for the change between the adjoining configurations the authors actually tested. A separate removal study starting from the final configuration would address a different question about how much each component contributes once all the other selections are in place.

Limitations

Limits the authors state

The authors explicitly say their search carries no guarantee of a global optimum. Choosing a setting and holding it fixed keeps the work manageable, but it ties each decision to the other settings active at the time. Feed-forward width, for example, is chosen before some of the forms of dropout are tested. A width that scores best early in the sequence may rank differently when those regularizers are present. The paper’s “optimized” configurations should therefore be understood as the ones selected by the stated procedure from the candidates it tried. Their scores establish attainable improvements without establishing a ceiling on translation performance.

The authors also restrict the conclusion about the architecture itself. Default Transformer performance can improve substantially with data-sensitive choices. Against an optimized recurrent system, however, the comparison still favors recurrence in the most data-scarce conditions. In the authors’ German–English replication, Transformer leads after tuning only above 20k training examples. The threshold describes that particular comparison. The corpora, systems, and settings used there define the reach of the result, and the paper uses it to qualify the overall case for Transformer.

The authors distinguish helpful recurrent-system choices from those that carry over poorly. The small gain from changing BPE merges, the preference for larger batches, and the failure of infrequent-unit filtering under extreme scarcity provide separate reasons to tune the Transformer directly. This bounds what the earlier recurrent study can tell a Transformer practitioner. It supplies candidate interventions and a well-tuned architecture for comparison, while the results of those interventions depend on the architecture that receives them.

Limits that follow from the setup

The German–English subsets vary the number of examples within a shared collection. This is a useful control on the study of quantity. It also gives the experiment a specific interpretation of scarcity. A random sample from a larger TED corpus inherits characteristics of that corpus, and different sizes still come from the same language pair and general source of material. Resource scarcity in a distinct pair can come with differences in subject matter, coverage, or which translations are available. The other TED corpora broaden the evidence to additional languages, with the transfer still tested in the domain represented by those collections.

Transfer is tested for recipes chosen by training-set size. That is evidence for a simple decision rule, because it leads to higher scores than Transformer-base across the additional pairs and directions. Its scope is a comparison with that baseline. The reported results leave open where a dedicated search on each pair would settle, whether some pairs would favor settings from another size, and how sensitive the choice is to the language direction. The experiments also use sentence count to match corpora. The English-side word totals reported alongside those counts provide a reminder that equal numbers of sentences need not offer equal amounts of text. Similar sentence counts can still entail different distributions of rare words and sequences.

The cumulative results show what particular interventions do when added after the preceding selections. They leave the effect of untested combinations open. If two choices help together, their separate benefits could look different in another order or in a final system with one component removed. The paper offers a practical recipe and comparisons that trace its construction. Evidence about interactions is limited to the configurations it evaluates, including differences between reusing the smallest recipe and selecting a new one for each size.

Each value in the cumulative series is an average of three runs, one from each of three distinct samples. Averaging helps represent more than one draw from the training corpus. The reported means still give limited information about variation across draws or training runs, which matters most when adjoining scores are close. The evidence for the complete recipe comes from gains across several settings and directions. The evidence for a small change at a single stage should be interpreted at the granularity of the reported comparison.

Finally, the outcome measure is corpus-level test BLEU. That supports comparisons of aggregate agreement with reference translations. It leaves questions about meaning preservation, the behavior of rare words, and the kinds of translation errors changed by a particular setting open. For instance, the authors motivate sub-word segmentation in part through rare words, but the headline gain combines changes to the vocabulary, architecture, and training regime and is expressed as overall BLEU. It is evidence for improved aggregate translation scores under that measurement, with the distribution of those gains across word types and error categories left unresolved.

What came after

How Effective is Byte Pair Encoding for Out-Of-Vocabulary Words in Neural Machine Translation? (2022) takes up the question of how BPE serves words outside the vocabulary. That is a more targeted question than the segmentation comparison in the earlier paper. Here, the choice of merge count is evaluated chiefly through its contribution to overall test BLEU. A vocabulary-focused question concerns the cases that motivate the segmentation in the first place. A system can represent a rare or unfamiliar word through smaller pieces, and the quality of its translation of that word is a separate matter from its score over a whole test corpus. The later study’s stated topic connects directly to that distinction.

Efficient Architectures For Low-Resource Machine Translation (2025) places architecture efficiency at the center of the low-resource problem. The connection is to the earlier paper’s comparison of feed-forward widths, attention head counts, and depths as the number of sentence pairs changes. That comparison shows how judgements about architecture can change once each configuration is tuned for its training conditions. The later title frames the design of efficient architectures as its own subject. The connection is clearest at the level of the research question. The earlier experiments quantify test translation quality for particular settings, and the later work identifies efficiency as part of what architecture research for scarce data should examine.

Cite

Cite as Ali Araabi and Christof Monz. 2020. Optimizing Transformer for Low-Resource Neural Machine Translation. Proceedings of the 28th International Conference on Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.coling-main.304

@inproceedings{araabi2020optimizing,
  title = {{Optimizing Transformer for Low-Resource Neural Machine Translation}},
  author = {Ali Araabi and Christof Monz},
  booktitle = {Proceedings of the 28th International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.304},
  url = {https://doi.org/10.18653/v1/2020.coling-main.304}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/araabi-2020-optimizing-transformer-low-resource-neural/