Learning aligned embeddings for semi-supervised word translation using Maximum Mean Discrepancy

Antonio H. O. Fonseca, David van DijkarXiv 2020

Introduction

In modern machine translation, the ability to map semantic meanings across different languages is fundamental. Typically, each language is represented in its own high-dimensional vector space through word embeddings. Effective translation requires aligning these disparate spaces so that semantically equivalent words—such as "dog" in English and "chien" in French—occupy proximal locations in a shared embedding space. This paper introduces Word Alignment through MMD (WAM), an end-to-end framework that achieves this alignment without the need for exhaustive bilingual dictionaries.

The Challenge of Cross-Lingual Alignment

Existing approaches to embedding alignment generally fall into two categories, each with significant drawbacks:

  1. Supervised Methods: These rely on large, high-quality bilingual dictionaries to serve as anchor points. However, these dictionaries are expensive to curate and often lead to poor generalization for words outside the training set.
  2. Unsupervised Methods: These attempt to align the global "shape" of language distributions. While they avoid the need for dictionaries, they are computationally intensive and often fail to ensure that specific word-to-word meanings are preserved, focusing instead on global statistical similarities.

The authors identify a "semantic gap" where direct one-to-one mappings are difficult to establish, particularly for culturally specific terms. WAM addresses this by leveraging the inherent structure of parallel sentences rather than isolated word pairs.

Methodology: Localized Maximum Mean Discrepancy

The core innovation of WAM is the integration of a localized Maximum Mean Discrepancy (MMD) loss into a standard Transformer-based translation architecture.

Conceptual overview of Word Alignment through MMD (WAM), showing how source and target distributions are aligned into a shared semantic space.

Localized vs. Global Alignment

MMD is a statistical kernel-based method used to measure the distance between two distributions. Unlike traditional unsupervised methods that attempt to align the entire vocabulary of two languages at once (global alignment), WAM calculates the MMD between the words present in paired sentences during training.

The underlying logic is that if two sentences share the same meaning, the distributions of their constituent word embeddings should be similar. By enforcing this "local" alignment across thousands of sentence pairs, the model naturally induces a global alignment of the entire language space. To ensure robustness across different data scales, the authors employ a multi-scale Gaussian kernel, allowing the model to capture semantic relationships across various orders of magnitude.

Experimental Setup

The model was trained on a subset of 100,000 sentences from the Europarl-v7 French-English parallel corpus. Evaluation was conducted using two primary benchmarks:

  • Manual Dictionary: A curated set of 1,026 common word pairs.
  • MUSE Dictionary: A large-scale benchmark containing 10,872 word pairs.

WAM was compared against state-of-the-art baselines, including Gromov-Wasserstein (unsupervised) and Joint Learning (semi-supervised) techniques.

Key Results and Discussion

WAM demonstrated significant improvements over both supervised and unsupervised baselines in word-to-word translation tasks.

Quantitative Performance

On the Europarl-v7 test set, WAM achieved a 1-Nearest Neighbor (1NN) accuracy of 0.55, vastly outperforming Gromov-Wasserstein (0.25) and the supervised baseline, which scored a negligible 0.01. This discrepancy highlights a critical finding: supervised models often "memorize" specific dictionary anchors but fail to align the broader vocabulary, whereas WAM's sentence-level focus promotes better generalization. This was further confirmed on the MUSE dictionary, where WAM maintained an accuracy of 0.36 compared to the 0.08 achieved by other methods.

Qualitative Visual Alignment

Visualizations using UMAP (Uniform Manifold Approximation and Projection) provide clear evidence of WAM's efficacy.

UMAP visualizations comparing WAM against supervised and unsupervised baselines. WAM (top row) shows superior integration of English and French embeddings.

As shown in the visualizations, WAM creates a tightly integrated "combined" cloud where English and French words with similar meanings occupy the same regions. In contrast, supervised and other unsupervised methods often result in distinct, poorly aligned clusters, indicating a failure to bridge the semantic gap effectively.

Conclusion

Word Alignment through MMD (WAM) represents a significant step forward in semi-supervised word translation. By using sentences as contextual anchors and applying localized MMD loss, the model preserves structural semantic meaning more effectively than global distribution matching. While the current study focused on French-English pairs and noted some computational intensity, the success of the localized MMD approach suggests a promising path for aligning more linguistically distant language pairs in future research.

Summary updated

BibTeX
@misc{fonseca2020learning,
  author = {Antonio H. O. Fonseca and David van Dijk},
  title = {{Learning aligned embeddings for semi-supervised word translation using Maximum Mean Discrepancy}},
  year = {2020},
  eprint = {2006.11578},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.11578},
}
Figure