Massively Multilingual Lexical Specialization of Multilingual Transformers

Tommaso Green, Simone Paolo Ponzetto, Goran Glavašš · DOI

Abstract

While pretrained language models (PLMs) primarily serve as general-purpose text encoders, they can be rewired to produce high-quality word representations for type-level lexical tasks. This work introduces a massively multilingual lexical specialization procedure for transformers like mBERT and XLM-R. By leveraging BabelNet as a source of multilingual lexical knowledge across 50 languages, we subject these models to a contrastive objective using synonym and word-gloss pairs. Our results demonstrate substantial gains in bilingual lexicon induction, cross-lingual word similarity, and sentence retrieval. Notably, the specialized models generalize to languages unseen during training, suggesting that lexical specialization enables a language-agnostic alignment of the embedding space.

Introduction

Massively Multilingual Transformers (MMTs) have become the standard for cross-lingual NLP. However, their "type-level" representations—static embeddings for individual words—often lag behind specialized monolingual models. Previous lexical specialization methods typically focused on single languages or relied on noisy machine translations, failing to exploit the cross-lingual synergies inherent in MMTs. This paper addresses these limitations by proposing a unified framework for global specialization.

Methodology: BabelBERT

We propose BabelBERT, a framework that uses the human-curated knowledge in BabelNet to specialize MMTs globally.

Constraint Mining

We extracted over 760,000 lexical constraints (synonyms and glosses) from BabelNet 5.0, covering 50 languages from 14 language families. By including dictionary definitions (glosses), we create sense-level representations that help the model disambiguate polysemous words (e.g., distinguishing "bat" as an animal from "bat" as sports equipment).

Contrastive Learning

The models are trained using a Bi-Encoder architecture with an InfoNCE loss. The objective is to minimize the distance between representations of synonyms (or word-gloss pairs) in the vector space while maximizing the distance between unrelated words. We evaluated both full fine-tuning and parameter-efficient Adapter-based tuning, which keeps the original model weights frozen.

Experimental Results

The specialized models, referred to as Babel-FT, consistently outperformed their vanilla counterparts across several benchmarks including Bilingual Lexicon Induction (BLI), Cross-lingual Word Similarity (XLSIM), and Sentence Retrieval (Tatoeba).

Performance improvements of Babel-FT mBERT over vanilla mBERT across G-BLI, PL-BLI, XLSIM, and Tatoeba tasks.

Key Performance Gains

  • Cross-lingual Word Similarity (XLSIM): mBERT's performance increased from 10.3 to 25.8, while XLM-R saw a dramatic leap from 5.9 to 34.2.
  • Sentence Retrieval (Tatoeba): XLM-R accuracy improved from 37.6% to 58.6%.
  • BLI: Significant improvements were observed even for low-resource languages and dialects like Wu Chinese and Interlingue.
Detailed accuracy improvements on the Tatoeba sentence retrieval task for specific language pairs.

Discussion and Insights

The Rewiring Hypothesis

Performance gains saturate quickly, often with as few as 10,000 constraints. This supports the "rewiring hypothesis": specialization doesn't necessarily teach the model new facts, but rather "rewires" it to better access the multilingual knowledge it already acquired during its massive pre-training phase.

Generalization to Unseen Languages

One of the most striking findings is that specializing on a subset of languages improves performance on languages entirely absent from the specialization set. This suggests the model learns a language-agnostic alignment function that generalizes across the entire multilingual embedding space.

Quantity vs. Diversity

Counter-intuitively, the total number of constraints proved more critical than the typological diversity of the training languages. A large, even if unbalanced, set of constraints can drive global improvements.

XLM-R's Latent Knowledge

While vanilla mBERT initially performed better, XLM-R showed much larger gains after specialization. This suggests that XLM-R contains richer, albeit "buried," multilingual knowledge that specialization successfully extracts.

Conclusion

Massively multilingual lexical specialization effectively transforms MMTs into high-quality cross-lingual word encoders. By leveraging structured knowledge from BabelNet, we can significantly improve the alignment of multilingual embedding spaces. Future work will explore the impact of this lexical rewiring on higher-level downstream tasks like Natural Language Inference (NLI) and address potential biases in the underlying knowledge bases.

Summary updated

BibTeX
@inproceedings{green2023massively,
  author = {Tommaso Green and Simone Paolo Ponzetto and Goran Glavašš},
  title = {{Massively Multilingual Lexical Specialization of Multilingual Transformers}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.426},
}
Figure