Finding Sparse Structure for Domain Specific Neural Machine Translation

Jianze Liang, Chengqi Zhao, Mingxuan Wang, Xipeng Qiu, Lei LiarXiv 2020

Abstract

Neural Machine Translation (NMT) models often struggle with domain adaptation, facing challenges like catastrophic forgetting and overfitting on small datasets. This paper presents PRUNE-TUNE, a method that leverages model redundancy to identify sparse, domain-specific sub-networks. By freezing a general-purpose core and iteratively pruning remaining parameters for target domains, PRUNE-TUNE preserves general translation capabilities while achieving state-of-the-art performance in specialized fields without adding extra parameters.

Introduction

Large-scale NMT models trained on massive general datasets achieve impressive results but often fail in specialized domains such as medicine, law, or technical documentation. The standard approach, fine-tuning, typically leads to two major issues: catastrophic forgetting, where the model loses its ability to translate general language, and overfitting, where the model memorizes noise in small domain-specific datasets.

Existing solutions like Adapters or regularization techniques often introduce architectural complexity or overly restrict the model's adaptive capacity. PRUNE-TUNE addresses these limitations by treating model redundancy as a resource for specialization.

Methodology: The PRUNE-TUNE Framework

PRUNE-TUNE is a three-stage approach inspired by the "Lottery Ticket Hypothesis," which suggests that dense networks contain sparse sub-networks capable of matching the full model's performance.

Overview of the PRUNE-TUNE process: from a general model to multiple domain-specific sub-networks via iterative pruning and freezing.
  1. Identifying the General Core: The process begins with a pre-trained general NMT model. Magnitude-based pruning is used to identify the most informative parameters. Experiments show that up to 50% of a Transformer-big model can be pruned with minimal impact on general translation quality. These core parameters are then frozen to safeguard general knowledge.
  2. Discovering the Lottery Sub-network: The remaining unfrozen parameters undergo iterative pruning while training on the target domain. This process carves out a sparse "lottery sub-network" optimized for the specific nuances of the new domain.
  3. Domain-Specific Fine-tuning: Finally, only the identified domain-specific sub-network is fine-tuned.

To support multiple domains within a single model, PRUNE-TUNE utilizes binary masks. For a given input, the model applies the corresponding domain mask to activate the general core plus the relevant specialized sub-network.

Experimental Setup

The researchers evaluated PRUNE-TUNE across two primary translation directions:

  • English → German (EN→DE): Using WMT14 as general data and IWSLT (TED talks), EMEA (Medical), and Novel (Literature) as target domains.
  • Chinese → English (ZH→EN): Using WMT19 as general data and six categories from the UM-Corpus (Laws, Thesis, Subtitles, Education, News, and Spoken).

Results and Discussion

PRUNE-TUNE demonstrates significant advantages over standard fine-tuning and other adaptation methods like Elastic Weight Consolidation (EWC) and Adapters.

Comparison of PRUNE-TUNE against various baselines across multiple domains, showing superior performance and preservation of general domain knowledge.

Performance and Generalization

As shown in the results table, PRUNE-TUNE consistently achieves high BLEU scores on target domains while maintaining stable performance on the general domain. For instance, on the IWSLT task, it reached 31.9 BLEU (target) and 28.8 BLEU (general). In contrast, standard fine-tuning caused the general domain performance to plummet to as low as 12.1 BLEU in some scenarios.

Robustness to Data Scarcity

A key finding is the method's stability when domain-specific data is limited. While standard fine-tuning performance often degrades rapidly with smaller datasets, PRUNE-TUNE remains effective even with only 1% of the available domain data, highlighting the efficiency of its sparse structures.

Multi-Domain Efficiency

The framework allows a single set of weights to house multiple specialized sub-networks. The authors successfully trained one model to handle four distinct domains sequentially, achieving top-tier performance across all of them. This proves that sparse structures can coexist without interference, effectively solving catastrophic forgetting.

Conclusion

PRUNE-TUNE offers a parameter-efficient and robust solution for domain adaptation in NMT. By discovering and isolating sparse structures, it avoids the pitfalls of catastrophic forgetting and overfitting. Future work may explore extending this approach to multilingual NMT, potentially housing dozens of language pairs within a single, efficiently masked model.

Summary updated

BibTeX
@misc{liang2020finding,
  author = {Jianze Liang and Chengqi Zhao and Mingxuan Wang and Xipeng Qiu and Lei Li},
  title = {{Finding Sparse Structure for Domain Specific Neural Machine Translation}},
  year = {2020},
  eprint = {2012.10586},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.10586},
}
Figure