Finding Sparse Structures for Domain Specific Neural Machine Translation

Jianze Liang, Chengqi Zhao, Mingxuan Wang, Xipeng Qiu, Lei Li

Abstract

Neural Machine Translation (NMT) models trained on massive general-purpose datasets often fail when applied to specialized domains like medicine or law. Traditional fine-tuning methods frequently lead to "catastrophic forgetting" of general knowledge or overfitting on small domain-specific datasets. This paper introduces PRUNE-TUNE, a domain adaptation method that uses gradual pruning to identify sparse, domain-specific sub-networks within a larger model. By freezing a core generalist network and training only tiny specialist sub-networks, PRUNE-TUNE achieves state-of-the-art translation quality while maintaining general-domain performance.

Introduction

While NMT has achieved remarkable success, its performance is highly dependent on the availability of large-scale training data. In specialized fields where data is scarce, models often struggle. The standard approach of fine-tuning a general model on domain-specific data typically results in two major issues: catastrophic forgetting, where the model loses its ability to translate general text, and overfitting, where the model memorizes noise in small datasets.

Existing solutions, such as Adapters or regularization techniques like Elastic Weight Consolidation (EWC), often require architectural changes or complex hyperparameter tuning. PRUNE-TUNE offers an "organic" alternative by finding specialized structures already latent within the neural network, inspired by the Lottery Ticket Hypothesis.

The PRUNE-TUNE Framework

The PRUNE-TUNE process consists of four primary stages designed to isolate general knowledge from domain-specific expertise.

Overview of the PRUNE-TUNE process, from a general model to multiple domain-specific sub-networks.
  1. Core Identification: A well-trained general NMT model undergoes gradual pruning to identify the most "informative" parameters (typically those with the highest magnitude). These parameters are frozen to preserve the model's general translation capabilities.
  2. Sub-network Discovery: From the remaining unfrozen parameters, an iterative pruning process is applied using target domain data to uncover a sparse "lottery sub-network" optimized for that specific domain.
  3. Domain-Specific Tuning: Only this discovered sub-network is fine-tuned on the target domain data.
  4. Multi-Domain Scaling: Binary masks are used to store multiple disjoint sub-networks within the same model. This allows the model to switch between "specialist" modes (e.g., medical, legal, literary) by applying the corresponding mask at inference time.

Experimental Evaluation

The researchers evaluated PRUNE-TUNE across several benchmarks, including English-German (EN→DE) and Chinese-English (ZH→EN) tasks. Target domains included TED talks (IWSLT), medical texts (EMEA), and literature (Novel).

Performance comparison of PRUNE-TUNE against various domain adaptation baselines across multiple datasets.

As shown in the results table, PRUNE-TUNE consistently outperformed strong baselines such as EWC-regularization, Model Distillation, and Adapters. Notably, it achieved these results while using significantly fewer trainable parameters—approximately 27M compared to the 273M required for full fine-tuning.

Key Findings

  • Parameter Redundancy: The study confirms that up to 50% of parameters in large Transformer models are redundant for general tasks. PRUNE-TUNE effectively repurposes this redundancy to house domain-specific specialists.
  • Efficiency and Sparsity: A sub-network consisting of only 10% of the original parameters is often sufficient to achieve peak performance in a new domain.
  • Robustness to Data Scarcity: PRUNE-TUNE remains stable even when training data is extremely limited. In experiments with only 1% of target data, standard fine-tuning performance crashed, while PRUNE-TUNE maintained or improved upon the general model's baseline.
  • Zero Interference: Because domain-specific sub-networks are disjoint and separated by masks, learning a new domain has no impact on the performance of previously learned domains or the general model.

Conclusion

PRUNE-TUNE represents a significant step forward in NMT domain adaptation. By treating a neural network as a collection of potential sub-networks rather than a monolithic block, it provides a robust solution to the twin problems of catastrophic forgetting and overfitting. Future work may explore automated domain detection at inference time and the application of this method to massive multilingual models.

Summary updated

BibTeX
@inproceedings{liang2021finding,
  author = {Jianze Liang and Chengqi Zhao and Mingxuan Wang and Xipeng Qiu and Lei Li},
  title = {{Finding Sparse Structures for Domain Specific Neural Machine Translation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i15.17574},
}
Figure