Gradient Consistency-based Parameter Allocation for Multilingual Neural Machine Translation

Wenshuai Huo, Xiaocheng Feng, Yichong Huang, Chengpeng Fu, Hui Wang, Bing QinCOLING 2024

Abstract

Multilingual neural machine translation (MNMT) handles the translation of multiple languages with one unified model. However, this joint-training paradigm incurs the notorious issue of parameter interference, where the model compromises with language diversity to find a common solution. Recent research has explored avoiding this problem by selecting certain parameters for each language direction from the original model to form language-specific sub-networks. However, determining how many parameters to choose and which parameters to select remains a challenge. In this work, we propose an approach called CaPA (Consistency-based Parameter Allocation), which dynamically allocates parameters of appropriate scale to each language direction based on the consistency between the gradient of the individual language and the average gradient. Specifically, CaPA allocates more parameters to languages with higher gradient consistency as these languages tend to have a more positive impact on other languages. Furthermore, considering the varying levels of interference across different parts of the model, we propose an adaptive parameter allocation based on module-level gradient consistency (CaPA-m). Experimental results show the correlation between gradient consistency and parameter interference, as well as the effectiveness of our proposed method.

Introduction

Standard Multilingual Neural Machine Translation (MNMT) models typically share 100% of their parameters across all languages. While this joint-training paradigm facilitates cross-lingual transfer—helping low-resource languages learn from high-resource ones—it creates a "one-size-fits-all" problem known as parameter interference. When a single model attempts to learn dozens of languages simultaneously, these languages often "fight" over the same parameters, leading to a mediocre compromise that can degrade translation quality, particularly for high-resource languages.

Previous attempts to mitigate this interference involved creating language-specific sub-networks. However, these methods often assigned a fixed, uniform percentage of parameters to every language (e.g., 60% across the board). This approach ignores the reality that some languages are more "cooperative" than others within a shared model. The fundamental challenge lies in determining exactly how many and which parameters each language pair actually requires.

Methodology: Consistency-based Parameter Allocation (CaPA)

The core innovation of this work is CaPA (Consistency-based Parameter Allocation), a method that moves away from arbitrary pruning percentages toward a data-driven strategy. The approach relies on gradient consistency to determine parameter budgets.

  1. Measuring Alignment: During training, the model calculates the gradient (the direction of learning) for a specific language and compares it to the average gradient of all other languages using cosine similarity.
  2. Dynamic Allocation: If a language’s gradient aligns well with the group (high consistency), it is considered to be "promoting" the overall goal, and CaPA rewards it with a larger parameter budget. Conversely, if a language’s gradient conflicts with the group (low consistency), it is identified as a source of interference. CaPA then prunes more of its parameters, forcing it into a smaller, more specialized sub-network to minimize its negative impact on others.
  3. Module-Level Granularity (CaPA-m): Recognizing that interference levels vary across different parts of the model (e.g., the decoder vs. the encoder), the researchers introduced CaPA-m. This variant adjusts the parameter budget for each language independently across individual Transformer modules.
Comparison of parameter allocation strategies: (a) LaSS uses fixed ratios, (b) CaPA uses language-level dynamic ratios, and (c) CaPA-m uses module-level dynamic ratios.

Experimental Setup and Results

The team evaluated CaPA on several standard benchmarks, including TED-8-Diverse, TED-8-Related, WMT, and IWSLT17. These datasets cover a wide range of language pairs and resource levels.

Key Findings

  • Performance Gains: CaPA consistently outperformed both the standard "share-everything" baseline and previous state-of-the-art sub-network methods like LaSS. On the TED-8-Diverse One-to-Many (O2M) task, CaPA improved the average BLEU score by +1.14 points over the baseline.
  • Universal Improvement: Unlike previous methods that often improved high-resource languages at the expense of low-resource ones, CaPA demonstrated performance gains across every single language direction tested.
  • O2M vs. M2O Complexity: The research highlighted that interference is significantly more severe in One-to-Many (O2M) tasks (e.g., English to multiple targets) compared to Many-to-One (M2O). This is due to the decoder's need to manage multiple target vocabularies and syntaxes simultaneously. CaPA showed its most substantial improvements in these challenging O2M scenarios.
Gradient consistency across different languages and task types (M2O vs O2M), showing higher consistency for CaPA compared to standard multilingual baselines.

Discussion and Conclusion

The use of gradient consistency as a proxy for parameter allocation provides a robust, automated way to manage the multilingual "tug-of-war." The researchers observed that languages from the same family (e.g., Slavic or Romance) naturally exhibit higher gradient consistency, validating that the model successfully identifies linguistic relationships.

While effective, the current implementation of CaPA requires manually set minimum thresholds for sub-network sizes to prevent over-pruning. Additionally, the multi-step training process (initial training, fine-tuning for weight identification, and reallocation) adds computational complexity. Future work will focus on automating threshold detection and streamlining the training pipeline to make CaPA more scalable for massive, hundreds-of-languages models.

Summary updated

BibTeX
@inproceedings{huo2024gradient,
  author = {Wenshuai Huo and Xiaocheng Feng and Yichong Huang and Chengpeng Fu and Hui Wang and Bing Qin},
  title = {{Gradient Consistency-based Parameter Allocation for Multilingual Neural Machine Translation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=qwXJuEpszK},
}
Figure