Abstract
Standard Neural Machine Translation (NMT) architectures often struggle with the limitations of a fixed-length hidden state, which must encapsulate the entire translation history. This paper presents MEMDEC, a memory-enhanced decoder that augments the traditional Recurrent Neural Network (RNN) with a dedicated, addressable external memory buffer. By implementing a content-based read-write mechanism, the decoder can effectively manage a "scratchpad" of information, leading to more fluent and accurate translations. Our evaluation on Chinese-to-English translation tasks shows that MEMDEC significantly outperforms both phrase-based systems and standard attention-based NMT baselines, achieving an average improvement of +4.78 BLEU points.
1. Introduction
In the classic encoder-decoder framework for NMT, such as the RNNsearch model, the decoder relies on two primary information sources: a source memory (accessed via attention) and a hidden state. While the attention mechanism allows the model to focus on relevant parts of the source sentence, the internal hidden state remains a bottleneck. This single, fixed-length vector is tasked with tracking the history of generated words, the current decoding state, and future requirements. As the complexity of the sentence increases, this vector often fails to capture the necessary nuances of the translation process.
To address this, we propose the MEMDEC architecture. By expanding the decoder's internal state into a structured, addressable matrix, we provide the model with a dynamic workspace to store and retrieve information as needed, effectively decoupling the memory capacity from the recurrent state's dimensionality.
2. Methodology: The MEMDEC Architecture
The core of the MEMDEC model is a buffer memory ($M^B$), a matrix of pre-determined size (e.g., 8 cells of 1024 dimensions). Unlike the static source memory, the buffer memory is updated at every time step of the decoding process.
2.1 The Read-Process-Write Cycle
At each time step $t$, the decoder performs a sophisticated cycle to interact with the memory:
- Read from Buffer: The previous hidden state $s_{t-1}$ is used to perform content-based addressing on the buffer memory $M^B$, resulting in a read vector $r_{t-1}$.
- Enhanced Attention: The model employs an improved attention path. It utilizes both the previous state and the previously generated word to query the source sentence memory ($M^S$), producing a context vector $c_t$.
- State Update: The new hidden state $s_t$ is computed via a Gated Recurrent Unit (GRU). This unit takes the buffer read $r_{t-1}$, the previous word, and the source context $c_t$ as inputs.
- Write to Buffer: The new state $s_t$ is written back to the buffer memory. This involves an ERASE operation to remove obsolete information and an ADD operation to store new, relevant features, following the logic established by Neural Turing Machines (NTM).
2.2 Training Strategy
Optimization of the MEMDEC architecture is non-trivial due to the non-convex nature of the objective function. We found that training from scratch is often ineffective. Instead, we utilize a two-stage training strategy:
- Train a standard NMT model (Groundhog) until convergence.
- Initialize the MEMDEC parameters with the pre-trained model and fine-tune the entire system.
Additionally, we found that sharing weights between the read and write operations acts as a beneficial regularizer, ensuring consistency in the memory's content representation.
3. Experimental Evaluation
3.1 Setup
We evaluated MEMDEC on a Chinese-to-English translation task using 1.25 million sentence pairs from the LDC corpora (27.9M Chinese words, 34.5M English words). The NIST 2002 (MT02) dataset was used for development, while NIST 2003–2006 (MT03-MT06) served as the test sets. Performance was measured using the case-insensitive 4-gram NIST BLEU score.
3.2 Results
MEMDEC demonstrated substantial improvements over multiple baselines:
- BLEU Gains: The model achieved an average BLEU score of 36.95, representing a +4.78 point increase over the standard RNNsearch (Groundhog) baseline and a +5.28 point increase over the phrase-based Moses system.
- Comparison to Coverage Models: MEMDEC outperformed specialized "Coverage" models—which track source word translation status—by approximately 1.46 BLEU points. This suggests that a general-purpose memory buffer can learn to capture coverage information implicitly while also storing other useful semantic features.
- Memory Robustness: The system is robust to the number of memory cells. Even with a small configuration (e.g., 4 cells), the model significantly outperformed the baseline, indicating that even limited structured memory provides a significant advantage over a single vector.
4. Discussion and Limitations
While MEMDEC offers superior translation quality and fluency, it introduces certain trade-offs. The inclusion of a matrix-based memory and content-based addressing increases the parameter count and computational cost per decoding step. Furthermore, the model's sensitivity to initialization necessitates a complex two-stage training pipeline. Future research may explore dynamic memory sizing to adapt to varying sentence complexities or hierarchical memory structures to further improve long-range dependency handling.
5. Conclusion
By providing the decoder with an external "scratchpad," MEMDEC successfully mitigates the information bottleneck inherent in standard NMT architectures. The ability to dynamically read from and write to a structured memory allows the model to maintain a more comprehensive history of the translation process, leading to state-of-the-art performance on Chinese-to-English translation tasks.
Summary updated