Elamur Research

Cross-Lingual Ability of Multilingual BERT: An Empirical Study

Paper · 2019 · K Karthikeyan, Zihan Wang, Stephen Mayhew et al.

Summary

A system can learn to recognize names or judge whether one sentence follows from another using labeled examples in English, then perform the same task in a different language. Multilingual BERT made this kind of cross-lingual transfer possible even though its pretraining used neither translations paired across languages nor a task designed to align them. The authors ask what makes transfer possible under those conditions. They train bilingual versions of BERT, called B-BERT, pairing English separately with Spanish, Hindi, and Russian. They test each system on textual entailment, which asks how a premise and a hypothesis are related, and on named entity recognition, which identifies and labels spans such as names of people and places.

The authors’ main intervention is to rewrite English in a disjoint set of characters. The resulting Fake-English retains the ordering, repetition, and patterns of the original text, while its learned word pieces have no surface forms in common with those of the target language. B-BERT still transfers, and the authors report that removing the overlap generally costs little in these experiments. Shuffling the order of pieces within sentences during pretraining does more damage, though transfer survives. A synthetic target corpus that retains word frequencies but discards ordinary sentence context produces poor transfer. Together, these experiments point to information in the organization of text beyond shared spellings and the frequencies of individual words.

The authors also vary the network and its training conditions. In their architecture experiments, greater depth improves both source and target performance, even when the total number of parameters stays approximately fixed. A single attention head is sufficient for satisfactory transfer in the tested setting, and very small networks appear to encounter a capacity constraint. Removing the next-sentence prediction objective improves downstream performance, especially across languages, while marking the language explicitly at segment boundaries has little effect. For tokenization, the detailed analysis distinguishes absolute performance from the source-to-target gap. Word-piece and whole-word inputs have similar gaps, and character inputs fare worse on that comparison.

These findings concern a specific kind of transfer. The standard entailment test switches the language of both sentences together. When the authors put the premise and hypothesis in different languages, accuracy falls sharply. A system that can apply an English-trained decision rule to a pair of Russian sentences may therefore struggle when it has to apply that rule to an English premise and a Russian hypothesis. The paper establishes that shared word pieces are unnecessary for substantial transfer in its bilingual experiments and leaves open which properties of the languages do the most work.

Deep dive: Cross-Lingual Ability of Multilingual BERT: An Empirical Study

This study uses bilingual BERT and a recoded version of English to test what helps language understanding transfer across languages. · about 34 minutes to read

The problem and its context

Why transfer was surprising

A supervised task requires examples of the decisions a system is supposed to make. A named entity recognizer needs examples that identify which spans count as entities and what categories they belong to. An entailment system needs judgments about pairs of sentences. The paper starts from a practical imbalance. Applying representations learned from large quantities of text had worked well for supervised tasks, chiefly in English, where sufficient task data were available. Training for other languages was harder. The cross-lingual problem was to make the decisions learned from labeled examples in a well-resourced language usable in a language with fewer such examples.

One strategy described by the authors used bilingual word embeddings. An embedding represents a text unit with a vector of numbers that a downstream system can use. If embeddings for words in separate languages occupy a useful common space, a classifier trained in one language can encounter familiar kinds of vectors when it reads the other. The cited empirical comparison of bilingual embeddings illustrates the earlier approach and its reliance on some supervision to induce the bilingual representations. This supervision helps determine which aspects of the distant vocabularies should correspond. Cross-lingual Models of Word Embeddings

BERT changed both the representation and the training procedure. A word piece receives an input embedding, but the representation passed to a downstream task also depends on the other text around it. The same piece can therefore contribute differently in different sentences. The network that makes these contextual representations is a Transformer, whose attention mechanism lets a position use information from other positions. In the pretraining procedure described in the paper, BERT learns from ordinary text by predicting hidden tokens and by making a judgment about the relationship between adjacent input segments. Attention Is All You Need

Multilingual BERT uses the same basic training scheme with Wikipedia text in 104 languages. The Wikipedia editions differ in size, and the sampling procedure adjusts their relative representation through exponential smoothing. The pretraining inputs themselves provide targets for the prediction tasks. The procedure supplies no paired translations and includes no explicit objective that rewards corresponding text in different languages for having similar representations. A network nonetheless serves many languages with shared parameters. How the representations become useful across languages is the question that motivates the paper.

Word-piece overlap offered one possible answer. A word piece is a unit chosen by the tokenizer, frequently smaller than a whole word. Text from separate languages can share pieces through ordinary vocabulary, numbers, and material such as links. Shared pieces enter the encoder with the same vocabulary identity. If their surrounding text differs by language, these common inputs might still help the network connect what it learns from the surrounding contexts. The hypothesis was attractive because it supplied a route from a multilingual corpus to cross-lingual behavior using ingredients already present in BERT.

What earlier comparisons could tell

The authors build on earlier studies that had documented transfer across languages. As they describe it, one examined representations by layer and related transfer to the amount of shared vocabulary. Another considered how transfer varied with word order across languages and proposed a role for shared pieces. These comparisons gave reasons to consider both surface resemblance and structural resemblance. A source and target might share visible strings, have similar patterns of ordering, or have both properties. Scores from existing multilingual BERT cannot by themselves identify how much each property contributes. Beto, Bentz, Becas and How Multilingual Is Multilingual BERT?

The paper turns those observations into questions about training interventions. Can the authors remove common vocabulary from a pair while retaining the structure of its texts? Can they disturb the order of pieces while preserving the other pieces available in each sentence? Can they alter the architecture without changing the total parameter count by much? Such comparisons narrow the range of explanations. The authors also reduce the number of languages in pretraining. With English and a single target present, the interpretation concerns that pair, without needing to account for what a third language contributes.

The two tasks give this investigation different points of observation. Entailment requires a decision about the relationship of sentences and can depend on a property of the pair as a whole. Named entity recognition locates and labels parts of one text, drawing more directly on the cues around an expression. A factor could affect the tasks differently. For instance, an intervention that alters how positions contribute to a representation could change evidence used to find a name, evidence used to relate sentences, or both. Seeing the same broad pattern on both tasks gives the authors a wider basis for interpreting a comparison.

The paper also situates its architectural and training questions in earlier studies. Work on monolingual BERT and its successors had questioned the value of next-sentence prediction. Work on machine translation had examined how many attention heads could be pruned. Those studies supplied reasons to test similar components in bilingual transfer. The relevant question here is how a component affects a system whose task supervision comes from one language and is applied to another. RoBERTa, XLNet, and Analyzing Multi-Head Self-Attention

The method, step by step

From raw text to a task in another language

The study separates learning from raw text and learning from task labels. First, the authors pretrain a bilingual encoder using Wikipedia from its source and target languages. The encoder learns to turn input tokens into contextual representations. Then they use labeled source-language examples to learn a downstream task, such as classifying the relation between two sentences. Finally, they evaluate the task on held-out examples in the source language and on examples in the target language. The target language has been present during pretraining. Its supervision for the downstream task is withheld.

How B-BERT is trained and tested across languages

The steps in order.

How B-BERT is trained and tested across languagesStep 1: Choose a source and target language1. Choose a source and target languageStep 2: Prepare Wikipedia text and apply the planned intervention2. Prepare Wikipedia text and apply the planned interventionStep 3: Tokenize the text for bilingual pretraining3. Tokenize the text for bilingual pretrainingStep 4: Pretrain a shared BERT encoder4. Pretrain a shared BERT encoderStep 5: Learn the downstream task from source labels5. Learn the downstream task from source labelsStep 6: Evaluate on source and target task examples6. Evaluate on source and target task examplesStep 7: Compare outcomes across controlled training settings7. Compare outcomes across controlled training settings

This sequence makes two comparisons possible. The source test shows how well a training condition supports task learning and prediction in the language of the annotations. The target test shows how much of that ability can be used across languages. A condition might improve both scores by helping the encoder represent text more effectively in general. It might also change how far performance falls at the language boundary. The paper examines both questions, and in the architecture experiments it explicitly uses the performance gap as a measure of transfer.

The authors denote a bilingual setup by its constituent languages. For example, en-hi means that English and Hindi are used for pretraining. The other main natural-language pairings are English with Spanish and English with Russian. The pairs differ in script and in linguistic properties, giving the authors several circumstances in which to test surface overlap. For English, Spanish, and Russian, the authors subsample Wikipedia text to 1GB. They use all of the Hindi Wikipedia. This makes the bilingual setup distinct from the released multilingual BERT, which draws on a much larger collection of languages.

The default settings for pretraining B-BERT are 32 examples per batch and a learning rate of 0, unless the experiment specifies different settings.0001, and 2M training steps. The batch size describes how many examples contribute to a training update. The learning rate governs the scale of those updates, and the step count is the scheduled number of updates. The paper reports a fixed vocabulary size of 60,000 for the standard word-piece setup. It estimates the vocabulary with the unigram procedure in SentencePiece. Here, a unigram procedure concerns the individual units being considered for a vocabulary. This use of unigrams is separate from the later experiment that samples whole words independently to create synthetic sentences. Subword Regularization

What the encoder learns during pretraining

In the standard setup, BERT receives a pair of input segments, conventionally called A and B. The paper explains the task in terms of sentences, while noting that an actual segment can contain multiple sentences. In half of the examples, the second segment follows the first in the original text. In the other half, the second comes from random sampling. Next-sentence prediction, abbreviated NSP, asks the system to tell those cases apart. Both classes can be constructed from the corpus without paying annotators to assign labels.

Masked language modeling, abbreviated MLM, gives the encoder another task on the same kind of input. Some token positions are hidden, and the encoder must predict what belongs at those positions. Its context can include text on either side of the missing token. For an ordinary sentence, the order of the remaining pieces and the presence of other pieces may both offer evidence. This distinction matters later. A shuffled input can still give the encoder clues from which pieces occur together, even though their positions may offer much less useful information.

Each tokenizer entry is represented by a vocabulary identity and then by an embedding. The Transformer works with the resulting representations. That intermediate step is important for Fake-English. Though the recoding is defined using a simple arithmetic change to character values, the encoder receives vocabulary entries whose identities are unrelated to those numeric Unicode values. It has no direct access to the arithmetic rule used to construct the new spelling system.

After pretraining, the route to the downstream task depends on the benchmark. For entailment, the authors follow BERT’s standard fine-tuning approach. A task-specific layer makes the decision about the sentence pair, and the encoder’s parameters can be updated during supervised training. For entity recognition, the paper instead extracts representations from BERT and supplies them as features to a bidirectional long short-term memory network with a conditional random field, abbreviated Bi-LSTM CRF. The bidirectional network processes the token sequence from both directions, and the conditional random field scores the labels as a sequence. This recognizer has no character-wise embeddings of its own. The task pipelines therefore use BERT’s representations in different ways.

Removing shared spellings with Fake-English

The authors first construct a source language that preserves the distribution of English text while removing visible overlap with the target. They replace each character in English Wikipedia with the character reached by shifting its Unicode value by a large fixed offset. The chosen range is disjoint from the characters in the other Wikipedia texts. Every occurrence of an original character receives the same replacement. Repeated strings thus remain repeated, and the ordering of characters and of words is preserved in the recoded text.

This differs from exchanging a normal English corpus for an unrelated source corpus. Such an exchange would change the language, its vocabulary, its grammatical patterns, and potentially the kinds of text available for training. Fake-English changes the surface symbols of the English corpus. Under that substitution, word order, frequencies, and recurring forms within English remain available in their recoded form. A learned word piece can still express a repeated pattern in the source. Its tokens cannot have the same surface form as pieces made from a disjoint target alphabet.

The experiment uses corresponding bilingual setups with ordinary English and with Fake-English as the source. The target can stay the same while the status of shared spelling changes. The authors also consider transfer from Fake-English back to ordinary English. This comparison provides an especially close structural pairing because the recoded variety comes from English itself. The wider comparisons with Spanish, Hindi, and Russian ask whether transfer persists when the target is a separate language as well as using a disjoint vocabulary.

Disrupting order while preserving sentence contents

The next intervention starts with a bilingual setup whose source is already Fake-English. During pretraining, the authors shuffle positions within sentences in the source and target corpora. The units exchanged are word pieces. The authors control the disturbance by sampling a fraction of the available pairs of positions. For a sentence of length L in word pieces, the number of available pairs is written as a binomial coefficient.

C(L, 2)

Here, C denotes the number of unordered selections of 2 positions from L positions, and L is the sentence length measured in word pieces. An unordered pair identifies the two positions to exchange. The sample is drawn from the possible pairs in that sentence.

p ∈ {25%, 50%, 100%}

Here, p is the percentage of possible position pairs sampled for swapping, and ∈ means that p takes one of the listed values. A percentage describes the sampling intensity of the swaps. It does not count how many pieces end up away from their original locations, since more than one swap can affect a position.

(wpᵢ, …, wpⱼ) → (wpⱼ, …, wpᵢ)

Here, wpᵢ and wpⱼ are the pieces currently at positions i and j, and i and j index the selected locations. The arrow indicates the exchange. The dots stand for intervening pieces, which this individual swap leaves in place. Across all sampled pairs, a sentence can undergo many such exchanges. The procedure gives a way to vary the disruption, though it does not draw uniformly from all possible sentence permutations.

The intervention keeps the collection of pieces within each sentence. If two pieces occurred together before shuffling, the resulting sentence still contains both. Order and relative position can change substantially. This is the reason the procedure separates aspects of structure more finely than discarding the sentence and generating a fresh one. The authors apply swaps in both languages during pretraining, and keep downstream task inputs in their ordinary order. The downstream system is thus evaluated on the intended task with natural ordering, after pretraining under a changed source of evidence.

Testing what word frequencies can supply

The frequency experiment changes the target corpus in a different way. The authors count words in the natural target corpus and then sample words according to those frequencies to make synthetic sentences. This preserves the distribution from which individual words are drawn. It removes the original selection of words that appeared together and their arrangements in natural sentences. The resulting bilingual encoder is pretrained on Fake-English and the synthetic target. Its source text stays structured, so the question is whether the restricted evidence on the target side suffices for useful transfer.

The motivation concerns the information carried by frequency. If expressions with similar meanings were to occur at related frequencies in separate languages, their ranks or rates could potentially supply clues about correspondences. The authors frame the question in connection with Zipf’s law, which concerns the unequal distribution of word frequencies. The synthetic corpus can retain additional traces, such as internal patterns of the sampled words and potentially the distribution of sentence lengths. The paper accordingly interprets the intervention as a strong reduction of target information, with unigram frequencies as the main preserved signal.

Taken together, the interventions preserve progressively different kinds of evidence. In the script intervention, the relationships among occurrences within a natural sentence remain as before. After shuffling, the sentence still contains the same pieces, though the order has been disturbed. In the synthetic target, word occurrence probabilities are inherited from the corpus, while the original groups of co-occurring words have been discarded. The comparisons give the study leverage over the contribution of shared spelling, order, and ordinary sentence context. They do not require assigning independent numerical contributions to each.

Varying the network and its inputs

For the main architecture studies, the authors use Fake-English and Russian and evaluate on entailment. In the depth comparison, they change the number of stacked Transformer layers. To keep the parameter count approximately constant, they adjust the widths of the hidden and intermediate representations. They keep the attention-head count fixed. The intermediate width follows a fixed relationship to the hidden width.

I = 4 × H

Here, I is the size of the intermediate representation, H is the hidden size, and × indicates multiplication. The coefficient 4 is the ratio used in the width adjustments. Increasing depth can therefore be accompanied by narrowing the layers so that the resulting encoders remain close in total parameter count.

The authors also change the attention-head count at fixed depth and parameter count. An attention head is a separate operation within an attention layer that can assign different weights to positions in the input. Several heads allow the layer to combine different such operations. Reducing a layer to a single head still leaves it able to use information from across the input. The parameter-count comparison takes a different route. It keeps depth and head count fixed and varies width, using the same relationship between the hidden and intermediate sizes.

For these architecture experiments the authors characterize cross-lingual ability by the gap in entailment test accuracy.

Δ = Acc(Fake-English) − Acc(Russian)

Here, Δ is the source-to-target difference, and Acc denotes test accuracy. Acc(Fake-English) measures performance on the source-language test data, and Acc(Russian) measures performance on the target-language test data. The minus sign specifies the direction of the subtraction. The task is trained on Fake-English in both cases. The authors interpret a smaller gap as better retention of accuracy across the language change. They also consider the absolute accuracies, which are needed to tell whether a small gap accompanies strong performance.

The remaining comparisons alter the objective or the input. The authors pretrain with and without NSP to find out how it contributes alongside masked prediction. They also test explicit language identification by replacing the usual segment separator with one whose identity depends on the segment language. Their input format is as follows.

[CLS] SENT1 [SEP-A] SENT2 [SEP-B]

[CLS] is BERT’s starting marker. SENT1 and SENT2 are the first and second text segments. [SEP-A] terminates the first segment and encodes its language A, while [SEP-B] terminates the second and encodes its language B. The suffixes refer to language identity. The ordinary separator carries no such explicit suffix. This intervention asks whether adding a direct cue changes the transfer obtained from the text and the shared encoder.

Finally, the paper varies tokenization. A character vocabulary includes all the characters. A whole-word vocabulary contains the most frequent 100,000 words. The standard subword tokenization setup uses the learned word pieces described earlier. These units present the same general kind of training text at different granularities. A word can enter as one vocabulary item, as reusable pieces, or as a series of individual characters. The caption for this comparison specifies a 2k batch size and 500k epochs. These settings are reported for the tokenization experiment, separately from the general defaults. The authors make their implementations and trained BERT variants available through the project.

Experiments and results

What the benchmarks measure

Cross-lingual Natural Language Inference, or XNLI, is the benchmark for textual entailment. It extends MultiNLI with development and test data translated manually into 14 different languages. Each example presents a premise and a hypothesis. The task is to decide whether the premise supports the hypothesis, contradicts it, or leaves it undecided. In the standard English-source setup, the supervised training pairs have both sentences in English. In a target-language test, both sentences are in the target language.

The same underlying premise–hypothesis pairs are available across the benchmark languages. This helps when comparing scores, because a language change can be made while retaining the underlying examples and their intended relationships. The metric is accuracy, the share of sentence pairs given the correct label. In the architecture study, the source and target test accuracies serve different purposes. The source accuracy indicates performance on the task under source-language testing. The target accuracy indicates performance after the switch. The paper’s Δ summarizes the gap between them.

The entity task uses LORELEI news and social media text. Native speakers label the data in their languages using common guidelines. The task requires finding entity boundaries and assigning types, with people and places among the paper’s examples. The authors split the English entity data into 80%, 10%, and 10% for training, development, and testing, respectively. They use the full Hindi, Spanish, and Russian entity datasets for testing. The entity examples come from their respective corpora, so the cross-language evaluation lacks the item-for-item match that XNLI provides.

For entity recognition the paper reports F1, which balances precision and recall. Precision concerns how many of the predictions are correct, while recall concerns how much of the annotated material the system recovers. The authors average the score over 5 runs and report its standard deviation, a measure of how spread out the run scores are. In the word-piece overlap table, they also mark the entity results they judge statistically significant at the 0.05 level. That threshold applies to the significance annotations and is distinct from the magnitude or variability of an F1 score.

The comparisons that serve as baselines

The main baseline for the lexical intervention is the bilingual encoder pretrained with ordinary English and the target language. The corresponding Fake-English version changes the source’s surface symbols while retaining its text patterns. For the order experiment, the interpretation depends on comparison with intact order in the disjoint-vocabulary setup. For the synthetic corpus, the comparison asks how much transfer survives when the target’s natural text is replaced with words drawn according to the target’s original frequencies. Each baseline is tied to an explanation the authors want to test.

The architecture comparisons use versions of the same bilingual approach under different depth, width, or head-count conditions. The training-objective comparison uses versions with and without next-sentence prediction. The language-marker comparison changes the separator convention, and the tokenization comparison considers different kinds of input units. These baselines make it possible to ask how performance changes when a particular ingredient changes. They serve the paper’s goal of understanding what supports transfer within B-BERT.

The tables are described in terms of their metrics, conditions, and directions of effect. The numerical accuracy and F1 cells are unavailable, so the magnitudes of the score changes cannot be specified here. The numerical results that can be stated exactly include the compact four-language configuration and the settings of the interventions. The latter describe how the experiments were conducted. For instance, the percentage of word-piece pairs swapped is a measure of the training manipulation, while the resulting task scores are measured by XNLI accuracy and LORELEI F1.

Transfer with and without linguistic cues

Across the studied source–target pairs, the paper reports that removing shared word pieces makes relatively little difference to transfer on the two benchmarks. The Fake-English systems retain substantial target-language performance. The experiments also show strong transfer from Fake-English to ordinary English, a case where the underlying language structure is preserved especially closely. In the XNLI comparison among the separate target languages, Fake-English transfers better to Spanish than to Hindi or Russian. All of these comparisons with Fake-English eliminate shared pieces, so the better Spanish result survives the removal of that possible advantage.

The order intervention gives a different pattern. Disturbing order during pretraining substantially reduces performance, and the authors report that transfer remains above random performance even under strong shuffling. The synthetic target built from unigram frequencies produces poor transfer. The conditions help explain the contrast. The shuffling treatment keeps the groups of pieces found in natural sentences. The synthetic target does away with those groups. The remaining success after shuffling can therefore coexist with the weak result from the frequency experiment.

The paper also changes how the two languages appear in an entailment example at test time. It uses XNLI to put the premise in one language and the corresponding hypothesis in another. The availability of translations of the same examples lets the authors change the language combination while retaining the intended relationship between the sentences. Training is always on Fake-English in this comparison. The paper reports a sharp fall in test accuracy for test pairs that mix languages. This finding adds a separate outcome to the ordinary transfer results, which come from testing with both sentences in a common target language.

Transfer under changes to the encoder

In the Fake-English–Russian depth comparison, the deeper B-BERT configurations do better on the source XNLI test and generalize better to the Russian test. Source performance and the cross-language gap move together in a way the authors interpret as a strong association between effective source representations and effective transfer. The width and parameter comparison suggests that a low-capacity region matters, while depth is the more prominent architectural factor in these experiments. Varying the number of heads at fixed depth and parameter count changes the transfer gap relatively little, and a single head still gives satisfactory performance.

The paper checks the architectural pattern with a larger language set consisting of English, Spanish, Hindi, and Russian. On XNLI, it reports comparable performance with 15% of the parameters and with 1 or 3 attention heads when sufficient depth is retained. The percentage is the reported relative parameter budget in that comparison. The counts refer to attention heads, and the performance being compared is XNLI accuracy. This experiment extends the observation beyond a bilingual encoder to another specific training setup.

The input and objective changes also produce different kinds of results. With next-sentence prediction omitted, the paper reports better performance, with the adverse effect of including it described as greater in cross-lingual testing than in monolingual testing. Different separator tokens for different languages have little effect on transfer. In the tokenizer study, the authors describe the gaps between source and target scores as similar for word-piece and whole-word inputs and worse for characters. Their broader account favors word pieces for performance. The gap comparison and that broader judgment can both hold because a tokenizer can change source and target scores together.

What the ablations show

Shared spelling is dispensable in the tested pairs

The Fake-English comparison tests whether overlapping pieces are required. Common spellings disappear across the source and target vocabularies, while many of the clues carried by English text retain the same relations to each other. The continued transfer is direct evidence against the necessity of shared pieces in these setups. The comparison with the ordinary-English baseline goes further. The authors report a comparatively small drop when overlap is removed, suggesting that access to shared spellings accounts for relatively little of the observed performance under these conditions.

This result concerns transfer through a network trained jointly on the two corpora. The process can still learn to respond similarly to patterns in separate vocabularies. Similar contextual functions, repeated configurations of pieces, or recurring internal patterns of words remain conceivable cues. The downstream scores establish that the system has enough in common across languages for the learned task to be useful. They leave open what individual representations correspond to each other and how the pretraining process brings about that correspondence.

Fake-English to English is instructive because both sides have the structure of English, expressed through separate sets of symbols. Transfer in that pairing shows that an especially close relationship can be exploited without identical spellings. Transfer to Spanish, Hindi, and Russian shows that such a close relationship is unnecessary. The higher Fake-English-to-Spanish result on XNLI motivates the authors’ interpretation in terms of structural resemblance, while the design leaves the particular components that favor the Spanish pairing unresolved.

Order contributes, and sentence membership still carries information

The shuffling experiment narrows the structural explanation. It uses only sentences whose pieces are already present in the pretraining corpus and alters their arrangements. Because the same pieces still occur together, information available from sentence membership survives. Patterns that require a specific local order become harder to learn from the training distribution. The graph shows the intensity settings used for this comparison. Its values describe the share of available position pairs selected for swaps, and the starred setting is the least disruptive of the plotted settings.

Word-order intervention during pretraining in the XNLI and LORELEI experiments

A larger share of sampled pairs applies more swaps to the same collection of pieces within each sentence.

Word-order intervention during pretraining in the XNLI and LORELEI experimentsB-BERT with the lightest shuffle (this paper): 25%B-BERT with the lightest shuffle (thispaper)25%B-BERT with the intermediate shuffle: 50%B-BERT with the intermediate shuffle50%B-BERT with the strongest shuffle: 100%B-BERT with the strongest shuffle100%
The numbers
System or settingposition pairs sampled %
B-BERT with the lightest shuffle (this paper)25%
B-BERT with the intermediate shuffle50%
B-BERT with the strongest shuffle100%

The outcome helps distinguish a contribution from a requirement. The decline after shuffling supports the claim that ordered text contributes to useful representations. The remaining performance shows that the intervention leaves evidence the system can use. An intact sentence offers information both through how its pieces are ordered and through which pieces appear at all. The paper’s design preserves the second form of evidence while reducing the reliability of the first. The observed drop consequently speaks to the importance of pretraining order, with the remaining ability leaving room for other aspects of structure.

The intervention affects both languages. It weakens each corpus as a source of natural ordered text, as well as obscuring similarities between their original orders. A general decline in the quality of pretraining is therefore part of what the score changes can reflect. The comparison shows that intact order helps in this bilingual setup. It cannot assign the entire performance change specifically to the loss of agreement between the languages’ ordering rules. Separating those influences would require comparisons that distinguish disruption within a language from similarity between languages.

Frequency is a weaker signal than natural co-occurrence

The synthetic-target experiment asks whether the target side can support transfer when ordinary word frequencies are the main surviving signal. Its poor performance puts a limit on a simple frequency-based explanation. The ordering experiment leaves pieces in company with the other pieces from their original sentences. The unigram experiment samples words afresh and so breaks those natural groupings. In the paper’s interpretation, frequency alone gives the network too little information to learn representations that work well across the pair.

This result leaves other roles for frequency open. Common words can occur in particular kinds of constructions, and the usefulness of a word’s frequency may depend on the contexts where that word occurs. A corpus built by sampling individual words provides very little access to those relationships. The authors suggest examining higher-order n-gram statistics and co-occurrence. An n-gram describes a sequence of units, while co-occurrence concerns their presence together within a context. A shuffled sentence retains co-occurrences over the whole sentence, even though its usual sequences of pieces are disturbed.

The tests therefore support a broad use of structure. In the authors’ definition, features such as morphology, order, and frequency all qualify insofar as they survive changing the script. With that definition, natural sentences provide several structural cues together. Removing overlap rules out one surface explanation, shuffling shows the value of ordered text, and independent sampling shows the weakness of the reduced signal. The exact role of morphology, or of a particular range of co-occurrences, remains to be isolated.

Depth gives more leverage than head count

The depth experiment makes the parameter budget part of the control. A deeper system with approximately the same parameter count has more successive layers through which to transform its representations. Its improvement cannot be attributed simply to a large increase in the number of parameters. The authors take the stronger source and transfer results as consistent with deeper networks extracting features that represent meaning and structure more effectively. Their evidence is a change in task behavior under an architectural intervention. It leaves the question of which features are extracted by which layers for further study.

The head-count comparison keeps depth and total parameter count fixed. This makes it distinct from a comparison in which reducing the number of heads also removes a large share of the network’s capacity. The little change in Δ across head counts indicates that several parallel attention operations within each layer are dispensable for satisfactory transfer in this pair and task. Attention itself remains present, and there are still successive layers. A single head can draw on other positions in each layer, so satisfactory transfer with that setting is compatible with an important role for contextual information.

The width comparison finds a region in which additional capacity matters more than it does for larger settings. The authors see this as evidence that the encoder needs a minimum capacity to extract useful features. This qualifies the depth result. Similar parameter totals make the depth comparison interpretable, while the fixed-depth width comparison shows that capacity can still become limiting. The four-language result gives another setting in which sufficient depth supports competitive performance with fewer parameters and heads. It extends the architectural observation across training setups without identifying a universal minimum size.

The objective, language marker, and tokenizer change different things

Removing NSP improves the downstream outcomes in the paper’s comparison. This test concerns a pretraining decision about whether a segment follows another in the corpus. Entailment, by contrast, requires a decision about whether the content of a premise supports the content of a hypothesis. Both take paired input, but they give the system different reasons to attend to it. The result shows that the extra adjacency prediction objective is unhelpful for the tested downstream settings, even though one of those settings also classifies sentence pairs.

The explicit marker test asks whether making language identity easier to read changes the outcome. The separate end-of-segment tokens supply language information directly. The similarity to the unmarked condition is consistent with the idea that enough information about the language is already available from the text. In the recoded conditions, many input symbols are exclusive to one language, and a language can have recurring patterns of its own even without a dedicated marker. The score comparison addresses the value of adding this specific cue. It does not determine whether the encoder internally distinguishes languages or at which stage it does so.

The tokenizer treatment changes how much material an input unit can represent. A character provides a smaller individual unit, while a word piece can give the network a recurring fragment and a word can give it a whole lexical item. The authors suggest that richer units make it easier to learn similarities. The observed gaps support a narrower conclusion. Word pieces and words behave similarly by the gap measure, and characters fare worse. Since the representation granularity also changes what the vocabulary includes and how much text a token sequence can represent, the comparison concerns the overall choice of input encoding.

Mixed-language entailment tests a different ability

The mixed-language entailment analysis probes the use of correspondence within a single example. In standard target-language evaluation, the classifier receives a premise and hypothesis in the same language. It could exploit their common words and phrases even when the target shares no vocabulary with the language used to teach the task. In the mixed condition, the system must relate sentences across a language boundary inside the example itself. The sharp fall on that test shows why the two abilities need to be measured separately.

The authors propose that entailment decisions may depend in part on matching words or phrases between the premise and hypothesis. That account is compatible with both findings about the lexicon. A shared vocabulary across the supervised source and test target can be unnecessary, while overlap between the two sentences currently being classified can still help. The experiment observes what happens when the language combination changes. It does not directly observe the matching procedure or establish how much of the fall any one kind of matching explains.

Limitations

Limits the authors state

The core experiments use bilingual BERT so that transfer can be studied without contributions from additional languages. The authors explicitly leave open how those contributions work in multilingual pretraining. In particular, they ask whether adding a language related to the target might improve transfer into that target. The four-language architecture experiment offers a broader check on depth, width, and head count. It does not vary the addition of related languages to identify their effect, and the linguistic interventions center on the bilingual setups.

The authors also identify the breadth of their definition of structure as unfinished business. Defining it by what survives a change of script allows Fake-English to preserve many properties at once. That makes the first intervention useful for ruling out the need for shared word pieces. It also means the preserved information spans several levels of language, from internal word patterns to sentence order and frequency. The authors call for a more precise definition and experiments that can distinguish the components. Their evidence motivates that program without assigning a measured effect to each component.

A further open question is why mixing the languages of the premise and hypothesis damages entailment performance. The authors present word or phrase matching as a possible explanation and leave it for future investigation. The test supplies behavioral evidence from pairs with a changed language combination. It offers no direct demonstration that a particular alignment, phrase match, or semantic operation failed. The distinction is important because the paper’s main experiments establish transfer of task behavior when both sentences are in the target language.

Limits apparent from the design

The evidence concerns selected language pairs and tasks. English or Fake-English serves as the main source, and the ordinary targets are Spanish, Hindi, and Russian. The paper varies source surface vocabulary under controlled conditions, but it does not establish how the same encoders would behave under every reversal of the training and test languages. Cross-lingual results are also conditional on prior exposure to target-language text in pretraining. They speak to learning a task without target-language labels and leave performance on languages wholly absent from training outside their scope.

The language comparisons differ in other respects besides their linguistic structure. Hindi uses all available Wikipedia text for pretraining, while English, Spanish, and Russian are sampled to the stated sizes. The target corpora can retain different content and frequency patterns. XNLI’s translations make the evaluation examples comparable across languages, but they cannot make the training corpora identical. The result favoring Spanish over Hindi and Russian in the Fake-English XNLI comparison supports interest in structural resemblance while leaving the causes of that ranking only partly identified.

The entity task has a different comparability limit. Common annotation guidelines help put the LORELEI labels on a shared footing. The language-specific sets are separate collections of news and social media, so their examples can differ in content and difficulty. Moreover, the named entity pipeline uses extracted BERT representations and a sequence labeler, while entailment uses standard BERT fine-tuning. The two tasks offer breadth, but differences between their responses can reflect the supervised pipelines as well as the kind of linguistic judgment being made.

The shuffling and unigram interventions each change several consequences of natural language structure. Swapping positions damages order while retaining sentence membership, but it can also disturb recurring sub-word sequences and the local evidence for predicting a hidden piece. Independent word sampling removes natural co-occurrences and sentence organization together. The results compare these whole interventions. Their outcome does not supply separate numerical estimates for the value of word order, local morphology, sentence-level context, or longer-range dependencies.

Scores must also be read together with the evaluation measure used. A narrow source-to-target gap can occur when a system performs well in both languages or when it performs poorly in both. In the depth comparison, the improvement in absolute source and target performance makes the change in Δ more informative. The same distinction is necessary when reading the tokenization study. Similar gaps for word pieces and whole words do not establish equal absolute performance, and the charted degrees of shuffling describe pretraining conditions rather than observed changes in accuracy or F1.

Finally, the design establishes that shared learned word pieces are unnecessary for the transfer observed in the recoded experiments. How useful overlap would be under a different script pairing, training corpus, architecture, or task remains a separate empirical question. The Fake-English recoding is deliberately cleaner than a natural change of language. A practical difference between two real languages can change vocabulary, usage, and structure at the same time. The artificial source is powerful because it isolates a surface change under selected conditions, and its conclusion travels as far as those conditions justify.

What came after

Where transfer comes from

On the Cross-lingual Transferability of Monolingual Representations moves the question to representations learned in a single language. The bilingual study asks whether shared surface pieces are required when source and target text both contribute during pretraining. The later work asks how far transfer can go when the starting representations are monolingual. The change shifts attention from which inputs overlap during bilingual pretraining to what a representation learned from one language can offer when used across languages.

Emerging Cross-lingual Structure in Pretrained Language Models takes up the structure of the representations themselves. The B-BERT study uses downstream task performance to infer that the encoder retains useful cross-language information after several cues have been removed. The later work’s focus is the cross-lingual structure that emerges in pretraining. These are linked questions at different levels of observation. One concerns whether a task can still be performed after training conditions change. The other concerns what organization the learned representations acquire across languages.

InfoXLM approaches cross-lingual pretraining through an information-theoretic framework. In B-BERT, the source and target share an encoder, and transfer appears even though its pretraining objectives are not explicitly cross-lingual. InfoXLM takes cross-lingual pretraining itself as the object of study. The connection is the question of which information survives in forms useful across languages. The bilingual experiments approach that question by removing cues from the input, while the later work frames it in terms of information in pretraining.

When transfer is uneven

Are All Languages Created Equal in Multilingual BERT? puts variation among languages at the center. The bilingual study uses a small set of intentionally different targets to make particular comparisons interpretable. Its Spanish, Hindi, and Russian XNLI comparisons already show that removing shared pieces need not erase differences among targets. The later work treats variation across languages as a question in its own right. It follows the line of inquiry opened by asking what a common multilingual encoder makes available to each of its languages.

From Zero to Hero focuses on the limitations of zero-shot language transfer with multilingual Transformers. Here, zero-shot concerns target task supervision. For the principal B-BERT experiments, the target language supplies raw pretraining text but no labeled downstream examples. The later study takes the limitations of this kind of transfer as its subject. The link to the bilingual study is especially clear in the mixed-language entailment test, which illustrates how a change in the evaluation condition can expose a weakness that ordinary target-language testing misses.

When Being Unseen from mBERT Is Just the Beginning focuses on handling new languages. This takes the problem beyond the type of target used in the main B-BERT experiments, where the encoder has read the target language during pretraining. The later work asks how a multilingual system can handle a language outside that familiar setting. The distinction locates two separate sources of difficulty. A target may be missing task labels even when the encoder has encountered its text, or the encoder may also have to deal with a language unseen in its original training.

What changes at the input

How Good Is Your Tokenizer? puts tokenization at the center of a study of monolingual performance in multilingual systems. The B-BERT experiment varies characters, pieces, and words, then examines what happens to both task performance and the source-to-target gap. The later work emphasizes what the tokenizer means for performance within a language. That emphasis connects to the distinction between absolute scores and transfer gaps. A tokenizer can matter for how well a system reads a language even when some difference between languages is relatively stable.

UNKs Everywhere addresses adaptation to new scripts. Fake-English uses a disjoint script as an experimental instrument, with the recoded source present during bilingual pretraining. The later work treats a new script as a practical adaptation problem. For an already pretrained system, the issue is how to make a script usable through its input representation. The shared question concerns how much cross-lingual ability depends on the way text reaches the encoder, under distinct conditions of exposure.

Extending Multilingual BERT to Low-Resource Languages likewise makes extending coverage the task. The bilingual paper starts with a source and a target, chooses their pretraining corpora, and asks what allows a common encoder to transfer between them. The later work starts from multilingual BERT and asks how to extend it to low-resource languages. Together these settings clarify why pretraining exposure, a usable representation of the script, and access to downstream labels are separate parts of cross-lingual evaluation. The original study holds the target’s presence in pretraining fixed in its main comparisons, which is precisely the condition that work on extending coverage has reason to change.

Cite

Cite as K Karthikeyan, Zihan Wang, Stephen Mayhew and Dan Roth. 2019. Cross-Lingual Ability of Multilingual BERT: An Empirical Study. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1912.07840 · arXiv 1912.07840

@misc{karthikeyan2019cross,
  title = {{Cross-Lingual Ability of Multilingual BERT: An Empirical Study}},
  author = {K Karthikeyan, Zihan Wang, Stephen Mayhew and Dan Roth},
  year = {2019},
  doi = {10.48550/arxiv.1912.07840},
  eprint = {1912.07840},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1912.07840}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/karthikeyan-2019-cross-lingual-ability-multilingual-bert/

References

18 references, from the paper's own bibliography.

  1. Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. What does BERT look at? an analysis of bert's attention. CoRR, abs/1906.04341, 2019. URL http://arxiv.org/abs/1906.04341. OpenAlex ↗ · Scholar ↗
  2. Alexis Conneau and Guillaume Lample. Cross-lingual language model pretraining. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d'Alché-Buc, Emily B. Fox, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, 8-14 December 2019, Vancouver, BC, Canada, pp. 7057–7067, 2019. URL http://papers.nips.cc/paper/8928-cross-lingual-language-model-pretraining. OpenAlex ↗ · Scholar ↗
  3. Alexis Conneau, Ruty Rinott, Guillaume Lample, Adina Williams, Samuel R. Bowman, Holger Schwenk, and Veselin Stoyanov. XNLI: evaluating cross-lingual sentence representations. In Ellen Riloff, David Chiang, Julia Hockenmaier, and Jun'ichi Tsujii (eds.), Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pp. 2475–2485. Association for Computational Linguistics, 2018. . URL https://doi.org/10.18653/v1/d18-1269. OpenAlex ↗ · Scholar ↗
  4. Ido Dagan, Dan Roth, Mark Sammons, and Fabio Massimo Zanzotto. Recognizing Textual Entailment: Models and Applications. Synthesis Lectures on Human Language Technologies. Morgan & Claypool Publishers, 2013. ISBN 9781598298345. . URL https://doi.org/10.2200/S00509ED1V01Y201305HLT023. OpenAlex ↗ · Scholar ↗
  5. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Multilingual bert - r, 2018. URL https://github.com/google-research/bert/blob/master/multilingual.md. OpenAlex ↗ · Scholar ↗
  6. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pp. 4171–4186. Association for Computational Linguistics, 2019. . URL https://doi.org/10.18653/v1/n19-1423. our card
  7. Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer, and Omer Levy. Spanbert: Improving pre-training by representing and predicting spans. CoRR, abs/1907.10529, 2019. URL http://arxiv.org/abs/1907.10529. our card
  8. Taku Kudo. Subword regularization: Improving neural network translation models with multiple subword candidates. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pp. 66–75, 2018. . URL https://www.aclweb.org/anthology/P18-1007/. our card
  9. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692, 2019. URL http://arxiv.org/abs/1907.11692. our card
  10. Telmo Pires, Eva Schlinger, and Dan Garrette. How multilingual is multilingual bert? In Anna Korhonen, David R. Traum, and Lluís Màrquez (eds.), Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 4996–5001. Association for Computational Linguistics, 2019. . URL https://doi.org/10.18653/v1/p19-1493. our card
  11. Stephanie M. Strassel and Jennifer Tracey. LORELEI language packs: Data, tools, and resources for technology development in low resource languages. In Nicoletta Calzolari, Khalid Choukri, Thierry Declerck, Sara Goggi, Marko Grobelnik, Bente Maegaard, Joseph Mariani, Hélène Mazo, Asunción Moreno, Jan Odijk, and Stelios Piperidis (eds.), Proceedings of the Tenth International Conference on Language Resources and Evaluation LREC 2016, Portorož, Slovenia, May 23-28, 2016. European Language Resources Association (ELRA), 2016. URL http://www.lrec-conf.org/proceedings/lrec2016/summaries/1138.html. our card
  12. Wilson L Taylor. “cloze procedure”: A new tool for measuring readability. Journalism Bulletin, 300 (4):0 415–433, 1953. OpenAlex ↗ · Scholar ↗
  13. Shyam Upadhyay, Manaal Faruqui, Chris Dyer, and Dan Roth. Cross-lingual models of word embeddings: An empirical comparison. In Proc. of the Annual Meeting of the Association for Computational Linguistics (ACL), 2016. our card
  14. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pp. 5998–6008, 2017. URL http://papers.nips.cc/paper/7181-attention-is-all-you-need. our card
  15. Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned. In Anna Korhonen, David R. Traum, and Lluís Màrquez (eds.), Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 5797–5808. Association for Computational Linguistics, 2019. . URL https://doi.org/10.18653/v1/p19-1580. our card
  16. Adina Williams, Nikita Nangia, and Samuel R. Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In Marilyn A. Walker, Heng Ji, and Amanda Stent (eds.), Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2018, New Orleans, Louisiana, USA, June 1-6, 2018, Volume 1 (Long Papers), pp. 1112–1122. Association for Computational Linguistics, 2018. . URL https://doi.org/10.18653/v1/n18-1101. our card
  17. Shijie Wu and Mark Dredze. Beto, bentz, becas: The surprising cross-lingual effectiveness of BERT. In Kentaro Inui, Jing Jiang, Vincent Ng, and Xiaojun Wan (eds.), Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pp. 833–844. Association for Computational Linguistics, 2019. . URL https://doi.org/10.18653/v1/D19-1077. our card
  18. Zhilin Yang, Zihang Dai, Yiming Yang, Jaime G. Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. Xlnet: Generalized autoregressive pretraining for language understanding. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d'Alché-Buc, Emily B. Fox, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, 8-14 December 2019, Vancouver, BC, Canada, pp. 5754–5764, 2019. our card