Abstract
Recent work has found evidence that Multilingual BERT (mBERT), a transformer-based multilingual masked language model, is capable of zero-shot cross-lingual transfer, suggesting that some aspects of its representations are shared cross-lingually. To better understand this overlap, we extend recent work on finding syntactic trees in neural networks' internal representations to the multilingual setting. We show that subspaces of mBERT representations recover syntactic tree distances in languages other than English, and that these subspaces are approximately shared across languages. Motivated by these results, we present an unsupervised analysis method that provides evidence mBERT learns representations of syntactic dependency labels, in the form of clusters which largely agree with the Universal Dependencies taxonomy. This evidence suggests that even without explicit supervision, multilingual masked language models learn certain linguistic universals.
Introduction
Multilingual BERT (mBERT) has become a cornerstone of modern Natural Language Processing, demonstrating a remarkable ability for "zero-shot" transfer—where a model trained on a task in one language (e.g., English) performs surprisingly well on another (e.g., Hindi or French) without further training. This capability raises a fundamental question: does mBERT simply rely on massive lookup tables for its 104 supported languages, or does it develop a deeper, shared understanding of linguistic structure? This research investigates whether mBERT learns a cross-lingual representation of syntax—the rules governing sentence structure—and if these representations align across diverse languages.
Methodology: Structural Probing
To investigate mBERT's internal syntax, the authors utilize a technique called structural probing. This method seeks a linear transformation (a matrix $B$) that projects mBERT’s 768-dimensional word vectors into a lower-dimensional "syntactic subspace." The objective is to ensure that the squared $L_2$ distance between projected word vectors approximates their distance in a formal dependency tree (the number of "hops" between words in a sentence diagram).
The study evaluates mBERT on 11 diverse languages from the Universal Dependencies (UD) v2 dataset, including Arabic, Chinese, English, Farsi, Finnish, French, German, Indonesian, Latvian, and Spanish. By training a probe on one language and testing it on another, the researchers can determine if the syntactic "geometry" is shared across the model's multilingual representations.
Syntactic Information in Middle Layers
The analysis reveals that syntactic information is not spread randomly throughout mBERT; it resides in a relatively small subspace, typically between 64 and 128 dimensions. Furthermore, the accuracy of syntactic recovery varies significantly by layer.
As shown in the figure above, the "sweet spot" for syntactic information is found in layers 7 and 8 of the 12-layer model. Lower layers likely focus on surface-level lexical patterns, while the highest layers become specialized for the masked language modeling objective used during training. In these middle layers, structural probes achieved an average improvement of 22 points in Unlabeled Attachment Score (UUAS) over baselines across all 11 languages.
Emergent Universal Grammatical Relations
The most striking finding is the emergence of universal grammatical categories within the syntactic subspace. By taking the "difference vector" between a head word (e.g., a verb) and its dependent (e.g., a subject) and visualizing them using t-SNE, the researchers observed that mBERT naturally clusters similar grammatical relations together across different languages.
Even without explicit supervision on linguistic labels, mBERT's internal geometry aligns with Universal Dependency categories like nominal subjects (nsubj) and direct objects (obj). Interestingly, the model often makes finer distinctions than standard human taxonomies. For instance, it creates separate clusters for adjectives based on whether they appear before or after a noun (prenominal vs. postnominal), as seen in clusters (i) and (b) in the visualization. This suggests that mBERT is highly sensitive to how word order interacts with grammar.
Conclusion and Limitations
The evidence suggests that mBERT learns a shared, universal geometry for syntax that facilitates cross-lingual transfer. Probes trained on one language can recover roughly 62-70% of the syntactic structure in a completely different language, and the geometric similarity between language subspaces correlates strongly with transfer performance.
However, some limitations remain. While the cross-lingual overlap is evident even between different scripts, some similarity might be attributed to shared subword tokens. Additionally, while the clustering is visually compelling, further quantitative analysis of these unsupervised clusters is required. Finally, while this work demonstrates that mBERT contains syntactic structure, establishing a causal link between these representations and the model's downstream predictions remains an open challenge.
Summary updated