Elamur Research

Cross-lingual Visual Pre-training for Multimodal Machine Translation

Paper · 2021 · Ozan Caglayan, Menekse Kuyu, Mustafa Sercan Amac et al.

Summary

An image can tell a translator something that a caption leaves unclear. But a translation system trained on image descriptions can frequently produce a plausible sentence from the words alone. The authors ask whether an earlier stage of training can make visual information more useful. Their method, visual translation language modelling (VTLM), learns from images paired with captions in English and German. The resulting representations are then adapted to English-to-German machine translation.

The authors start from translation language modelling, which hides tokens in parallel sentences and trains a shared encoder to recover them. VTLM adds an image to each sentence pair and gives the encoder a second job. Alongside recovering words, it predicts object labels for selected image regions. To assemble enough examples for this stage, the authors automatically translate the English captions in Conceptual Captions into German. After pretraining, the translation system receives only the English source caption and, in the multimodal setting, the image. It learns to generate the German caption through fine-tuning.

On Multi30k, the multimodal baseline trained from scratch reaches 35.2 BLEU on the 2016 test set. The strongest VTLM variant on that split reaches 44.0 BLEU and 61.3 METEOR, its best scores across runs on that split. The corresponding text-only system with bilingual pretraining already reaches 43.1 BLEU, so the overall improvement over training from scratch includes a substantial benefit from bilingual pretraining. The best variant on the 2016 and COCO test sets retains the object-label prediction task while leaving image-region features visible during pretraining. The variant that masks image features gives the highest multimodal BLEU on the 2017 test set. BLEU score

The authors also test what happens when they take information away. Images make a larger difference to word recovery when the final tokens of both captions are hidden. Shuffling images across caption pairs harms recovery most under that same condition. In translation, when head nouns are masked in the English caption, the system with visual pretraining makes better use of the image than the one whose pretraining used text alone. These tests narrow down what the score gains can establish. They show that the system can draw on matching images when the text is deliberately made less informative, while leaving open how frequently it needs them to translate intact captions.

Deep dive: Cross-lingual Visual Pre-training for Multimodal Machine Translation

Cross-lingual visual pre-training teaches a caption translator to use images, with the clearest evidence when words are missing. · about 32 minutes to read

The problem and its context

Giving the image a role in translation

The input to multimodal machine translation includes a source sentence and an accompanying image. The output is a sentence in the target language. The English and German captions in the authors’ study concern the same scene, so the task offers a way to learn associations between visual details and the phrases used to describe them in different languages. A useful image representation should make those details accessible to a system that has to produce a translation from the source caption. This is the translation problem the paper takes up at the intersection of vision and language.

Providing an image and learning to use it are separate matters. The source sentence already gives the translator the words, their order, and much of their context. A system can learn that these cues suffice for many training examples. An image, on the other hand, arrives as a collection of features whose connection to the words has to be learned. Each region can carry several properties, and some highly visible objects may be irrelevant to the caption. The training task has to give the translator enough reason to connect particular visual evidence to a choice of words.

The paper approaches this as a problem of preparation. A translator trained from scratch has to learn how to read the source, how to generate the target, and how to use the image on the same set of translation examples. A system with prior experience of images and parallel captions starts its translation training with representations already shaped by associations among all three. This is the paper’s motivation for putting visual and bilingual information together during pretraining, before asking the system to generate a complete caption in German.

The question is also about what the evaluation should reveal. A translation score over intact captions measures the quality of the output as a whole. It can rise because the system has become better at interpreting English, generating German, using images, or some combination of these. The authors therefore treat translation quality and sensitivity to visual evidence as questions that need different comparisons. Entire captions provide the practical test of output quality. Deliberately weakened caption inputs give the image a more clearly identifiable job.

What earlier pre-training offered

The authors situate their work in a line of research on contextual representations. A contextual representation gives a token a numerical description that depends on the other tokens around it. Earlier work had shown that such representations were useful across language tasks and could encode linguistic structure. The paper points to work on parsing, commonsense questions, and factual knowledge as examples of the wider interest in what these representations learn. The starting point is that a pretraining task can produce features that remain useful when the eventual application asks for a different output. Deep Contextualized Word Representations · BERT Rediscovers the Classical NLP Pipeline

Masked language modelling gives this approach a simple training signal. Some tokens in a sentence are hidden or changed. The system learns to reproduce their original identities using the rest of the input. The targets come from the sentence itself, so examples can be prepared without asking an annotator to supply an answer for every gap. The authors use the masking convention associated with BERT, including keeping some selected tokens visible. That convention shapes both the bilingual starting point and its visual extension. BERT

One direction in earlier work brought multiple languages into pretraining. As the paper describes it, that research used monolingual resources and parallel resources, with parallel sentences providing a direct connection between languages. Translation language modelling places both sides of a translation in the encoder’s input. A token missing from one side can be inferred from words in the same sentence and from evidence in the other language. The task therefore gives an encoder a reason to connect parts of two sentences that convey compatible information. Broader work on multilingual pretraining forms the context for this specific choice. Unsupervised Cross-lingual Representation Learning at Scale

The other direction linked text with images. The authors describe visual pretraining as learning from large collections of captioned images and adding tasks that require predictions about the visual input or its relationship to a sentence. Masked region classification supplies a target for locations associated with part of an image. Image–sentence matching supplies a target for the pair as a whole by asking whether the caption and the image belong together. These are distinct ways to provide cross-modal supervision. The present paper adopts region classification to put a task at visual positions in the same training examples that contain the paired captions. ViLBERT

The earlier visual literature cited by the authors includes work that extends masked prediction to image regions and work on architectures for joint visual and textual representation. The paper also notes that classification and retrieval were common downstream evaluations in this area. In classification, the system selects a label. In retrieval, it ranks possible matches. Caption translation requires the system to produce a sequence of target words, so success has to survive the transfer from predicting selected pieces of an input to generating an entire output. LXMERT · UNITER · VL-BERT

The change in the training sequence

The earlier multimodal translation work discussed by the authors mostly trained sequence-to-sequence systems directly on the translation task. Those systems learn to turn a source sequence, with whatever visual features their architecture supplies, into a target sequence. The intervention in this paper is to begin that task with weights acquired from predicting text and object labels within aligned image–caption examples. The architectural choice is deliberately close to the authors’ text-only alternative, so the experiments can vary the information present at each stage.

This introduces a useful distinction between two senses in which an image can be part of a translator’s experience. Images can shape the weights before the translator is trained to generate outputs. They can also provide evidence about an individual caption while translation is happening. A system can have either experience without the other. A visually pretrained encoder can be adapted to accept source text alone, and a bilingual text-pre-trained encoder can be adapted to process image regions for the first time during translation training. The paper’s comparisons make use of both possibilities.

The authors present VTLM as an attempt to combine the bilingual and visual pretraining lines and carry their benefits into caption generation. Their proposal depends on keeping the image associated with both captions through the preparation stage, and on representing its regions in a form that can sit alongside text in the encoder. These choices determine what the training objectives can teach and what the downstream comparisons can test.

The method, step by step

Assemble a caption pair around each image

The method needs training examples in which an image has an English description and a corresponding German description. The authors start from Conceptual Captions, a collection of ∼3.3M internet images with English alternative text. Alternative text accompanies an image on a website and can act as a description, although the captions in this collection are noisy. The original caption provides the source sentence, and an existing neural translation system produces the German sentence. The image remains paired with both.

For this preparation step, the authors use the English-to-German WMT19 translation system distributed in fairseq. That system’s job is to supply German captions for the corpus. The trainable encoder in VTLM starts with randomly initialized weights. These two roles matter because the German text carries the decisions of an existing translator, while VTLM learns its own parameters from the resulting examples. Some images are no longer accessible, so the assembled corpus contains ∼3.1M triplets. The paper also names a project release for the extended Conceptual Captions data. Facebook FAIR’s WMT19 News Translation Task Submission · fairseq

The authors learn a shared 50k vocabulary on Conceptual Captions using byte pair encoding, or BPE. This procedure segments text into units that can represent either a whole word or a recurring part of one. English and German use the same learned vocabulary. A token is one position in this segmented representation, and masking operates on those positions. The distinction matters when interpreting the later word-recovery experiment. Its target is the final token of a caption, which can be a piece of its final word. Subword tokenization · Neural Machine Translation of Rare Words with Subword Units

Begin with bilingual masked prediction

Translation language modelling, or TLM, takes the English and German token sequences and puts them into one input. In the paper’s notation, the two sequences can have different lengths. The encoder can attend across the resulting sequence, giving it access to the other language when a selected token is hidden.

x = [s₁⁽¹⁾, …, sₘ⁽¹⁾, s₁⁽²⁾, …, sₙ⁽²⁾]

Here x is the complete input. The symbols s with superscript ⁽¹⁾ refer to source tokens, and those with ⁽²⁾ refer to target tokens. The subscripts are positions within each sentence. The source length is m and the target length is n. The brackets enclose an ordered sequence, the commas separate entries, and the ellipses stand for the intervening tokens. The equality defines the input as the two sentences placed together.

The authors describe drawing a random set of tokens to use as prediction targets. In a single caption pair, eligible positions can come from either language. In the notation below, the language marker identifies the sentence to which a token belongs.

y = {s₁⁽ˡ⁾, …, sₖ⁽ˡ⁾}

Here y is the set selected for masking, braces enclose its members, and s denotes a selected token. The superscript ⁽ˡ⁾ marks its language. The subscripts enumerate the selected entries in the set, whose size is k, and the ellipsis represents the remaining entries. The equality defines y from the random draw. Each selected position supplies its original token as a target, whether the token was hidden, replaced, or retained.

The masking policy selects 15% of the input tokens. Of the selected tokens, 80% are replaced by the special symbol [MASK], 10% are replaced by a random vocabulary item, and 10% stay as they were. The encoder thus encounters some explicitly marked gaps, some misleading input tokens, and some targets that remain visible. The objective always rewards recovering what occupied the original position. The full input after these changes is the context for each prediction.

L = (1 / |X|) ∑ₓ∈ₓ log Pr(ŷ | x̃; θ)

In this expression the sum is over each input x in the training collection X. The outer vertical bars in |X| give the size of that collection, and dividing by that size gives an average over inputs. The quantity L is the objective that training maximizes. The logarithm applies to the probability Pr of the correct masked-token targets ŷ. The inner vertical bar means that the probability is conditioned on x̃, the input after masking, and θ denotes the trainable parameters used to assign that probability. The accent over y marks the ground-truth labels, and the tilde over x marks the altered sequence.

With both languages in the input, a prediction can draw on multiple sources of evidence. A partly masked English caption retains an English sentence context. Its German counterpart offers another description of the same content. Alignment is implicit in this arrangement. The training example establishes that the sentences correspond, and the encoder can use attention to pick out the positions that help it solve the task. It receives supervision for the identity of the hidden token.

Represent the image as a sequence of regions

VTLM extends this input with image regions. The authors use Faster R-CNN, an object detector pretrained on Open Images. For each image they keep the 36 regions with the highest detection confidence. A region is a bounded part of the image proposed by the detector. The detector produces a feature map for that region, which the authors average across its spatial locations to get a feature vector of dimension 1536. It also supplies an object label for the region. Faster R-CNN

The feature vector and the label play different roles. The vector describes the visual content numerically and can enter the encoder. The label gives the encoder a discrete target when the region is selected for classification. The region also has bounding-box coordinates that say where it lies in the image. Before the encoder processes the example, the visual features and the coordinates are projected into the same embedding space used for the text. This projection lets a region occupy a position in the joint input alongside token positions.

x = [s₁⁽¹⁾, …, sₘ⁽¹⁾, s₁⁽²⁾, …, sₙ⁽²⁾, v₁, …, vₒ]

Here x is the augmented input. The two groups of s entries are the source and target tokens defined above, with lengths m and n. The v entries are visual features, with their subscripts indexing regions. The number of regions is o, which the authors set to 36. The brackets list the three groups together, and each ellipsis covers intervening entries in its group. The notation specifies the contents of the input. Once the visual entries have been projected, attention layers can process all of these positions in a single stream.

A single stream means that the same encoder handles both the text positions and the visual positions. In self-attention, a representation at one position can be updated using information from other positions in the input. A caption token can therefore receive information from another caption token or a region, and a region can receive information from the captions as well as from other regions. The architecture gives the encoder a route for those interactions. The prediction tasks supply a reason to learn which interactions are useful. Transformer and attention

This use of regions is also a choice about what visual material enters training. A region is already the output of a detector trained to recognize objects. Its vector captures what that detector represents, and its label reflects what the detector predicts. VTLM learns from those representations and labels together with the captions. It is adapting an existing object-oriented view of the image to the bilingual task.

Learn to recover words and classify regions

The authors apply a 15% selection rate separately to language tokens and visual regions. The independent selection gives the encoder text targets and region targets. In the standard VTLM setting, the main replacement for a selected region is the embedding of [MASK], the same special signal used at masked text positions. For 10% of the selected regions, the replacement is a region feature randomly drawn from images in the training batch. For the remaining 10%, the region feature stays in place. This matches the broad pattern of the text procedure, with region features taking the place of vocabulary items for the random replacement.

The rule for visual replacement is a choice the authors distinguish from earlier approaches that zeroed out masked region features. Reusing the text mask gives the two modalities the same marker for a missing input. The authors describe this as a practical choice and hypothesize that a shared marker could help grounding. In their setting, grounding means giving the representations a way to relate words to visual content. Its practical test comes later, when the system has a reason to consult an image to make up for missing text.

L = (1 / |X|) ∑ₓ∈ₓ log Pr({ŷ, v̂} | x̃; θ)

As before, L is the average log-probability objective, X is the training collection, and the sum runs over its examples x. The expression |X| is the number of examples. The function log takes the logarithm of the probability Pr assigned by the system with parameters θ. The braces group the targets. The symbol ŷ denotes the original tokens at the selected linguistic positions, and v̂ denotes the detector labels at the selected visual positions. The conditioning input x̃ contains both modalities after the masking procedure. The vertical bar inside Pr separates the targets from the input on which the prediction depends.

The word and region targets put complementary demands on the encoder. A word can be predicted from surrounding words, the other caption, and possibly image features. A region label can draw on the visible regions and the words in either language. In the standard visual masking condition, the feature at the selected location is commonly hidden. This creates a reason to use context. In the alternative condition, the encoder still predicts object labels at selected positions, while the region features themselves stay visible. Both conditions give supervision at visual positions, and the alternative lets the encoder use the relevant detector feature directly.

That distinction separates the existence of a classification objective from the corruption of its input. Calling the alternative a system with visual features alone would omit the object-label targets it continues to receive. Calling it the same task as masked-region recovery would omit the change in available information. The experiment later compares the downstream consequences of those two ways of supplying the region-classification signal.

From paired captions and images to caption translation

The steps in order.

From paired captions and images to caption translationStep 1: Translate English captions into German1. Translate English captions into GermanStep 2: Extract region features and detector labels2. Extract region features and detector labelsStep 3: Combine both token sequences with visual regions3. Combine both token sequences with visual regionsStep 4: Select text and region prediction targets4. Select text and region prediction targetsStep 5: Recover tokens and classify selected regions5. Recover tokens and classify selected regionsStep 6: Transfer pre-trained weights into the translator6. Transfer pre-trained weights into the translatorStep 7: Fine-tune on human-translated captions7. Fine-tune on human-translated captionsStep 8: Generate German from English and the image8. Generate German from English and the image

Train the shared encoder

The encoder is a small version of the design used for TLM. Its representation dimension is 512, and the intermediate dimension of its feed-forward layers is 2048. The feed-forward part of a layer transforms the representation at each position after information has been combined across positions. The encoder has 6 layers and 8 attention heads. The heads allow attention to combine input information through several learned projections within a layer.

Pretraining starts from random parameters for the encoder. The image detector and the system used to translate the English captions have their own earlier training. The authors optimize the encoder with Adam, using mini-batches of size 64 and a learning rate of 0.0001. A mini-batch is the set of examples used to estimate an update. The learning rate controls the scale of parameter changes. Dropout, which randomly suppresses parts of the computation during training as a form of regularization, is set to 0.1 across the layers. Adam · Dropout

The pretraining run lasts 1.5M steps on a single RTX2080-Ti GPU. The authors choose checkpoints by accuracy on the validation set. A checkpoint records the weights at a point in training, and the validation set gives a basis for selecting among such snapshots. At this stage the relevant job is predicting the selected targets. The subsequent stage will choose checkpoints according to a criterion suited to translation.

Adapt the encoder and decoder to translation

A translator built as an encoder–decoder system has two main parts. The encoder turns the source input into contextual representations. The decoder produces the German caption, consulting the encoder states through cross-attention. Cross-attention connects an output position to the encoded input. It gives the decoder a way to use a source word or region while deciding what to produce next.

The authors use TLM or VTLM weights to initialize the encoder and decoder of their translation systems. This transfer changes the task as well as the way the languages are supplied. During pretraining, English and German captions are both inputs to masked prediction. During fine-tuning, the English caption goes to the encoder, and the German caption serves as the output to learn. The text-only version encodes the source tokens. The multimodal version includes 36 visual regions in the source sequence. When evaluating the translator, the authors compare the generated German against reference translations.

The transfer also creates an initialization decision for decoder cross-attention. The pretraining encoder has self-attention weights, and the translation decoder has parameters specifically for attending to the encoder. Under the default XLM procedure described by the paper, the extra parameters start randomly. The authors try copying corresponding parameters from the TLM self-attention layers. This is a distinct change from supplying images. Its reported effect concerns how much of the attention computation can begin with learned weights.

For fine-tuning, the authors retain the pretraining hyper-parameters apart from reducing the learning rate to 1e−5. Their from-scratch translation systems use dropout of 0.4 and a learning rate that rises from 1e−7 to 1e−4 over the first 4,000 iterations. After 4,000 iterations, it decreases according to an inverse square-root schedule. The authors run fine-tuning with different random seeds, choose checkpoints by the lowest validation perplexity, and decode with beam size 8. Perplexity measures how much probability the system gives the reference text, with lower values preferred for selection. Beam search keeps several candidate continuations available while constructing the output.

Experiments and results

The translation benchmark and comparisons

The translation experiments use the English-to-German direction of Multi30k. The training resource contains 30k image descriptions from Flickr30k with human German translations. The paper reports three test sets of 1K examples each. The 2016 set is the closest to the training domain. The 2017 and COCO sets draw on other sources of images and descriptions. The test sets therefore allow the authors to compare systems in the original setting and in settings where the inputs are further from the training collection.

All translation rows report BLEU and METEOR for the generated German captions. BLEU measures overlap between sequences of words in the generated and reference translations. METEOR also measures reference agreement and uses an alignment of words in the output and reference. Both scores are higher when the generated captions agree more closely with the references according to the metric. Neither score tells the reader which part of an input caused a translation to improve. The tests with masked words and mismatched images address that issue separately.

The main table crosses the type of pretraining with the type of input at translation time. The neural machine translation setting, abbreviated NMT in the paper, takes only text. The multimodal machine translation setting, abbreviated MMT, also receives image regions. Both appear in the from-scratch comparison and after pretraining on Conceptual Captions. The TLM rows test bilingual pretraining, and the VTLM rows add image regions and the region-label objective to that stage. The authors also report variants that change how the extra data are used or whether regions are hidden.

The paper distinguishes the best result reached across fine-tuning runs from the mean and standard deviation over those runs. A maximum describes the strongest run for a particular split and metric. An average describes the set of runs, while the standard deviation records how much the runs vary. The charts below use the maxima where the paper gives both kinds of statistic. As a result, a chart compares the highest reported results under each setting and makes no assumption that the same run produced all the maxima for every metric.

Where pre-training makes the largest difference

Without pretraining, supplying image features makes the authors’ single-stream translator worse on all the test sets. On the 2016 set, the text-only baseline scores 37.6 BLEU and 56.4 METEOR, and the multimodal baseline scores 35.2 BLEU and 55.4 METEOR. On the 2017 set, the corresponding BLEU scores are 30.9 and 27.7. On COCO they are 27.5 and 25.4. The paper notes that each example includes 36 regions, while a Multi30k source sentence averages 13 tokens. The authors suggest that pretraining may help a single-stream encoder learn how to handle a source in which visual positions are so numerous relative to text positions.

Bilingual pretraining alone improves translation markedly. On the 2016 set, the TLM-initialized text-only system reaches 43.1 BLEU and 60.7 METEOR, and the TLM-initialized multimodal system reaches 41.9 BLEU and 60.3 METEOR. The multimodal system has seen no image regions during TLM pretraining. Its improvement over the from-scratch multimodal baseline therefore shows that transferring what was learned from parallel captions can help even when the architecture accepts additional inputs during fine-tuning.

VTLM changes the comparison among systems adapted from a pretrained encoder. For the standard visual-masking setting, the text-only translator reaches 43.3 BLEU and 61.2 METEOR on the 2016 set, and the multimodal translator reaches 42.7 BLEU and 60.8 METEOR. On that set the best result comes from the alternative multimodal variant, whose regions remain visible during pretraining. Its scores are 44.0 BLEU and 61.3 METEOR. The BLEU result makes clear how much of the preceding improvement is already available after pretraining on the two caption languages. It also shows that the highest score in this experiment comes when visual experience is carried through both stages.

English-to-German translation on Multi30k 2016 by BLEU

Visible-region visual pre-training leads a comparison in which bilingual pre-training also improves both input settings.

English-to-German translation on Multi30k 2016 by BLEUFrom-scratch text-only translator: 37.6From-scratch text-only translator37.6From-scratch multimodal translator: 35.2From-scratch multimodal translator35.2TLM text-only translator: 43.1TLM text-only translator43.1TLM multimodal translator: 41.9TLM multimodal translator41.9VTLM text-only translator: 43.3VTLM text-only translator43.3VTLM multimodal translator with region masking: 42.7VTLM multimodal translator with regionmasking42.7VTLM multimodal translator with visible regions (this paper): 44.0VTLM multimodal translator with visibleregions (this paper)44.0
The numbers
System or settingBLEU
From-scratch text-only translator37.6
From-scratch multimodal translator35.2
TLM text-only translator43.1
TLM multimodal translator41.9
VTLM text-only translator43.3
VTLM multimodal translator with region masking42.7
VTLM multimodal translator with visible regions (this paper)44.0

The run averages add context to the peak figures. For the 2016 test set, the visible-region VTLM translator has mean BLEU of 43.3 ± 0.59, compared with 42.6 ± 0.14 for the multimodal variant with visual masking. Mean METEOR is 60.9 ± 0.30 and 60.6 ± 0.15, respectively. The peak difference on this split therefore accompanies a higher reported mean for the visible-region variant, with more variation across runs in its BLEU scores.

The other splits and the published comparisons

The 2017 test set gives the best single-run BLEU to the multimodal VTLM variant that masks visual regions. It reaches 38.1 BLEU. The visible-region variant follows at 38.0 BLEU and reports the higher METEOR, 57.2 compared with 57.1. For BLEU across runs, the visual-masking system reports 37.7 ± 0.43 and the visible-region system reports 37.6 ± 0.31. On this split, bilingual pretraining gives 37.6 BLEU as the highest reported value for each of the TLM translation input settings. The from-scratch system trained with extra captions reaches 36.2 BLEU.

English-to-German translation on Multi30k 2017 by BLEU

The visual-masking variant has the highest peak BLEU, closely followed by the variant with visible regions.

English-to-German translation on Multi30k 2017 by BLEUFrom-scratch multimodal translator: 27.7From-scratch multimodal translator27.7Text-only translator trained on Multi30k and Conceptual Captions: 36.2Text-only translator trained on Multi30kand Conceptual Captions36.2TLM text-only translator: 37.6TLM text-only translator37.6TLM multimodal translator: 37.6TLM multimodal translator37.6VTLM multimodal translator with region masking (this paper): 38.1VTLM multimodal translator with regionmasking (this paper)38.1VTLM multimodal translator with visible regions: 38.0VTLM multimodal translator with visibleregions38.0
The numbers
System or settingBLEU
From-scratch multimodal translator27.7
Text-only translator trained on Multi30k and Conceptual Captions36.2
TLM text-only translator37.6
TLM multimodal translator37.6
VTLM multimodal translator with region masking (this paper)38.1
VTLM multimodal translator with visible regions38.0

On COCO, the highest reported scores are 35.2 BLEU and 53.8 METEOR, both from the visible-region variant. Its BLEU mean is 35.1 ± 0.09. The standard multimodal VTLM variant scores 34.2 BLEU, while its text-only counterpart reaches 35.1. The bilingual TLM systems reach 34.8 BLEU with text input and 34.3 with multimodal input. The COCO comparison thus includes a visually pretrained text-only translator whose best BLEU is close to the leading multimodal score. The ranking depends on both the preparation and the information the translator receives.

English-to-German translation on Multi30k COCO by BLEU

The visible-region multimodal variant leads, with the visually pre-trained text-only translator close behind.

English-to-German translation on Multi30k COCO by BLEUFrom-scratch text-only translator: 27.5From-scratch text-only translator27.5From-scratch multimodal translator: 25.4From-scratch multimodal translator25.4Text-only translator trained on Multi30k and Conceptual Captions: 33.0Text-only translator trained on Multi30kand Conceptual Captions33.0TLM text-only translator: 34.8TLM text-only translator34.8VTLM text-only translator: 35.1VTLM text-only translator35.1VTLM multimodal translator with region masking: 34.2VTLM multimodal translator with regionmasking34.2VTLM multimodal translator with visible regions (this paper): 35.2VTLM multimodal translator with visibleregions (this paper)35.2
The numbers
System or settingBLEU
From-scratch text-only translator27.5
From-scratch multimodal translator25.4
Text-only translator trained on Multi30k and Conceptual Captions33.0
TLM text-only translator34.8
VTLM text-only translator35.1
VTLM multimodal translator with region masking34.2
VTLM multimodal translator with visible regions (this paper)35.2

The paper places these results alongside earlier recurrent, ensemble, and Transformer-based multimodal systems. On the 2016 split, it lists 39.4 BLEU for the best recurrent system in one comparison, 39.8 for a graph-based Transformer, 40.3 for a recurrent ensemble, and 42.7 for an earlier unconstrained Transformer. On the 2017 split, the listed recurrent and graph-based systems obtain 32.6 and 32.2 BLEU, respectively. The ensemble row lists 28.7 BLEU on COCO. Several historical rows have missing scores, so earlier systems can be compared only where the same metric and split are reported.

The authors describe the strongest VTLM results as a new state of the art across the Multi30k test sets under their comparison. They explicitly set aside a prior result of 45.5 BLEU. They attribute that system’s improvement to other interventions, including heavy augmentation with parallel text, domain fine-tuning, and ensembling. The comparison therefore makes a claim about the class of multimodal systems the authors chose to evaluate against. The closest internal baselines are especially informative because they share the authors’ translation setup and vary the preparation or the input.

What the ablations show

Extra captions help, and the training procedure matters

VTLM has access to a much larger corpus before seeing Multi30k. One plausible explanation for its performance is that the system benefits from more English–German text, regardless of how it is used. The authors test part of that explanation with a text-only translator trained directly on the combination of Multi30k and Conceptual Captions. It sees the extra bilingual captions in translation training. On the 2016 set it reaches 39.5 BLEU, compared with 37.6 for the text-only system trained only on Multi30k. On the 2017 and COCO sets it reaches 36.2 and 33.0 BLEU. The additional corpus is therefore useful even when used for direct translation training.

The TLM text-only results are stronger on all the corresponding splits. The comparison supports the authors’ choice to use the additional corpus for masked bilingual prediction before training on Multi30k. Its scope is the two schedules they tried. Direct training on the combined datasets and pretraining followed by adaptation differ in the objective applied to the extra examples and in when the system concentrates on the benchmark domain. The comparison measures the result of that package of choices.

A second comparison keeps the visual pretraining procedure and restricts pretraining and fine-tuning to Multi30k. This version obtains 40.2 BLEU on the 2016 set, 32.7 on the 2017 set, and 28.9 on COCO. It improves on the from-scratch multimodal baseline in each case, while the Conceptual Captions pretraining runs reach higher results. Learning masked predictions from the smaller benchmark has a visible benefit under these settings. The larger, externally assembled corpus offers stronger preparation in the authors’ experiments. Corpus scale, caption origin, and the provenance of the German captions all change between these two pretraining settings.

The text-only and multimodal transfer settings help interpret the result in another way. Weights learned with visual inputs can still help when the downstream system sees only text. For example, on the 2016 set, the text-only system initialized from VTLM reaches 43.3 BLEU, and the one initialized from TLM reaches 43.1. That comparison concerns what survives in the weights after pretraining. To ask whether a particular image is used at evaluation time, the paper also changes the image or the information the source sentence supplies.

Region labels still help when regions stay visible

The visual-masking experiment changes the input at the positions used for object classification. The alternative still selects those positions and predicts their detector labels. Its 0% visual masking condition leaves the corresponding features available, while the bilingual caption input continues to be masked. In the standard setting, a region selected for classification is subject to the replacement policy described earlier. The comparison thus tests whether forcing the system to reconstruct object labels from a partly corrupted visual sequence helps the later translation task.

The visible-region variant gives the strongest overall results reported by the authors, with the standard visual-masking variant holding the highest peak BLEU on the 2017 set. Visible detector features can also provide a simpler path to their labels, so the result has a specific interpretation. The classification task can contribute to a successful translator without requiring selected features to be hidden. Direct supervision of intact features may be enough to organize useful representations in this setting. The experiment leaves open how much the region labels contribute apart from the presence of the features, since both alternatives retain the label-prediction task.

The choice of initialization for the decoder’s encoder-attention parameters also matters. The authors report a gain of up to 2.2 BLEU after copying parameters from TLM self-attention instead of using the default random initialization. They give this as an upper observed improvement and do not attach it to a particular test split in the discussion. The comparison shows that the details of transfer can affect the translation result even when the pretraining inputs stay the same.

An image helps most when both captions have gaps

The first explicit masking experiment examines the pretrained systems directly. The authors remove sentence-final punctuation before evaluation, since recovering a punctuation token would make the task easier without requiring much evidence about the scene. They then mask the final token of the English caption, the German caption, or both. The evaluation metric is prediction accuracy at the chosen positions. This measures recovery within the bilingual encoder and leaves full-caption generation to a separate experiment.

On the validation split, TLM’s accuracy is 89.0 when the English final token is masked and 87.3 when the German final token is masked. It is 55.2 when both are masked. On the test split, the corresponding TLM values are 88.5, 86.3, and 53.6. In these comparisons, the other caption offers a substantial amount of usable context when it is intact. Masking a position in both languages removes some of that support and makes the prediction task harder.

The paper reports VTLM’s changes relative to TLM. On the validation split, it gives gains of 0.9 for masking English, 1.4 for masking German, and 5.0 for masking both. On the test split, the gains are 1.1, 2.2, and 5.8 in the same order. The larger gains when both sides have a missing final token fit the idea that images are most useful when text across the two languages provides less evidence. The surviving text still contributes to the prediction, and the visual input has more room to change the result.

The authors directly test the importance of matching the image to the caption pair by shuffling the image features. The images remain present as inputs, but a set of features can now describe a different scene. Relative to VTLM with matching images, shuffling on the test split produces drops of 1.3 for English-only masking, 0.3 for German-only masking, and 7.4 for masking both. On validation the corresponding drops are 1.0, 0.2, and 7.7. These drops are relative to VTLM, whereas the gains in the preceding paragraph are relative to TLM.

This intervention makes the result more informative than a comparison of TLM and VTLM alone. The VTLM encoder still has its learned weights and still receives region features. What changes is whether those features belong with the captions. A drop after shuffling shows sensitivity to that relationship under the diagnostic. The larger drop with both final tokens masked also helps explain the difference between supplying visual features and supplying relevant visual features. A mismatched image may provide actively misleading evidence in an example where the words leave room for several plausible completions.

Source nouns give the translator a harder test

The second masking experiment uses the fine-tuned translation systems. It targets head nouns in the English source captions from the 2016 Multi30k test set. A head noun is the main noun in the expression referring to an entity. The authors identify these nouns with Flickr30k Entities, which supplies associations between image regions and phrases. This procedure directs the test toward information that the image might plausibly help recover.

The paper applies two corruptions. In the mask condition, the head noun is replaced with [MASK], leaving a position in the sentence that signals missing information. In the removal condition, the head noun disappears entirely. The difference affects what text is available and whether the remaining source explicitly marks the gap. Under both conditions, the measured output is the entire German translation, scored with BLEU.

For TLM pretraining, the text-only translator averages 31.44 BLEU with source nouns masked and 27.38 with them removed. The paper reports that the corresponding multimodal translator drops by 0.43 and 0.26, respectively. For VTLM pretraining, the text-only translator averages 31.27 BLEU with masking and 27.63 with removal. The multimodal version improves over it by 1.65 and 0.65, respectively. These are averages over the fine-tuned runs, and the reported changes compare multimodal with text-only translation within the same pretraining condition.

The contrast supplies the paper’s clearest translation-side evidence for the combination of visual pretraining and visual fine-tuning. Giving the translator images during fine-tuning provides little help with these missing nouns when its preparation is bilingual and text-only. The translator that has learned from images in both stages gains under both forms of corruption. The larger reported gain with the explicit mask is consistent with the authors’ suggestion that leaving a source position gives the translator a useful cue about where evidence is missing.

These are sentence-level BLEU results. They show that visual input helps the visually pretrained system produce reference-like translations in the perturbed setting. The experiment provides a targeted reason to think the missing scene entities are involved, because the removed text is chosen for its association with the image. The score can also reflect how the rest of a translation changes in response. Identifying exactly which target noun or phrase was recovered would call for a more localized output measure.

Decoder attention shifts toward visual positions

The authors also examine where the decoder directs cross-attention. For each decoder cross-attention layer, they measure the share of attention weight assigned to the encoder positions associated with image regions. They average that attention mass across the 2016 test set. Their figure follows the 36 visual positions in the encoder’s final-layer output, which are the positions that began with region features.

By the top encoder layer, a position can contain information from many other parts of the input. The authors rely on earlier work indicating that final states retain some information associated with their original positions. Under this assumption, a greater share of attention at the region positions is evidence of increased access through the visual part of the encoder output. The multimodal VTLM translator assigns more attention there than either the multimodal TLM translator or the multimodal translator trained from scratch.

The attention analysis and the masking experiments address different observations. Attention describes how the decoder distributes its weight across encoded input positions. Shuffling changes whether an image fits its captions and tests the effect on prediction. Entity masking changes when a translator might need an image and measures translation quality. Taken together, the results connect visual pretraining to both the internal use of region positions and sensitivity to visual evidence in tasks that make text less sufficient.

Limitations

Limits the authors identify

The authors leave the visual masking policy open. They compare their standard random masking scheme with a variant that classifies selected regions while leaving the features visible. They propose exploring more informed ways to select regions and investigating the effect of the masking probability on translation. The visible-region result shows that the standard scheme is optional for obtaining strong scores in this setup. It leaves the suitability of other masking schedules and ways of choosing salient regions unresolved.

The shared [MASK] embedding is another open design choice. The authors suggest that using the same missing-input signal for text and images could help grounding, and they describe practical reasons for choosing it. The experimental comparison changes whether the selected region features remain visible. It does not isolate the choice of a shared embedding by comparing it with other replacements under otherwise matched masking. The proposed benefit of sharing the marker therefore remains a hypothesis.

The authors also delimit their historical comparison. Their state-of-the-art claim excludes the earlier result that they attribute to extensive parallel augmentation, domain fine-tuning, and ensembling. The distinction is relevant to the research question because several changes can improve caption translation. The table supports the authors’ ranking within the comparison they define. It contains no matched experiment that isolates the influence of the different interventions used by that earlier system.

Limits of the data and design

The strongest conclusions concern English-to-German translation of image descriptions. Both the preparation data and the evaluation use captions, and the translation experiments use Multi30k. The 2017 and COCO test sets extend the comparison beyond the closest match to the training domain, within the same benchmark family. The paper leaves performance in other language directions, longer documents, and other kinds of images unmeasured.

The German side of the pretraining corpus is produced by an existing English-to-German translator. This makes it possible to create triplets at scale and gives the two captions a direct semantic connection. It also means that the German reflects how that translator expresses the meaning of the English alt text. Independent bilingual descriptions could supply different details about a scene, while human translations could give a different distribution of German expressions. The experiment with pretraining on Multi30k does not hold corpus size and origin fixed while changing the translation process. The separate effects of synthetic German, corpus scale, and caption style therefore remain unknown.

The visual representation is restricted by the object detector and by the decision to keep its highest-confidence regions. Each supervised label is a detector prediction, and the encoder works with pooled region features. A relevant visual property can be poorly represented if the detector misses a region, assigns a misleading label, or represents it in a way that does not preserve the distinction required for translation. The paper evaluates the resulting representation as a package. Other detectors, alternative selections of regions, and different representations of the scene could give different results.

The main visual comparison also changes more than a single source of supervision. Moving from TLM to VTLM supplies image inputs during pretraining and adds the region-classification loss. Leaving regions visible varies their corruption while retaining classification. A comparison that held the image inputs fixed and removed the label loss would be needed to measure the separate contribution of label prediction. Similarly, the direct-training and pretraining comparisons differ in both the learning task and the order in which the corpora are used. Their results support the authors’ training procedure under the tested conditions.

Limits of the evidence for visual grounding

The strongest tests of grounding deliberately weaken the text. Final-token masking tests what an image can contribute when parallel captions have gaps. Removing or masking source head nouns makes translation more dependent on evidence about entities. These are informative stress tests, and their measured effects apply to the chosen corruptions. In an intact caption the English wording can already convey the relevant entity. The study leaves the frequency of visually resolved decisions in ordinary caption translation open.

Aggregate BLEU and METEOR results measure agreement with references. On their own they leave the mechanism of a gain ambiguous, especially when a visually pretrained text-only translator can also perform strongly. The entity intervention makes a mechanism more plausible by targeting visually relevant parts of the source, and the image shuffle establishes that correspondence matters for word recovery. Neither experiment gives a count of individual visual distinctions correctly expressed in the German translations.

Decoder attention has a further interpretive limit. The measured positions begin as visual regions, but the encoder mixes information across text and regions. Attention at a region position can therefore reach a representation that also carries linguistic context. Conversely, information originating in an image can reach a textual position before the decoder reads it. The attention plot describes where the decoder reads in the encoded sequence under the authors’ assumption about what positions retain. It cannot by itself determine which image evidence changed a particular translation.

The reported means and standard deviations help assess variation across fine-tuning runs. They also put close rankings in perspective. On the 2017 split, for example, the visual-masking and visible-region variants report mean BLEU of 37.7 ± 0.43 and 37.6 ± 0.31. Those figures characterize the runs conducted in the paper. They leave the reliability of the ordering under new training runs or other datasets undetermined.

What came after

TriFine cites the paper and takes up multimodal translation in a setting that includes vision, audio, and subtitles. Its contribution is a large-scale dataset and benchmark with fine-grained annotated tags. The benchmark thus gives later work a setting in which to study translation with several accompanying signals and to organize evaluation around more detailed annotations. TriFine

The connection is clearest in the design of the data used to investigate multimodal translation. VTLM constructs triplets from an image and two descriptions of that image, then uses them to study how visual evidence and a second language can shape representations before translation. TriFine brings visual, auditory, and subtitle information into a translation benchmark. The three parts of a VTLM example include two linguistic counterparts, while the three modalities named by TriFine represent different kinds of input. That change broadens the setting in which the role of an accompanying signal can be studied.

The citation establishes a connection between the works. TriFine’s dataset and benchmark describe its contribution, while adoption of VTLM’s masking objective, object-label supervision, or weight-transfer procedure is unestablished. The documented continuation is the use of aligned multimodal material to investigate translation, extended to a benchmark with audio and finer-grained annotation.

Cite

Cite as Ozan Caglayan, Menekse Kuyu, Mustafa Sercan Amac, Pranava Madhyastha, Erkut Erdem, Aykut Erdem and Lucia Specia. 2021. Cross-lingual Visual Pre-training for Multimodal Machine Translation. Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2021.eacl-main.112

@inproceedings{caglayan2021cross,
  title = {{Cross-lingual Visual Pre-training for Multimodal Machine Translation}},
  author = {Ozan Caglayan, Menekse Kuyu, Mustafa Sercan Amac, Pranava Madhyastha, Erkut Erdem, Aykut Erdem and Lucia Specia},
  booktitle = {Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume},
  year = {2021},
  doi = {10.18653/v1/2021.eacl-main.112},
  url = {https://doi.org/10.18653/v1/2021.eacl-main.112}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/caglayan-2021-cross-lingual-visual-pre-training/