Languages Transferred Within the Encoder: On Representation Transfer in Zero-Shot Multilingual Translation

Zhi Qu, Chenchen Ding, Taro WatanabearXiv 2024 · DOI

Abstract

Multilingual Neural Machine Translation (MNMT) aims to handle multiple language pairs within a single model. However, it often struggles with zero-shot translation between unseen pairs. This paper addresses the debate over whether MNMT encoders learn language-agnostic representations or cluster by target language. By introducing "identity pairs" (translating a sentence to itself) as a baseline, the authors demonstrate that encoders actively transfer source representations into the target language's subspace. Leveraging this insight, they propose two methods—Low-Rank Language-specific Embedding (LOLE) and Language-specific Contrastive Learning of Representations (LCLR)—that significantly improve zero-shot performance without degrading supervised translation quality.

Introduction: The Zero-Shot Deficiency

Multilingual Neural Machine Translation (MNMT) offers a highly efficient "one model for all" solution. Despite its success in supervised settings, MNMT frequently exhibits a "zero-shot deficiency," failing to translate effectively between language pairs not explicitly seen during training. For instance, a model trained on French-English and English-Japanese may struggle to translate directly from French to Japanese.

The research community has been divided on the cause of this failure. One school of thought suggests the encoder should be "language-agnostic," stripping away language-specific features to find a universal semantic representation. Conversely, empirical observations often show that encoder representations cluster based on the target language. The authors of this paper argue that this discrepancy stems from the lack of a "base measure"—a way to isolate a language's intrinsic representation within the model.

The Identity Pair: A New Analytical Baseline

To resolve this, the authors introduce the Identity Pair task: asking the model to "translate" a sentence into itself (e.g., English to English) using a target language tag. This task serves as a proxy for the optimal representation of a language within the model's latent space, free from the complexities of cross-lingual translation.

Using Singular Value Canonical Correlation Analysis (SVCCA), the researchers analyzed how representations evolve across encoder layers. They compared standard translation representations (e.g., Portuguese to Hungarian) against these identity pair baselines.

Layer-wise SVCCA scores comparing translation representations to identity pair baselines across various datasets and model depths.

As shown in the SVCCA analysis, the similarity between source representations and the target's "identity" representation increases in the middle layers before diverging in the final layers. This suggests that the encoder is not merely extracting meaning but is actively transforming the input toward the target language's representational neighborhood.

Insights: The Encoder as a Transformer

The analysis reveals that the encoder acts as a literal transformer. Rather than reaching a language-neutral state, it shifts the source language into the target language's subspace. Zero-shot failure occurs due to "entanglement": representations of unseen pairs become stuck in the subspace of a supervised pair (e.g., French-to-Japanese looking too much like French-to-English), preventing them from reaching the correct target neighborhood.

Encoder representations visualized via t-SNE, showing clustering by target language (a) and semantic alignment across languages (b).

Visualizations using t-SNE confirm that the encoder clusters data by target language family while maintaining semantic alignment. This supports the idea that the encoder's goal is target-specific rather than language-agnostic.

Proposed Methods: LOLE and LCLR

Based on these insights, the authors propose two architectural enhancements:

  1. Low-Rank Language-specific Embedding (LOLE): This method adds a learnable, low-dimensional "nudge" to the hidden states in the encoder. By biasing representations toward the target language's subspace early on, LOLE helps the model transfer the source language more effectively.
  2. Language-specific Contrastive Learning of Representations (LCLR): Applied at the decoder, this uses a contrastive loss function to ensure the model clearly distinguishes between different language boundaries, preventing the entanglement that degrades zero-shot performance.

Results and Discussion

The proposed methods were evaluated on Europarl-15, TED-19, and OPUS-100 datasets. The combination of LOLE and LCLR (referred to as "BOTH") yielded consistent improvements:

  • Zero-Shot Gains: On Europarl-15, zero-shot BLEU scores improved by 1.55 points. On the large-scale OPUS-100, the gain reached 2.93 BLEU points.
  • Supervised Stability: Unlike previous approaches, these methods did not degrade performance on supervised language pairs; in some cases, they even provided slight improvements.
  • Robustness: The methods proved effective when fine-tuning large pre-trained models like mBART50, where LCLR alone boosted zero-shot performance by nearly 3 BLEU points.

Conclusion

This work clarifies the role of the encoder in MNMT, proving that it actively manages representation transfer into target-specific subspaces. By using identity pairs as a "North Star," the authors developed LOLE and LCLR, providing a robust solution to the zero-shot deficiency. Future research will continue to explore how to further disentangle these representational subspaces to achieve human-level zero-shot translation.

Summary updated

BibTeX
@misc{qu2024languages,
  author = {Zhi Qu and Chenchen Ding and Taro Watanabe},
  title = {{Languages Transferred Within the Encoder: On Representation Transfer in Zero-Shot Multilingual Translation}},
  year = {2024},
  eprint = {2406.08092},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.08092},
}
Figure