Elamur Research

Finding Universal Grammatical Relations in Multilingual BERT

Paper · 2020 · Ethan A. Chi, John Hewitt and Christopher D. Manning

Summary

A system trained on text in many languages can sometimes use knowledge acquired in one language to solve a problem in another. This paper asks what makes that possible for grammar. Does Multilingual BERT, or mBERT, organize information about sentence structure in a similar way across languages? The authors look at dependency trees, which represent a sentence as connections between words. A noun may be linked to the adjective that describes it, for example, and a verb to its subject. The researchers use a structural probe, a small learned transformation of mBERT’s word vectors, to see whether the distances between the transformed vectors reflect the number of links on the path between words in a tree. The reference trees come from Universal Dependencies.

The experiments cover 11 languages. Probes trained and evaluated on the same language recover tree structure more accurately than the baselines. On average, the same-language probes improve by 22 points on undirected, unlabeled attachment score, which measures how many tree edges are recovered, and by 0.175 on a rank correlation that measures how well the probe orders word pairs by tree distance. The strongest results come from the 7th or 8th layer. The gains largely level off at a maximum probe rank of roughly 64 or 128, even though the original word vectors have 768 dimensions.

A probe trained on other languages can also recover part of the structure of the language it is tested on. Using the best single source for each target, identified after evaluation, improves attachment by 14 points on average over the stronger baseline. Pooling training data from every language except the target raises the average gain to 16 points. A joint probe that also receives target-language training data gains 19 points. The transfer experiments show that a transformation learned from annotated sentences in one language can pick up some of the same kinds of structural information in another.

The authors then ask whether the transformed vectors distinguish grammatical relationships as well as tree structure. They represent each annotated head–dependent link by subtracting the dependent’s transformed vector from the head’s. A visualization places many links from different languages in the same groups, and those groups often correspond to familiar categories such as nominal subjects or objects. The grouping also reveals distinctions within a category, such as whether an adjective comes before or after its noun. The probe learns from tree distances, while the relation labels are used to interpret the visualization. The result is qualitative evidence of shared grammatical distinctions. The experiments leave open how much transfer comes from shared pieces of words and whether mBERT relies on these distinctions when making predictions.

Deep dive: Finding Universal Grammatical Relations in Multilingual BERT

An investigation of how Multilingual BERT encodes dependency trees and which grammatical relations it represents similarly across languages. · about 34 minutes to read

The problem and its context

A shared system can still organize languages separately

Multilingual BERT assigns a contextual vector to each word occurrence. A word in a sentence thus has a representation that can reflect the words surrounding it. Pretraining teaches mBERT to recover masked text from context. A sentence may give clues about a missing word through its grammar, its meaning, or both. The training objective rewards using such clues successfully and leaves open how the system organizes them internally. Its starting point is the masked prediction approach introduced in BERT.

The authors begin from reports of cross-language success on tasks such as natural language inference and dependency parsing. Natural language inference concerns the relationship between statements, while dependency parsing identifies which words attach to which others in a sentence. Good transfer performance shows that knowledge acquired in one setting can help in another. An aggregate task score offers little detail about which information travels or which parts of the internal representation contain it. The paper addresses that question by examining the structure underlying dependency parsing.

Even with shared parameters across languages, the system could reserve different directions in its vectors for analogous facts about different languages. In that arrangement, grammatical information might be easy to read out in each language separately, yet a reader trained on one would need to learn a different mapping for the next. Another possibility is that the same directions carry some of the same information in several languages. A reader trained to recognize structural patterns in one language would then have some chance of recognizing them elsewhere. The difference is observable if the reader uses the same mapping throughout the transfer test.

The paper makes this comparison at the level of relationships within sentences. It asks whether the distance between two words in a reference tree can be estimated from their contextual vectors. An effective transformation for one language might make heads and dependents close and place words in distant branches farther apart. If the same transformation does this for a second language, the evidence concerns a shared way to read grammatical structure. The test can work with sentences drawn from separate corpora because each sentence has its own reference tree.

From predicting an annotation to examining a representation

Earlier research, as the authors describe it, used probes to test how much linguistic information trained systems acquire. A probe is a supervised predictor trained on representations produced by an existing system. It can be asked to recover an annotation such as a grammatical category or a syntactic relation. This makes explicit what the original training task leaves implicit. If the probe learns the task from contextual vectors, then those vectors supply information that helps predict the annotation. The paper draws on work on the transferability of contextual representations and on probing for sentence structure.

The structural probe the authors adopt asks a more specific question. It tries to learn a geometry in which word-to-word distances resemble the distances in an annotated tree. That gives the phrase “information about syntax” a concrete meaning. There should be a common transformation under which proximity reflects the organization of a sentence, including paths that pass through several grammatical attachments. The method originated in work on English that used the structural probe for word representations.

The multilingual setting adds a test that is unavailable when only one language is examined. Success with a separately trained probe for each language would establish that the procedure has access to structure in each case. Holding that probe fixed and changing the language tests whether part of that access is shared. The two questions need separate experiments. A probe can recover substantial structure for a language after seeing its annotated sentences even if the same mapping transfers poorly from a different language.

The paper also changes what the authors do after fitting the probe. Earlier analysis using this probe visualized individual sentence trees. Here the objects of interest are grammatical links collected from many sentences, sometimes across different languages. The authors compare the directions of the changes in position from dependents to heads. This lets them ask whether instances that linguists group under the same relation also occupy similar parts of the transformed space. The paper places this step alongside earlier work on the geometry of BERT.

Which kinds of similarity matter

The authors situate their study among several ways of measuring similarity across languages. Some prior research found that independently trained word spaces could be aligned geometrically. Other work extended geometric alignment to contextual word representations, including uses in zero-shot dependency parsing. Such studies raise a distinction between an alignment that can be learned and an alignment that is already present in the coordinates. A transformation learned on one language can, in principle, only be reused directly if some of the relevant information is already accessible in compatible coordinates. The paper discusses cross-lingual alignment of contextual word embeddings in this context.

Concurrent research described in the paper found that similar words in similar sentences already have approximately aligned representations across languages in mBERT. That evidence concerns similarity at the level of contextualized words and sentences. The structural probe asks whether a particular kind of information about the relationships between words is also accessible through a shared transformation. Approximate alignment of words of similar meaning and approximate alignment of grammatical structure are distinct questions. The authors discuss the former in connection with multilingual alignment of contextual word representations.

Earlier accounts also gave different reasons to expect overlap. The paper cites work finding a common subspace for useful cross-language information, as well as work separating language-specific and language-neutral components. It also describes an analysis attributing much of the similarity in the full representations to common sub-word tokens, or pieces of words. That explanation concerns a broader object than the compact space learned from tree distances. A full vector can be strongly shaped by the identity of its input tokens while a subset of its directions still carries structure that transfers. One starting point for this discussion is How Multilingual is Multilingual BERT?.

The second question in the paper concerns the taxonomy used to describe grammar. A supervised label probe can learn which vector patterns predict a pre-defined annotation. A grouping that emerges when each relation is visualized without using its label in training is a different form of evidence. It gives the analyst a chance to see boundaries that line up with the annotation scheme as well as distinctions that the scheme treats as variants of the same relation. The difference between teaching a probe to produce a label and inspecting what it distinguishes motivates the paper’s use of interpretability.

The method, step by step

Turn each tree into a set of distances

An annotated dependency tree places every sentence word in a structure headed by a root. In the tree analysis, a dependent is the word attached to another word, and its head is the word to which it attaches. An adjective modifying a noun gives a simple example. The adjective is the dependent and the noun is its head. The grammatical annotation can name the kind of connection, but for measuring distance the authors need only the path that connects two words.

Tree distance counts how many edges lie along that path. Direct neighbors have the shortest non-zero distance. A more distant pair may be connected through a common head or through a succession of other words. By following the tree, the route can link words that occur far from one another in the sentence. Conversely, adjacent words may attach elsewhere in the tree. The distinction matters because a predictor that mainly knows word order can approximate many attachments while still missing the distances imposed by grammar.

The authors use the training portion of parsed corpora to get these distances. A treebank contains sentences with grammatical annotations, so a training sentence brings both the text that mBERT processes and the reference structure used by the probe. The same tree gives examples of direct connections and longer paths. Those examples jointly constrain the transformation. The authors retain the relation names for the separate analysis of treebanks.

Learn one transformation for many sentences

The authors run sentences through the pretrained BERT-Base, Multilingual Cased checkpoint, which has 110M parameters. They take contextual vectors from a chosen layer. They then learn a matrix that converts those vectors from their original coordinates to a smaller set of coordinates. The probe is this learned matrix. Because the same matrix applies to each word occurrence in the training sentences, the probe has to find a common way to make the geometry fit many different trees.

The paper describes the rows of this matrix as defining a syntactic subspace. Each row gives a direction in the original representation. A transformed coordinate records the dot product between that row and a word vector. Together, the row directions pick out the part of the original representation that the probe uses. The transformed vector itself is expressed in the probe’s output coordinates. In the discussion that follows, calling it a point in the syntactic subspace is a shorthand for using those coordinates.

The transformation has limited capacity because it is linear and its maximum rank can be constrained. Rank bounds how many independent directions the probe can use. A small bound forces the probe to capture structural patterns using less of the original representation. Varying this bound tests how much extra room helps the probe. Changing the input layer asks a separate question, namely at which stage of processing the relevant geometric information is most readily accessible.

Here is the distance rule used by the probe.

d_B(hᵢˡ, hⱼˡ) = ‖Bhᵢˡ − Bhⱼˡ‖₂²

The superscript ˡ identifies the sentence. The subscripts i and j index words within it, and hᵢˡ and hⱼˡ are their contextual vectors at the chosen layer. The matrix B has k rows and m columns, where m is the input vector dimension, k is the number of output coordinates, and the entries are real numbers. Multiplying the vectors by B produces their transformed coordinates. The minus sign gives the displacement between those points. The norm with subscript ₂ measures its Euclidean length, and the superscript ² squares that length. The quantity d_B is the resulting predicted tree distance under B.

This choice of distance puts the training target and the prediction on a common footing. The tree supplies a count of edges between the words. The transformed points supply a squared length that the fitting procedure can make close to that count. Using the same formula for adjacent words and words separated by longer paths is important. The objective asks the geometry to reproduce the organization of the entire tree, beyond identifying the pairs that are directly connected. In the paper’s discussion, the target approximation is written as follows.

d_B(hᵢˡ, hⱼˡ) ≈ d_{Tˡ}(wᵢˡ, wⱼˡ)

Here B is the learned transformation and d_B its predicted squared distance. The vectors hᵢˡ and hⱼˡ describe the words wᵢˡ and wⱼˡ, indexed by i and j in sentence ˡ. The symbol Tˡ is that sentence’s reference tree, and d_{Tˡ} counts the edges on the path between the two words. The approximation sign expresses the aim of fitting the predicted distance to the reference count across many examples.

The researchers fit the matrix by gradient descent, which updates its entries to reduce the training objective. The loss sums the absolute errors in predicted distance across the training corpus, with a normalization for sentence length.

arg min_B ∑ₗ (1 / |sˡ|²) ∑ᵢ,ⱼ |d_{Tˡ}(wᵢˡ, wⱼˡ) − d_B(hᵢˡ, hⱼˡ)|

The expression arg min_B seeks the matrix B that gives the smallest objective. The outer sum ranges over training sentences indexed by l, written ˡ on the sentence-specific quantities. The symbol sˡ denotes a sentence and the bars around it give its length. The factor written as 1 divided by the squared length scales the total pairwise error for that sentence, so a sentence with more word pairs does not simply contribute a larger unnormalized sum. The inner sum ranges over the word indices i and j. The terms wᵢˡ and wⱼˡ are the words, and hᵢˡ and hⱼˡ are their contextual vectors. The function d_{Tˡ} gives the path length in the reference tree Tˡ. The function d_B gives its prediction. The bars around their difference take the absolute value of the error.

Normalizing by sentence length is part of how the objective balances the training examples. A longer tree provides many more pairs than a shorter one. Taking the average error over pairs within each sentence before accumulating it across sentences makes the sentence the unit of contribution. This is separate from the averaging procedure for the reported correlation, which gives each evaluated sentence length its own aggregate.

Decide which annotations the probe can see

The authors first train separate probes using annotated examples from each target language. This establishes what the method can recover when the training corpus matches the language being evaluated. They test all 12 layers and vary how much rank the matrix may use. For transfer, they change the composition of the probe’s training data while continuing to read vectors from mBERT. The source of the probe’s grammatical supervision is thus the element that changes between the transfer conditions.

In direct transfer, the probe is trained on one source language and then used on another. In holdout transfer, the training pool contains every studied language except the one being evaluated. In the joint condition, the authors concatenate training data from all the studied languages and evaluate using their combined validation data. The paper uses “all languages” for the languages in these experiments. It refers to a larger set when describing the corpora on which mBERT was pretrained.

The transfer is zero-shot with respect to target-language trees in the direct and holdout conditions. The target language can still be part of mBERT’s pretraining, and its sentences still produce the word vectors supplied to the trained probe. The intervention is to withhold target-language tree supervision from the matrix fit. This is what makes reuse of the matrix informative about the compatibility of the representations.

Use the learned coordinates to examine grammatical relations

The second part of the study takes annotated head–dependent pairs and analyzes their transformed vectors. The annotations identify the words to compare. The relation name attached to each pair is reserved for interpreting the result. The researchers exclude the root word from these pairs because its attachment is to a special root symbol, rather than to another word with a contextual vector in the sentence.

For each remaining dependent, the authors compute a displacement from its vector to its head’s vector. Because the probe’s transformation is linear, they can subtract the original vectors and then transform the difference. The result is the same displacement they would obtain by transforming both vectors before subtracting. In this step, the order matters. Reversing head and dependent would reverse the vector. By following a consistent convention, the analysis can compare displacements across sentences and languages.

v_diff = B(h_head − h_dep)

The quantity v_diff is the relation vector, with one coordinate for every output row of the learned matrix B. The symbols h_head and h_dep are the original contextual vectors for the head and the dependent. The subtraction gives the displacement pointing from the dependent toward the head in the original coordinates, and B transforms that displacement into the coordinates used for the analysis.

The distance training puts a constraint on the length of such a vector. A head and its dependent are directly connected in the tree, and the count that the probe tries to reproduce is the same for each direct edge. The authors express the corresponding expectation for the vector’s length as an approximation.

‖v_diff‖₂ ≈ 1

Here v_diff is the transformed displacement for an annotated head–dependent pair. The subscript ₂ denotes its Euclidean norm. The approximation sign indicates a target implied by distance training, and 1 is the distance associated with a direct edge and the corresponding target for the norm. This constraint leaves room for the vectors of different edges to point in different directions. In particular, it supplies no target direction for subjects, objects, or modifiers.

The relation analysis uses 32-dimensional probe spaces. The authors choose this smaller dimension to emphasize syntactic information more strongly and to follow the guidance they cite for the visualization technique. They then use t-SNE to place the relation vectors on a two-dimensional plot. The technique is used here to display which instances form visible neighborhoods. The figures add colors from the reference annotations so the reader can see whether neighboring instances share a grammatical category.

This analysis uses several sources of probe supervision. English and French links can be displayed together using an English-trained transformation. Spanish links can be displayed using a transformation trained on the other languages. In the joint analysis, links from all the studied languages are transformed with the same matrix, learned from their pooled data. These views help distinguish what can be seen after training on a particular target language from what carries over when that language’s trees were absent from probe training.

From a sentence to tree distances and relation groups

The steps in order.

From a sentence to tree distances and relation groupsStep 1: Read contextual word vectors from a chosen layer1. Read contextual word vectors from a chosen layerStep 2: Count paths in annotated training trees2. Count paths in annotated training treesStep 3: Fit a linear transformation to tree distances3. Fit a linear transformation to tree distancesStep 4: Evaluate distances and recover undirected tree edges4. Evaluate distances and recover undirected tree edgesStep 5: Transform differences between heads and dependents5. Transform differences between heads and dependentsStep 6: Map relation vectors into two dimensions6. Map relation vectors into two dimensionsStep 7: Color points by reference relation labels7. Color points by reference relation labels

The two branches of the analysis use the transformed coordinates for different purposes. The quantitative branch asks how well distances agree with the reference and how many tree edges can be recovered. The visual branch starts from the reference edges and asks how comparable those edges look when encoded as vectors. In particular, errors in a reconstructed tree do not determine which pairs the authors plot. The authors released code for reproducing the experiments under the repository name multilingual-probing-visualization, which also includes an interface for viewing the relation vectors.

Experiments and results

Corpora, comparisons, and scores

The pretraining corpora cover 104 languages, and the probe experiments cover 11. The authors use annotated corpora in the v2 formalism described in Universal Dependencies v2. The common scheme allows a similar tree-distance task to be run in each language and gives the relation analysis a shared set of labels to consult.

The Arabic and Chinese corpora are Arabic-PADT and Chinese-GSD. The Czech and English corpora are Czech-PDT and English-EWT. For Farsi and Finnish, the authors use Persian-Seraji and Finnish-TDT. The French and German corpora are French-GSD and German-GSD. Indonesian is represented by Indonesian-GSD, Latvian by Latvian-LVTB, and Spanish by Spanish-Ancora.

The Linear baseline makes a chain by joining words in their reading order. It is a test of how much the evaluation rewards an analysis based on position alone. Since some grammatical attachments connect neighboring words, a chain can recover real edges without having to identify the syntactic roles of words. The same chain also implies distances for pairs farther apart, giving the study a positional comparison for the distance metric.

The mBERTRand baseline keeps mBERT’s sub-word embeddings and positional encodings and reinitializes the contextual attention layers. The new parameter values are drawn from a normal distribution with the mean and variance of the original parameters. This comparison gives the structural probe access to inputs with lexical and positional information and to representations produced by a network with the same parametrization. The authors take the comparison vectors from Layer 7 because they find that changing the baseline layer makes little difference. Their design retains the lexical information associated with subword tokenization.

The paper evaluates both the graph obtained from the distances and the ordering of the distances themselves. For the graph, the authors form an undirected minimum spanning tree. The predicted distances are the costs of joining pairs of words. The procedure picks a set of edges that connects the words without cycles and minimizes the total cost. The resulting undirected, unlabeled attachment score, or UUAS, measures the percentage of reference edges recovered when the direction and grammatical category of an attachment are ignored. This makes the metric suitable for a predictor based on symmetric distances.

For distance evaluation, DSpr. is a Spearman correlation between predictions and reference distances. A rank correlation checks whether predicted distances put pairs in approximately the same order as the reference. It can therefore distinguish between a system that merely makes true edges cheap and one that also tends to put shorter paths ahead of longer paths. The authors evaluate DSpr. on sentences of lengths 5 to 50. They first aggregate the correlations for sentences of a given length and then average the length-level results.

The metrics offer complementary views of the same fitted probe. A minimum spanning tree needs to recover connections between adjacent nodes in the reference graph. It can do well if those connections consistently have low cost, even if other predictions sort longer paths poorly. Distance correlation depends on the ordering of more pairs and can reveal whether a probe learns the wider geometry of the tree. A high correlation by itself still leaves room for errors in the placement of individual edges.

Recovery with same-language supervision

With training and evaluation in the same language, the authors report an average improvement of 22 points in UUAS and 0.175 in DSpr. The comparison is with the stronger of the baselines for each language, instead of a fixed weak comparator across the full set. The improvement on both scores gives evidence that the learned transformation helps the probe recover immediate attachments and place more distant word pairs in a more appropriate order.

The authors report stronger attachment results for the group they call Western European, which consists of Czech, English, French, German, and Spanish. The average difference in absolute UUAS between this group and the remaining languages is 9.3 points. The difference in improvement over the baseline is 6.7 points. The distance-correlation comparison is smaller in absolute terms at 0.041 DSpr., and the difference in gains relative to baseline is -0.013. Accordingly, the finding is more pronounced when the task is evaluated as recovery of edges than when it is evaluated as ordering tree distances.

Recovering trees from the intermediate layers is generally more successful than doing so from other layers. The authors identify the 7th or 8th layer as the best choice across the languages they examine. Gains also flatten when the probe’s maximum rank reaches roughly 64 or 128. The original vectors have 768 dimensions, so the fit can recover much of the measured tree structure using a relatively compact transformation. The authors compare this pattern to earlier results for an equivalently sized English checkpoint tested on the Penn Treebank.

Transfer and a joint probe

The direct-transfer comparison reports the best single training language for each evaluation language. The best source is chosen after inspecting performance, so the result expresses what is available among the tried sources. Its average improvements over the stronger baselines are 14 points UUAS and 0.128 DSpr. These gains show that a matrix can carry structural information from another language, even though the useful choice of source may vary with the target.

The holdout condition pools tree annotations from all studied languages except the target. Its average gain is 16 points UUAS and 0.137 DSpr. This condition gives the probe examples of several languages while keeping every target-language tree out of training. The joint AllLangs condition includes the target language and yields an average improvement of 19 points UUAS and 0.156 DSpr. The joint result shows how well one common transformation can serve the different languages when its training data cover them all.

Mean gain over the stronger baseline on Universal Dependencies, by probe training setting

Pooling other languages improves attachment over the best single source, and target-language supervision yields the largest gain.

Mean gain over the stronger baseline on Universal Dependencies, by probe training settingBest single source, chosen after evaluation: 14Best single source, chosen afterevaluation14Other languages pooled: 16Other languages pooled16All languages pooled: 19All languages pooled19Evaluation language only (this paper): 22Evaluation language only (this paper)22
The numbers
System or settingUUAS points
Best single source, chosen after evaluation14
Other languages pooled16
All languages pooled19
Evaluation language only (this paper)22

Mean distance-correlation gain over the stronger baseline on Universal Dependencies

The same ordering of training settings appears when the probe is evaluated on distances across the tree.

Mean distance-correlation gain over the stronger baseline on Universal DependenciesBest single source, chosen after evaluation: 0.128Best single source, chosen afterevaluation0.128Other languages pooled: 0.137Other languages pooled0.137All languages pooled: 0.156All languages pooled0.156Evaluation language only (this paper): 0.175Evaluation language only (this paper)0.175
The numbers
System or settingDSpr.
Best single source, chosen after evaluation0.128
Other languages pooled0.137
All languages pooled0.156
Evaluation language only (this paper)0.175

The paper also expresses transfer gains as a share of the gain achieved with same-language supervision. Under this comparison, the report gives 62.3% for UUAS and 73.1% for DSpr. for the post hoc best single source. The holdout condition retains, on average, 70.5% of the UUAS gain and 79% of the DSpr. gain. The joint condition accounts for 88% of the UUAS gain and 89% of the DSpr. gain. These quantities refer to improvements over baseline, so their interpretation differs from the fraction of edges recovered or the correlation score itself.

The comparison answers two related questions. Direct and holdout transfer show that a probe can learn coordinate directions useful to another language without its annotated trees. The joint result shows that a common matrix can accommodate the studied languages together and approach the gains of fitting them separately. The remaining gap gives a sense of what is lost when the probe is shared under these training choices. The scores alone leave the origin of that gap open, including characteristics of the languages, differences among the corpora, and the amount and composition of the probe’s training data.

What the relation plots show

In the English and French visualization, the authors use a transformation trained on English tree distances and display links from both languages. Several recognizable annotation categories form groups with examples from both corpora. The Spanish holdout view shows visible grammatical distinctions after applying a probe trained on the other languages. In the joint view, the authors plot 100,000 relation vectors from the studied languages. They exclude punctuation and display the top 11 remaining relations, which account for 79.36% of the dependencies in the dataset.

The plots give evidence at the level of individual grammatical distinctions. Nominal subject and direct object generally occupy distinct regions. Examples annotated as indirect object tend to group with direct objects. The authors also observe that oblique nominals near the beginning of a sentence commonly appear among subjects, while examples elsewhere more frequently appear near objects. These examples show where grammatical function and position can both matter in the same plot. The relevant annotations include the nominal subject, object, indirect object, and oblique nominal.

The authors find a clear positional distinction among adjective modifiers. A Chinese example has its adjective before the noun, while the French phrase applications domestiques has the adjective after the noun. The plot separates these orderings even though the annotation assigns both to the same category. The examples therefore illustrate a regularity in the representation that the treebank records under a common label, the adjectival modifier.

The determiner examples show several other distinctions. Definite articles, indefinite articles, possessives, and demonstratives form different groups. Definite articles at the beginning of a sentence also separate from other definite articles. The first set of boundaries divides forms with different functions. The second picks out sentence position within a narrower kind of word. Both appear within the annotation category for determiners.

Other clusters bring together examples with different annotation labels. The authors discuss relative pronouns such as who in the man who is hungry alongside subordinating markers such as that in I know that she saw me. In these examples the former has a subject annotation and the latter a marker annotation. The visualization places the examples together and apart from much of the material carrying either annotation. This is a case where an inferred grouping crosses the boundary between a subject and a marker.

Negative modifiers such as English not and Chinese 不 also appear together apart from much of the rest of the adverbial material. The paper notes that earlier dependency schemes gave negation a separate label that was removed in v2. The authors identify expletive subjects as another recognizable group, illustrated by it in It is cold and il in Il faudrait. This group corresponds to a distinction the current annotation scheme does make. Together with the adjective and determiner examples, these cases show several kinds of correspondence between the plotted groups and the taxonomy, including subdivisions within the adverbial modifier.

What the ablations show

How much of a layer is needed

The layer and rank sweeps vary different aspects of the probe. The layer sweep changes where the word vectors come from while retaining the structural objective and using a maximum probe rank of 128. The authors report that the 7th or 8th layer usually exposes the most recoverable tree structure. For this particular readout, the location in the network matters. A single score from the final representation would leave that variation unobserved.

The rank sweep varies the maximum dimensionality of the transformation, with results for selected languages displayed at Layer 7. At small ranks, the probe has fewer independent directions available to make a common geometry fit many different sentences. The comparison asks how much more tree structure becomes accessible as that restriction is relaxed. The leveling off around 64 or 128 suggests that raising the capacity beyond that range contributes little to UUAS under the tested conditions.

These interventions are on the readout. A good fit with a compact matrix means that the data used to evaluate the probe are compatible with a relatively small set of useful directions. That finding is distinct from measuring how many dimensions mBERT needs to predict words or how it distributes information that the tree-distance objective overlooks. The rank comparison reveals how economically the probe can access the tested structure.

Transfer tracks the geometry of separately fitted spaces

The paper compares transfer against a direct geometric measure of similarity. The authors fit a probe for each language and compute the mean principal angle between pairs of learned subspaces. Principal angles compare directions in two spaces, beginning with the directions that align most closely and continuing through the available dimensions of comparison. A smaller average angle indicates that useful directions in one subspace are closer to the directions available in the other.

For a given target, the authors rank possible source languages by how well their probes transfer. They also rank them by the closeness of their fitted subspaces to the target’s fitted subspace, orienting the orderings so that a closer subspace can be compared with a better transfer result. They then correlate the rankings and average across targets. The reported mean Spearman correlation is 0.78 when transfer performance is measured by UUAS and 0.82 when it is measured by DSpr.

This analysis connects two observations that might have come apart. A probe trained on one language sometimes gives useful distances in another. Separately fitted probes for two languages also sometimes select nearby directions. The ranking comparison shows that these relationships tend to occur together. It gives a quantitative connection between overlap of the fitted spaces and successful transfer, over and above the gains measured for the pooled training settings.

There is an important distinction between computing this diagnostic and using a held-out probe. To find an angle to the target language’s fitted space, the analysis needs a probe trained for that target. The angle is therefore a way to describe the experiments after the fact. The transfer result itself comes from applying the source probe to target sentences with its matrix fixed.

Adjective order as an extrapolation test

Changing languages usually changes many things at once, from the words in the sentences to their grammatical distribution. The adjective experiment narrows the question to a particular attachment. Some languages in the dataset place an adjective before its noun in almost all examples, while others predominantly put it after the noun. The authors train probes on languages where the majority ordering accounts for greater than 95% of all adjectives. They then look at adjective attachments in French, including those with the opposite order to the one favored by the training language.

French is useful for this comparison because both orders occur in its corpus, with 69.8% of adjectives classified as prenominal. A separate test language for each order would change both the order and the target corpus, making it harder to interpret a difference in score. Keeping French fixed lets the authors compare the two edge categories against the same broad target-language background.

The authors find no significant difference in accuracy between the two evaluation orders for either group of training languages. On average, postnominal French adjective edges score approximately 2 points higher than prenominal edges for both groups. Changing the dominant source ordering therefore does not produce a corresponding reversal in which order is more accurately recovered. The ability to recover the attachment extends beyond the pattern the probe sees most often in its source language.

This result fits with the two adjective clusters in the visualization. The distance probe can make both variants legible as attachments, while the displacement vectors can still distinguish which side of the noun the adjective occupies. The criteria for the two findings differ. For attachment, the probe needs to make the adjective and noun sufficiently close. To form different visual groups, their displacements just need to vary in a consistent way. An order distinction can therefore be present in the relation geometry without preventing transfer of the edge prediction.

What makes the relation plots clearer

The appendix compares the English and French visualization from pretrained mBERT with one built using mBERTRand. For the randomized comparison, both the relation vectors and the English-trained probe come from the randomized system. Clusters near the edges of the plot are mostly tied to individual words. The paper gives English for and French pour as examples of forms that gather separately even though their uses can be parallel. Correspondence across languages is much weaker in this view.

This comparison helps identify what the original visualization gains from the pretrained contextual weights. The randomized version still receives the same kind of tree-distance supervision for its projection, and its inputs retain word-piece and positional information. It can show structure associated with particular words. The more coherent grammatical groupings of the pretrained case suggest that the learned contextual representations make a difference to how readily similar functions can be brought together.

The authors also change each of the two dimensionality-reduction stages in turn. In the first comparison, they keep the 32-dimensional syntactic transformation and replace the final t-SNE view with principal component analysis, or PCA. PCA finds linear combinations of coordinates that account for variation in the points. The resulting two-dimensional display shows no clear trends of the sort visible in the main t-SNE plot. A linear view of the dominant variation can thus make the categories much harder to see.

In the second comparison, PCA replaces the structural probe as the initial way to get a 32-dimensional representation. The authors then use t-SNE as before. Broad groups and some finer distinctions, such as the distinction between common nouns and pronouns, remain visible. The comparison shows that a useful part of the pattern is accessible without a transformation trained on tree distances. It also shows where using such a transformation appears to help.

In the initial-PCA view, nominal subjects and objects overlap more. Postnominal adjectives separate into several groups dominated by individual languages, where the projection fitted to tree distances gave a more coherent group. The authors also observe small monolingual clusters with little common grammatical content, especially for Chinese, Arabic, Farsi, and Indonesian. At the same intermediate dimension and with the same type of display, the structure-guided projection produces a clearer picture of several multilingual grammatical relationships.

For selected English and French examples, the authors vary t-SNE’s perplexity, a setting that affects how the display balances smaller and larger neighborhoods. They show perplexity settings of 5, 10, 30, and 50. The visible cross-language groupings persist across those settings. This is a check on whether a particular visualization owes its broad pattern to one choice of hyper-parameter. The contrast with PCA also shows that the readability of the resulting plot depends on how the high-dimensional relationships are displayed.

Limitations

Limits the authors identify

The authors distinguish finding shared structure from establishing the reason that it is shared. Some languages use common pieces of words in mBERT’s vocabulary. The experiments cannot determine, for every language pair, how much transfer comes from those shared pieces and how much comes from a more general use of shared parameters. The authors observe transfer even for pairs with minimal sub-word overlap and cite other studies finding transfer without overlap. This supports the possibility of transfer through other mechanisms while leaving its sources unresolved for particular pairs. One comparison they discuss is Cross-Lingual Ability of Multilingual BERT.

The evidence about dependency labels is qualitative. The authors color points by reference labels and inspect the groups. They do not report a numerical measure of agreement with the taxonomy or test whether a clustering rule assigns unlabeled edges to categories on held-out data. The perplexity comparison addresses the persistence of selected visual patterns. It cannot establish a rate of correct assignment or a measure of how many instances of each relation form a stable group.

The authors also distinguish accessibility from causal use. The probe can find a transformation that makes tree distances legible and that exposes some regularities among relation vectors. The experiment leaves open whether the same directions influence mBERT’s own predictions. Demonstrating a causal role would require evidence about what happens to its behavior when the relevant internal information is changed. The paper limits its claim to what the learned representation makes accessible.

The sample of languages is constrained by the availability of sufficiently large treebanks and by inclusion in multilingual pretraining. The authors sought variety across language families and included some closer pairs for comparison. They explicitly say that the selection is not representative of all human languages. Consequently, “universal” in this study refers to evidence for recurring grammatical distinctions across the tested languages. The experiments leave the breadth of those distinctions in other languages and multilingual checkpoints open.

The authors further note that UUAS can be perfect even if longer distances are poorly represented. Keeping the costs of reference edges below the costs of competing edges can suffice to recover a tree. That is why they supplement attachment with rank correlation. A correlation examines a larger part of the geometry, although its focus on order means that it can also tolerate errors in the numerical scale of the predicted distances.

Limits implied by the setup

Zero-shot transfer in this paper concerns annotated trees available to the probe. All the evaluation languages are among those on which mBERT was pretrained. A useful mapping from an annotated source to one of these targets therefore establishes transfer within a multilingual representation that already processes the target language. The experiments provide no direct comparison with a target omitted from pretraining. This distinction matters when interpreting the result as evidence about what kinds of exposure allow grammatical information to transfer.

The best-source result also depends on inspection of evaluation performance. It answers whether the collection contains a source language whose probe transfers well to a given target. It leaves the practical question of how to choose that source for an unevaluated target open. The holdout setting avoids selecting a single best source by using the pooled data. Its comparison with single-source transfer also changes the amount and mixture of training material, so the gain cannot by itself isolate the effect of language diversity from that of additional examples.

The relation analysis has access to the gold heads and dependents. This gives the authors a way to ask whether known edges form meaningful groups independently of mistakes in reconstructing a tree. It also means that discovering groups in the plots does not demonstrate how accurately the whole procedure would find and label edges in sentences without annotations. A full labeled parsing evaluation would have to account for both kinds of decision. UUAS only evaluates the undirected attachments, and the visual analysis only examines pairs supplied by the reference trees.

The shared annotation scheme is part of the measurement. It makes cross-language comparison possible by specifying how trees and relation categories should be annotated. The probe learns the distances implied by that scheme, and the reference labels give the authors names for interpreting the plots. The resemblance between groups and labels is interesting because the label identities stay out of the training objective. It is still a comparison made within corpora constructed according to grammatical annotation conventions. The groups cannot serve as an independent test of every choice in that framework.

The adjective experiment supplies a controlled comparison within one target language and one kind of attachment. Its majority-order criterion also allows a minority of examples in the other order in the source. The result shows generalization beyond the dominant pattern in the probe’s training data. It gives less purchase on what would happen for a syntactic construction with no source examples at all, or on whether the same degree of generalization would apply to unrelated grammatical phenomena.

Finally, the plots suggest several influences on where a pair lands. The authors see effects associated with grammatical role, word order, position in the sentence, and lexical identity. Their examples identify and describe these patterns. The visualization alone cannot quantify their independent contributions. The paper’s strongest empirical claim therefore concerns transfer of tree structure, which it measures explicitly. Its claims about the organization of grammatical relations are supported by the visible groups and by the controlled comparisons of representations and plotting procedures.

What came after

Later papers that cite this study take up several parts of its question. Some examine how multilingual representations are organized, others bring syntax into cross-language tasks, and others develop causal or behavioral ways to study grammar. The citation establishes a connection between the papers. Their research topics identify the questions they pursue, while the details of whether they reuse the structural probe, its training data, or its relation-vector analysis are sometimes unspecified.

One line of work asks how much of a multilingual representation is shared. The paper on language neutrality concerns the boundary between information associated with a particular language and information accessible across languages. That question is broader than the recovery of tree distances. In the original study, a useful shared space is defined through a grammatical objective. A study of neutrality can ask about the organization of multilingual representations more generally, as in On the Language Neutrality of Pre-trained Multilingual Representations.

A related paper puts alignment and prediction at the center of the problem of explaining mBERT’s cross-language ability. The distinction matters for the structural probe because its success requires a fixed matrix to be useful across languages, while the original system was pretrained to predict masked text. Studying alignment alongside prediction treats their relationship as a question in its own right. That is the connection to First Align, then Predict.

Another paper takes up the geometry of multilingual representations directly. The structural probe defines one geometry through an externally chosen target, the path lengths in a syntax tree. A broader geometric investigation asks how multilingual representations themselves are arranged. It extends the subject beyond one grammatical readout, while sharing the premise that the arrangement of representations is evidence about cross-language structure. This is the focus of The Geometry of Multilingual Language Model Representations.

Work on syntax-augmented multilingual BERT brings syntax into the design of a system for cross-language transfer. The original paper’s experiments investigate how much structure is already accessible through a transformation of pretrained vectors. Augmentation puts grammatical information into the system being studied and frames the question around its use in transfer. The related parsing line also considers language-specific subnetworks, taking language-specific structure as a design concern in a task where annotated resources can be limited. These are the respective focuses of Syntax-augmented Multilingual BERT for Cross-lingual Transfer and Cross-Lingual Transfer with Language-Specific Subnetworks for Low-Resource Dependency Parsing.

Later probing work broadens the type of linguistic information under examination. Morphosyntax concerns how the forms of words relate to their grammatical roles and combinations. The earlier distance probe focuses on links and paths between words. A morphosyntactic probe brings word form into the question of which linguistic information is accessible. This is the stated scope of Morphosyntactic probing of multilingual BERT.

A separate line takes up the question of causal influence. Syntactic agreement concerns correspondence in grammatical features between words, as between a subject and its verb. A causal study of agreement asks which internal mechanisms help produce that behavior. This is a more specific behavioral target than the overall recovery of a dependency tree. It directly connects to the question left open by the structural probe about whether the regularities that are available to an external reader take part in a prediction. That relationship is the focus of Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Models.

Multilingual grammatical benchmarks offer a further way to study accessible structure. A minimal-pair benchmark uses closely matched sentences to test a targeted contrast in behavior. Dependency probes instead use distances derived from annotated trees, with success defined through attachment or distance ordering. Both approaches make a grammatical question precise, but they place the measurement at different points, one on behavior towards sentence contrasts and the other on what can be recovered from individual word vectors. The benchmark direction appears in MultiBLiMP 1.0.

Cite

Cite as Ethan A. Chi, John Hewitt and Christopher D. Manning. 2020. Finding Universal Grammatical Relations in Multilingual BERT. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.acl-main.493 · arXiv 2005.04511

@inproceedings{chi2020finding,
  title = {{Finding Universal Grammatical Relations in Multilingual BERT}},
  author = {Ethan A. Chi, John Hewitt and Christopher D. Manning},
  booktitle = {Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.493},
  eprint = {2005.04511},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/2020.acl-main.493}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/chi-2020-finding-universal-grammatical-relations-multilingual/

References

31 references, from the paper's own bibliography.

  1. Steven Cao, Nikita Kitaev, and Dan Klein. 2020. Multilingual alignment of contextual word representations (https://openreview.net/forum?id=r1xCMyBtPS). In International Conference on Learning Representations. our card
  2. Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Unsupervised cross-lingual representation learning at scale. arXiv preprint arXiv:1911.02116. our card
  3. Alexis Conneau, German Kruszewski, Guillaume Lample, Loïc Barrault, and Marco Baroni. 2018. What you can cram into a single $&!#* vector: Probing sentence embeddings for linguistic properties (https://doi.org/10.18653/v1/P18-1198). In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, pages 2126–2136. our card
  4. Alexis Conneau and Guillaume Lample. 2019. Cross-lingual language model pretraining (http://papers.nips.cc/paper/8928-cross-lingual-language-model pretraining.pdf). In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 7059–7069. Curran Associates, Inc. OpenAlex ↗ · Scholar ↗
  5. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4171–4186. our card
  6. John Hewitt and Percy Liang. 2019. Designing and interpreting probes with control tasks (https://www.aclweb.org/anthology/D19-1275). In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). our card
  7. John Hewitt and Christopher D. Manning. 2019. A structural probe for finding syntax in word representations (https://nlp.stanford.edu/pubs/hewitt2019structural.pdf). In North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL). our card
  8. Karthikeyan K, Zihan Wang, Stephen Mayhew, and Dan Roth. 2020. Cross-lingual ability of multilingual bert: An empirical study (https://openreview.net/forum?id=HJeT3yrtDr). In International Conference on Learning Representations. our card
  9. Sneha Kudugunta, Ankur Bapna, Isaac Caswell, and Orhan Firat. 2019. Investigating multilingual NMT representations at scale (https://doi.org/10.18653/v1/D19-1167). In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). our card
  10. Guillaume Lample and Alexis Conneau. 2019. Cross-lingual language model pretraining. arXiv preprint arXiv:1901.07291. OpenAlex ↗ · Scholar ↗
  11. Guillaume Lample, Alexis Conneau, Marc'Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. 2018. Word translation without parallel data (https://openreview.net/forum?id=H196sainb). In International Conference on Learning Representations. our card
  12. Xiang Lisa Li and Jason Eisner. 2019. Specializing word embeddings (for parsing) by information bottleneck (https://www.aclweb.org/anthology/D19-1276). In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). OpenAlex ↗ · Scholar ↗
  13. Jindřich Libovickỳ, Rudolf Rosa, and Alexander Fraser. 2019. How language-neutral is multilingual bert? arXiv preprint arXiv:1911.03310. OpenAlex ↗ · Scholar ↗
  14. Nelson F. Liu, Matt Gardner, Yonatan Belinkov, Matthew E. Peters, and Noah A. Smith. 2019. Linguistic knowledge and transferability of contextual representations (https://www.aclweb.org/anthology/N19-1112). In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. our card
  15. Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. 1993. Building a large annotated corpus of English: The Penn Treebank (https://www.aclweb.org/anthology/J93-2004). Computational Linguistics, 19(2):313–330. our card
  16. Rowan Hall Maudslay, Josef Valvoda, Tiago Pimentel, Adina Williams, and Ryan Cotterell. 2020. A tale of a probe and a parser. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  17. Julian Michael, Jan A. Botha, and Ian Tenney. 2020. Asking without telling: Exploring latent ontologies in contextual representations. arXiv preprint arXiv:2004.14513. OpenAlex ↗ · Scholar ↗
  18. Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Jan Hajič, Christopher D Manning, Sampo Pyysalo, Sebastian Schuster, Francis Tyers, and Daniel Zeman. 2020. Universal dependencies v2: An evergrowing multilingual treebank collection. In Proceedings of the Twelfth International Conference on Language Resources and Evaluation. our card
  19. Telmo Pires, Eva Schlinger, and Dan Garrette. 2019. How multilingual is multilingual BERT? (https://doi.org/10.18653/v1/P19-1493) In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. our card
  20. Emily Reif, Ann Yuan, Martin Wattenberg, Fernanda B Viegas, Andy Coenen, Adam Pearce, and Been Kim. 2019. Visualizing and measuring the geometry of bert. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8592–8600. our card
  21. Tal Schuster, Ori Ram, Regina Barzilay, and Amir Globerson. 2019. Cross-lingual alignment of contextual word embeddings, with applications to zero-shot dependency parsing. arXiv preprint arXiv:1902.09492. our card
  22. Jasdeep Singh, Bryan McCann, Richard Socher, and Caiming Xiong. 2019. BERT is not an interlingua and the bias of tokenization (https://www.aclweb.org/anthology/D19-6106). In Proceedings of the 2nd Workshop on Deep Learning Approaches for Low-Resource NLP (DeepLo 2019). OpenAlex ↗ · Scholar ↗
  23. Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019a. BERT rediscovers the classical NLP pipeline (https://www.aclweb.org/anthology/P19-1452). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. our card
  24. Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R Thomas McCoy, Najoung Kim, Benjamin Van Durme, Sam Bowman, Dipanjan Das, and Ellie Pavlick. 2019b. What do you learn from context? probing for sentence structure in contextualized word representations (https://openreview.net/forum?id=SJzSgnRcKX). In International Conference on Learning Representations. our card
  25. L.J.P. van der Maaten and G.E. Hinton. 2008. Visualizing high-dimensional data using t-sne. Journal of Machine Learning Research, 9:2579–2605. OpenAlex ↗ · Scholar ↗
  26. Yuxuan Wang, Wanxiang Che, Jiang Guo, Yijia Liu, and Ting Liu. 2019. Cross-lingual BERT transformation for zero-shot dependency parsing (https://doi.org/10.18653/v1/D19-1575). In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). our card
  27. Martin Wattenberg, Fernanda Viégas, and Ian Johnson. 2016. How to use t-sne effectively. Distill, 1(10):e2. OpenAlex ↗ · Scholar ↗
  28. Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference (http://aclweb.org/anthology/N18-1101). In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1112–1122. Association for Computational Linguistics. our card
  29. Shijie Wu, Alexis Conneau, Haoran Li, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Emerging cross-lingual structure in pretrained language models. arXiv preprint arXiv:1911.01464. our card
  30. Shijie Wu and Mark Dredze. 2019. Beto, bentz, becas: The surprising cross-lingual effectiveness of BERT. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 833–844. our card
  31. Daniel Zeman, Jan Hajič, Martin Popel, Martin Potthast, Milan Straka, Filip Ginter, Joakim Nivre, and Slav Petrov. 2018. CoNLL 2018 shared task: Multilingual parsing from raw text to universal dependencies (https://doi.org/10.18653/v1/K18-2001). In Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies, pages 1–21. our card