Introduction
Multilingual models like mBERT are trained on vast corpora spanning over 100 languages, yet they often struggle to align identical concepts across different linguistic spaces. For instance, the embedding for a concept in English may not naturally cluster with its Swahili counterpart. Traditional alignment methods often rely on rigid one-to-one mappings or noisy "silver" labels from external translation tools, which are frequently unavailable for low-resource languages.
Researchers at Amazon AI propose WordOT, a novel fine-tuning strategy that leverages Optimal Transport (OT) to align contextualized embeddings in an unsupervised, flexible manner.
The WordOT Framework
WordOT treats language alignment as a mathematical problem of moving "mass" between word distributions. Using the Sinkhorn divergence as a loss function, the model calculates the minimum "work" required to transform the distribution of words in one language into the distribution of its parallel translation.
Key features of this approach include:
- Unsupervised Alignment: The OT algorithm automatically discovers the most efficient mapping (the "transport plan") during training without requiring pre-defined dictionaries.
- Contextual Awareness: By aligning contextualized embeddings, the model distinguishes between different meanings of the same word (e.g., "match" in sports vs. "match" for fire) based on surrounding text.
- Regularization: A penalty term prevents the embeddings from drifting too far from their original pre-trained values, preserving general linguistic knowledge.
Handling Linguistic Nuance
A significant advantage of Optimal Transport is its ability to handle non-isomorphic mappings. Unlike rigid L2-based methods that assume every word has exactly one counterpart, WordOT naturally accommodates many-to-many relationships.
For example, German compound nouns like Vorsichtsprinzip are correctly mapped to multi-word English phrases like precautionary approach. This flexibility is crucial for capturing the structural differences between languages.
Experimental Evaluation
The model was fine-tuned on 32 million parallel sentence pairs and evaluated on two primary benchmarks:
- XNLI (Cross-lingual Natural Language Inference): Measures reasoning across 15 languages.
- XQuAD (Cross-lingual Question Answering): Measures the ability to extract answers from text across 11 languages.
Key Results
- Performance Gains: WordOT outperformed the mBERT baseline by 1.9% on XNLI and 1.3% (F1 score) on XQuAD.
- Robustness: The method proved highly efficient, with 50k parallel sentences yielding results nearly as strong as 250k sentences.
- Low-Resource Success: Scaling to 15 languages (LargeWordOT) showed significant improvements in languages like Hindi, Swahili, and Turkish.
Limitations and Future Outlook
While effective, WordOT is approximately 30% slower than simpler L2-based alignment due to the computational cost of OT. Future work aims to optimize these calculations and explore non-uniform mass distributions (e.g., using TF-IDF weighting) to prioritize high-content words over functional words like "the" or "a."
Summary updated