Contextual Parameter Generation for Universal Neural Machine Translation

Emmanouil Antonios Platanios, Mrinmaya Sachan, Graham Neubig, Tom Mitchell

TL;DR

Researchers at Carnegie Mellon University have introduced the Contextual Parameter Generator (CPG), a novel component for Neural Machine Translation (NMT) that generates model weights on-the-fly based on source and target language embeddings. This approach strikes a perfect balance between universal models that share everything and per-language models that share nothing, enabling superior performance in low-resource settings and seamless zero-shot translation.

What Problem Does This Paper Address?

In the world of multilingual NMT, researchers usually choose between two extremes. On one hand, Universal NMT uses a single set of parameters for all languages. While efficient, it often lacks the nuance to handle very different languages, especially when training data is scarce. On the other hand, Per-Language models use separate encoders and decoders for every language pair. This captures language-specific details but fails to share knowledge between similar languages, leading to massive, overparameterized systems that struggle to scale.

The authors address this "sharing vs. specificity" trade-off. They sought a way to allow a model to learn language-specific features while still leveraging commonalities across the linguistic spectrum, all without the exponential growth in parameters that usually comes with adding new languages.

Methods

The core innovation is the Contextual Parameter Generator (CPG). Instead of the NMT model having fixed, learnable weights (like standard LSTMs), the weights themselves are the output of the CPG.

  1. Language Embeddings: The system learns a small vector (embedding) for each language.
  2. Parameter Generation: The CPG takes a language embedding as input and performs a linear transformation to produce the weights ($\theta$) for the encoder (based on the source language) and the decoder (based on the target language).
  3. Decoupling: By generating encoder and decoder parameters separately, the model creates an "interlingua"—an intermediate representation that is independent of the target language.
  4. Low-Rank Constraints: To prevent the number of parameters from exploding, the authors use a low-rank approximation. They group parameters (e.g., all weights for one LSTM layer) and use a smaller matrix to extract relevant information from the large language embedding before generating the final weights.

This architecture is "model-agnostic," meaning it can be wrapped around almost any existing NMT architecture (though the authors used LSTMs for their experiments).

Datasets

The authors evaluated their approach on two major benchmarks:

  • IWSLT-15: Includes English (En), Czech (Cs), French (Fr), German (De), Thai (Th), and Vietnamese (Vi). This was used for supervised and low-resource (1% and 10% data) experiments.
  • IWSLT-17: Includes Dutch (Nl), English (En), German (De), Italian (It), and Romanian (Ro). This was used to test supervised performance and zero-shot translation (translating between pairs never seen together during training, like Romanian to Italian).

Key Insights and Ideas

  • Dynamic Weighting: The most profound idea here is treating language as a context for the model's parameters. The model literally changes its internal logic depending on which languages it is currently processing.
  • Emergent Linguistic Relationships: By analyzing the learned language embeddings, the authors found the model "discovered" linguistic history. For example, the embeddings for French and Vietnamese were surprisingly similar—likely reflecting the historical influence of the French language on Vietnamese vocabulary and structure.
  • Zero-Shot without Pivoting: Traditional systems often translate from Language A to C by "pivoting" through English (A -> En -> C). CPG performs this directly (A -> C) because the encoder and decoder are decoupled and trained to work with a shared internal representation.
  • Scaling Efficiency: In a standard pairwise system, adding languages leads to $O(L^2)$ parameter growth. With CPG, the growth is $O(L)$, making it much more feasible to build truly "universal" translators.

Key Results

  • Supervised Superiority: CPG consistently outperformed both standard pairwise models and Google’s Multilingual NMT (GML). On IWSLT-15, it achieved a mean BLEU score of 27.80 compared to GML's 24.12.
  • Low-Resource Champion: The gains were most dramatic when data was scarce. In the 1% parallel data setting, CPG achieved a 2.4x increase in BLEU score over the baseline, proving that parameter sharing is vital when examples are few.
  • Zero-Shot Success: CPG outperformed GML in zero-shot tasks across the board on the IWSLT-17 dataset, maintaining higher translation quality without ever seeing the specific language pairs during training.

Limitations and Future Work

  • Architecture Scope: The experiments were conducted using LSTMs. While the theory suggests CPG would work with Transformers (the current industry standard), the paper does not provide empirical results for that architecture.
  • Computational Overhead: While parameter-efficient in terms of storage, generating weights on-the-fly adds a layer of computational complexity during the forward pass.
  • Future Directions: The authors suggest extending CPG to other modalities, such as image captioning (where the "context" might be an image feature rather than a language ID). They also view this as a step toward "Never-Ending Learning" systems that can adapt to new languages with minimal retraining.

Summary updated

BibTeX
@inproceedings{platanios2018contextual,
  author = {Emmanouil Antonios Platanios and Mrinmaya Sachan and Graham Neubig and Tom Mitchell},
  title = {{Contextual Parameter Generation for Universal Neural Machine Translation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2018},
  doi = {10.18653/v1/d18-1039},
}
Figure