Abstract
Neural machine translation (NMT) systems are usually trained on a large amount of bilingual sentence pairs and translate one sentence at a time, ignoring inter-sentence information. This may make the translation of a sentence ambiguous or even inconsistent with the translations of neighboring sentences. In order to handle this issue, we propose an inter-sentence gate model that uses the same encoder to encode two adjacent sentences and controls the amount of information flowing from the preceding sentence to the translation of the current sentence with an inter-sentence gate. In this way, our proposed model can capture the connection between sentences and fuse recency from neighboring sentences into neural machine translation. On several NIST Chinese-English translation tasks, our experiments demonstrate that the proposed inter-sentence gate model achieves substantial improvements over the baseline.
Introduction
Standard Neural Machine Translation (NMT) systems typically translate sentences in isolation, treating a document as a disjointed collection of sentence pairs. This "context blindness" leads to significant issues in document-level translation, most notably ambiguity and inconsistency. A word that is ambiguous in a single sentence often becomes clear when considering the preceding context. Furthermore, translating sentences independently can break lexical cohesion, where the same entity is translated differently across adjacent sentences. To address these limitations, we propose an inter-sentence gate model that incorporates "recency"—the immediate context of the preceding sentence—to improve translation quality and document coherence.
Methodology: The Inter-Sentence Gate Model
The proposed architecture is built upon the attention-based RNNSearch framework. The primary innovation is a mechanism that selectively fuses information from a preceding sentence into the current translation process.
Shared Encoder and Gating Mechanism
To maintain semantic consistency and computational efficiency, the model uses a shared encoder for both the preceding sentence (Sentence A) and the current sentence (Sentence B). A sigmoid-based inter-sentence gate ($z_t$) is introduced to dynamically control the flow of information. At each decoding time step, the gate decides how much influence the context vector of the preceding sentence should have on the decoder's hidden state. Crucially, while the hidden state integrates both contexts to maintain memory, the final word prediction primarily utilizes the current sentence's context to prevent historical data from overwhelming the present translation.
Experiments and Results
We evaluated the model on Chinese-to-English translation tasks using a large-scale LDC corpus (approx. 2.8 million sentence pairs). The NIST05 dataset was used for development, while NIST02, 03, 04, 06, and 08 served as test sets.
Performance Comparison
The proposed model ($NMT_{ISG}$) was compared against the traditional phrase-based Moses system and the RNNSearch baseline.
As shown in the results, $NMT_{ISG}$ achieved an average improvement of 1.33 BLEU points over the RNNSearch baseline, with improvements reaching up to 2.0 BLEU points on specific test sets. It also outperformed the Moses system by nearly 4 BLEU points on average.
Analysis of Context Integration
Our analysis confirms that simple concatenation of sentences is insufficient, as it often degrades performance by creating excessively long sequences for the NMT model to process. The inter-sentence gate provides a more precise integration. Entropy analysis demonstrated that the gate effectively detects repeated terms (e.g., "Africa"), focusing the model's attention and maintaining lexical consistency. Furthermore, cosine similarity measurements between adjacent translated sentences showed that our model produces translations that are semantically closer to their neighbors, mimicking human-like document coherence.
Conclusion
The inter-sentence gate model successfully fuses recency from neighboring sentences into NMT, addressing the problems of ambiguity and inconsistency inherent in sentence-level translation. While the current model focuses on source-side information and a single-sentence window, it provides a robust foundation for future work in document-level NMT, such as integrating target-side context and capturing longer-range dependencies.
Summary updated