Multilingual Neural Machine Translation with Task-Specific Attention

Graeme W. Blackwood, Miguel Ballesteros, Todd Ward

Introduction

Multilingual neural machine translation (NMT) models represent a significant advancement in the field, offering the ability to handle multiple language pairs within a single architecture. This approach is not only computationally efficient—avoiding the need for $n(n-1)$ separate models for $n$ languages—but also facilitates knowledge transfer, allowing low-resource languages to benefit from the data abundance of high-resource ones.

However, these models often suffer from parameter interference. When a single model shares all parameters across diverse languages, it must reconcile conflicting linguistic structures. A primary bottleneck is the attention mechanism, which serves as a proxy for word alignment. Forcing a shared attention mechanism to handle languages with vastly different word orders (e.g., SVO English vs. SOV-leaning German) often results in "blurry" alignments and degraded translation quality compared to specialized bilingual models.

Task-Specific Attention

To mitigate parameter interference, this research introduces Task-Specific Attention. This lightweight modification allows the model to learn specialized alignment patterns for different languages while keeping the bulk of the model (encoder, decoder, and embeddings) shared. The authors explored three primary variants:

  1. Target-specific: Dedicated attention weights and biases for each target language.
  2. Source-specific: Dedicated attention weights and biases for each source language.
  3. Paired: Unique attention parameters for every specific language pair (e.g., French-to-English).

These specialized parameters are activated during training and inference via "task tokens" (e.g., <ToEn> or <FromFr>) appended to the source sentences. This architectural change is remarkably efficient, requiring only a 1.2% increase in total model parameters.

Experimental Results

The models were evaluated using the Europarl Corpus (Release V7), focusing on English, French, Spanish, and German. The target-specific attention model emerged as the most robust variant, consistently outperforming the shared-attention baseline.

Figure 1: BLEU scores over training epochs, comparing the shared attention baseline (blue) with the target-specific attention model (red).

As shown in the training curves above, the target-specific model maintains a clear performance advantage throughout the training process. In primary translation directions (those seen during training), the model achieved BLEU score improvements ranging from +0.5 to +0.9 over the baseline. Qualitative analysis further revealed that these specialized models produce "sharper" alignments, focusing more accurately on correct translated terms rather than diffusing attention across the source sentence.

Zero-Shot Excellence

The most significant impact of task-specific attention was observed in "zero-shot" scenarios—translating between language pairs that were never paired during training (e.g., French-to-Spanish).

Figure 6: BLEU scores for zero-shot translation directions. The target-specific model consistently provides the highest gains.

In these zero-shot directions, the target-specific model demonstrated substantial improvements of +1.0 to +1.5 BLEU points. This suggests that having a dedicated attention mechanism for a specific target language allows the model to better structure its output, even when the source language is novel to that specific translation path. Interestingly, the "Paired" attention model performed worse than the target-specific one, likely due to data sparsity; splitting parameters by pair prevented the model from seeing enough data to train each specific attention head effectively.

Conclusion

Task-specific attention provides a high-reward, low-cost solution to the interference problem in multilingual NMT. By specializing only the attention layer, the model retains the benefits of massive parameter sharing while gaining the flexibility to handle diverse linguistic alignments. Future work may involve scaling this approach to true low-resource languages and integrating task-specific parameters into other components of the NMT pipeline.

Summary updated

BibTeX
@inproceedings{blackwood2018multilingual,
  author = {Graeme W. Blackwood and Miguel Ballesteros and Todd Ward},
  title = {{Multilingual Neural Machine Translation with Task-Specific Attention}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2018},
}
Figure