Freezing Subnetworks to Analyze Domain Adaptation in Neural Machine Translation

Brian Thompson, Huda Khayrallah, Antonios Anastasopoulos, Arya D. McCarthy, Kevin Duh, Rebecca Marvin, Paul McNamee, Jeremy Gwinnup, Tim Anderson, Philipp Koehn · DOI

Abstract

Domain adaptation in Neural Machine Translation (NMT) is typically achieved through "continued training" on in-domain data. However, the internal dynamics of which model components—encoder, decoder, or embeddings—actually adapt remains poorly understood. This paper systematically investigates this by freezing various subnetworks during fine-tuning. We find that NMT models exhibit significant functional redundancy. Freezing any single major component leads to minimal performance degradation, and adapting only the encoder can recover the vast majority of the total adaptation gain.

Introduction

Adapting a general-purpose NMT model (e.g., trained on movie subtitles) to a specialized domain (e.g., patent abstracts) is a common industrial requirement. While continued training is effective, the "black box" nature of neural networks makes it unclear which parameters are essential for this transition. Understanding these dynamics is critical for developing more efficient adaptation strategies and reducing the computational overhead of updating large-scale models.

Methodology

The researchers decomposed a standard RNN-based NMT architecture into five distinct functional subnetworks: Source Embeddings, Encoder, Decoder (including attention), Softmax (output layer), and Target Embeddings.

Architecture of the NMT model showing the five functional subnetworks analyzed.

Two primary experimental frameworks were employed:

  1. Freeze One: A single component was held constant (using weights from the general-domain model) while the rest of the network was fine-tuned.
  2. Freeze All But One: Only a single component was allowed to update, with all others remaining frozen.

To assess the significance of weight updates, the authors utilized Euclidean distance measurements and sensitivity analysis, comparing learned weight shifts against random noise.

Experimental Setup

The study evaluated three language pairs representing diverse data availability scenarios:

  • German–English (De–En): High-resource general and in-domain data.
  • Russian–English (Ru–En): Low-resource general, high-resource in-domain data.
  • Korean–English (Ko–En): Low-resource for both domains.

General-domain data was sourced from WMT and OpenSubtitles, while in-domain data consisted of patent abstracts from the World International Property Organization (WIPO).

Results and Analysis

The experiments revealed a high degree of flexibility and redundancy within the NMT architecture.

Results of freezing experiments across De-En, Ru-En, and Ko-En datasets. Blue bars represent freezing a single component; red striped bars represent freezing all but that component.

Component Redundancy

Freezing any single component resulted in a maximum performance drop of only 0.9 BLEU points compared to full-model fine-tuning. This suggests that other components can compensate for a rigid subnetwork by adjusting their own representations to accommodate the "frozen" logic.

The Encoder as the Primary Driver

The encoder, despite containing only a small fraction of total parameters (3.7M out of 56M), proved to be the most critical component for adaptation. In the De-En task, adapting only the encoder achieved a +20.1 BLEU improvement over the baseline, capturing the vast majority of the gains seen in full-model training.

Weight Stability and the Softmax Layer

Analysis showed that the model does not deviate significantly from its general-domain initialization. Fine-tuning acts as a "nudge" rather than a fundamental restructuring. However, the Softmax layer exhibited the highest relative weight movement, likely reflecting the need to adjust to the specific vocabulary and terminological distributions of the patent domain.

Discussion and Conclusion

This research demonstrates that NMT models are remarkably robust to partial freezing during domain adaptation. The finding that the encoder is the "MVP" of adaptation suggests that practitioners could significantly reduce training costs by updating only a small subset of parameters.

A limitation of this study is its focus on RNN-based architectures. As the field has transitioned to Transformer-based models, further research is required to determine if these patterns of redundancy and encoder-centric adaptation persist in self-attention mechanisms. Future work should also explore adaptation across more linguistically or stylistically distant domains.

Summary updated

BibTeX
@inproceedings{thompson2018freezing,
  author = {Brian Thompson and Huda Khayrallah and Antonios Anastasopoulos and Arya D. McCarthy and Kevin Duh and Rebecca Marvin and Paul McNamee and Jeremy Gwinnup and Tim Anderson and Philipp Koehn},
  title = {{Freezing Subnetworks to Analyze Domain Adaptation in Neural Machine Translation}},
  booktitle = {WMT},
  year = {2018},
  doi = {10.18653/v1/w18-6313},
}
Figure