Pluggable Neural Machine Translation Models via Memory-augmented Adapters
Standard Neural Machine Translation (NMT) models are trained on vast, diverse datasets, making them highly capable general-purpose translators. However, they often struggle when tasked with specific literary styles or highly technical domains. Traditional fine-tuning, while effective, is computationally expensive, requires significant specialized data, and often leads to "catastrophic forgetting" of the model's general knowledge.
To address these challenges, researchers have proposed a "pluggable" customization framework. This approach keeps the large-scale base NMT model frozen and introduces a lightweight Memory-augmented Adapter. This adapter acts as a specialized plugin that leverages external memory to guide the translation process without altering the core model's weights.
The Memory-augmented Adapter Framework
The proposed system relies on three core technical innovations designed to make the adapter both precise and robust.
1. Multi-granular Continuous Memory
A key limitation of previous retrieval-augmented models is their reliance on fixed-length segments (like words or sentences). The Memory-augmented Adapter instead uses multi-granular memory. By utilizing parse trees, the system extracts parallel phrase pairs of varying lengths—from single words to complex clauses. These phrases are then encoded into a continuous vector space using the NMT model itself, creating a rich, searchable memory of domain-specific or style-specific knowledge.
2. Adapter Architecture and Gated Fusion
The adapter is integrated directly into the NMT decoder layers. During translation, the model generates a "query" based on its current state. This query is used to perform an attention-based lookup in the external memory. To ensure the model doesn't blindly follow the memory, a gated fusion mechanism is employed. This gate dynamically balances the information retrieved from the memory against the internal representations of the frozen base model, allowing for a seamless blend of general translation ability and specialized knowledge.
3. Memory Dropout Training
To prevent the model from becoming overly dependent on the external memory (a phenomenon known as "over-reliance"), the authors introduced Memory Dropout. During the training of the adapter, portions of the memory are randomly masked. This forces the adapter to learn a more robust mapping between the model's internal states and the external data, ensuring it remains effective even when the memory doesn't contain a perfect match.
Experimental Results and Insights
The researchers evaluated the pluggable model across two distinct customization tasks: style and domain adaptation.
- Style Customization: The model was tasked with imitating the unique writing styles of William Shakespeare (English) and Lu Xun (Chinese). The memory-augmented adapter significantly outperformed standard adapters and even large language models like ChatGPT, achieving higher BLEU scores and better style alignment as measured by automated classifiers.
- Domain Adaptation: In technical fields such as Law, Medicine, and IT, the method provided an average improvement of 3.1 BLEU points over standard adapters. Notably, the system remained highly effective even with as few as 250 example sentences, demonstrating its utility in data-scarce scenarios.
One of the most significant findings was the importance of granularity distribution. The authors discovered that a "short-to-long" approach—where lower decoder layers handle shorter, frequent phrases and higher layers handle longer, contextual ones—yielded the best performance.
Conclusion
The Memory-augmented Adapter provides a scalable and efficient solution for NMT customization. By decoupling specialized knowledge from the base model's parameters, it enables high-precision translation in niche domains and styles with minimal data and computational overhead. Future work may explore extending this "pluggable" architecture to other generative tasks, such as dialogue systems and text summarization.
Summary updated