Introduction
Neural Machine Translation (NMT) has seen significant advances, yet standard models often struggle with the diversity of language across different domains. A "one size fits all" approach frequently fails because words carry different meanings depending on the context—for instance, the term "cell" in a biological context versus a legal one. When training on multiple domains, models face two primary hurdles: domain bias, where high-resource domains dominate the learning process, and catastrophic forgetting, where fine-tuning on a new domain erodes performance on previously learned ones.
The Factorized Transformer addresses these challenges by decomposing model parameters into domain-shared blocks for general language patterns and domain-specific blocks for specialized nuances. This architecture achieves state-of-the-art performance on English-to-French translation while maintaining a compact parameter footprint.
Architectural Methods
The core innovation lies in splitting the standard Transformer architecture—including embeddings, attention mechanisms, and feed-forward networks (FFN)—into a dual structure. The authors propose three distinct factorization schemes to balance shared knowledge with specialized expertise:
- Deep Factorization (DF): Every major component is factorized. It utilizes a shared matrix multiplied by a domain-specific matrix, allowing for deep specialization while minimizing the total number of parameters.
- Shallow Factorization (SF): This variant maintains a standard Transformer for shared knowledge and incorporates lightweight, domain-specific "add-on" modules.
- Parallel Attention (PA): This scheme parallelizes attention matrices, dedicating specific transformations or "heads" to each individual domain.
Training Strategy
To ensure stability and prevent interference, the model is trained in two stages. First, Domain-Agnostic Training builds a robust general-purpose engine using all available data. Second, Domain-Specific Training freezes the shared parameters and optimizes only the domain-specific blocks. By initializing these blocks as identity matrices, the model starts from the general pre-trained baseline and gradually specializes without degrading general performance.
Experimental Evaluation
The researchers evaluated the Factorized Transformer on a massive 105 million sentence English-to-French dataset from the OPUS corpus. The evaluation spanned five diverse domains: News (General), IWSLT (Speeches), JRC (Legal), EMEA (Medical), and SUB (Subtitles).
Key Results
The Factorized Transformer variants consistently outperformed baseline systems and existing multi-domain methods like Residual Adapters.
As shown in the results table, the Parallel Attention (PA) variant achieved the highest average gain of +2.13 BLEU points over the baseline. The improvements were particularly pronounced in highly specialized domains; for example, in the JRC (Legal) domain, PA improved the BLEU score by +3.01 points compared to the baseline Transformer.
Discussion and Insights
The study yields several critical insights for multi-domain NMT:
- Decoupling and Efficiency: Separating domain-specific parameters allows for specialized improvements without inter-domain interference. The Shallow Factorization (SF) variant is notably efficient, providing significant gains with only a 1.1x increase in parameters, compared to the 5x increase required by traditional per-domain fine-tuning.
- Mitigating Forgetting: Unlike standard fine-tuning, which can cause performance in specialized domains like "EMEA" to drop significantly when the model is adapted to other tasks, the Factorized Transformer maintains high performance across all categories simultaneously.
- Handling Unknown Domains: For "Open-Domain" tasks where the domain label is missing at inference, the authors demonstrated that ensembling the outputs of specialized blocks can still outperform a generic model.
Limitations and Future Work
While effective, the current approach typically requires domain labels at inference time to activate the appropriate blocks. Although ensembling offers a workaround for unlabeled data, it increases computational costs. Future research may explore clustering similar domains to share blocks, potentially scaling the architecture to hundreds of domains more efficiently. Additionally, leveraging unlabeled data within this dual structure remains a promising avenue for further enhancing the generic base model.
Summary updated