Focused Concatenation for Context-Aware Neural Machine Translation

Lorenzo Lupo, Marco Dinarelli, Laurent Besacier · DOI

Introduction

Standard Neural Machine Translation (NMT) systems typically operate on a sentence-by-sentence basis, ignoring the broader context in which a sentence resides. This isolation often leads to errors in discourse-level phenomena, such as inconsistent gendered pronoun resolution or loss of lexical cohesion. Context-Aware NMT (CANMT) seeks to remedy this by incorporating surrounding sentences into the translation process.

One of the most straightforward approaches to CANMT is concatenation, where previous sentences (context) are simply prepended to the current source sentence. While computationally efficient and simple to implement, concatenation-based models often suffer from "distraction," where the model allocates excessive representational capacity to reconstructing the context rather than focusing on the primary translation task. This paper introduces two parameter-free modifications—context-discounting and segment-shifted positions—designed to focus the model's attention and improve discourse-level translation quality.

Methodology

The authors propose "Focused Concatenation," which refines the training and architecture of concatenation-based models without adding new parameters.

1. Context-Discounting (CD)

In standard training, the loss function treats all tokens in the output sequence equally. However, in a sliding-window concatenation setup, context sentences have often already appeared as the "target" sentence in previous training steps. To reduce redundancy and force the model to prioritize the current sentence, the authors introduce a discount factor ($C_D < 1$) applied to the loss generated by context tokens. This signal encourages the model to use the context for understanding while focusing its learning capacity on the accuracy of the current sentence.

2. Segment-Shifted Positions

Transformers rely on position embeddings to understand word order. In long sequences, the model may struggle to distinguish between tokens belonging to different sentences. The authors propose adding a constant "shift" (e.g., +10 or +20) to the position indices whenever a new sentence boundary is crossed. This artificial increase in mathematical distance between segments provides an inductive bias toward locality, helping the attention mechanism distinguish between the current sentence and its surrounding context.

Experimental Setup

The proposed methods were evaluated on two primary language pairs:

  • English → Russian: Utilizing the OpenSubtitles2018 corpus. Evaluation focused on a specialized contrastive test suite designed to measure performance on deixis, lexical cohesion, and ellipsis.
  • English → German: Utilizing TED talk subtitles from IWSLT17. The ContraPro test set was used to specifically evaluate the model's ability to resolve ambiguous pronouns based on preceding context.

Results and Discussion

Discourse Accuracy

On the English → Russian task, the Focused Concatenation approach achieved a discourse accuracy of 73.56%. This represents a significant improvement over the context-agnostic baseline (46.64%) and standard concatenation (72.02%). For pronoun resolution on the English → German ContraPro set, the model reached 74.39% accuracy, outperforming several complex multi-encoder architectures from previous literature.

Translation Quality and Robustness

While traditional metrics like BLEU remained relatively stable—consistent with the known limitations of BLEU in capturing document-level nuances—the COMET metric showed statistically significant improvements for the English → Russian models.

Furthermore, the authors observed that context-discounting significantly improved model robustness to varying window sizes. A model trained with a 2-sentence window using CD maintained its performance when tested on a 4-sentence window. In contrast, a standard concatenation model's performance collapsed under the same conditions, dropping over 12 BLEU points, suggesting that CD helps the model ignore irrelevant noise in larger contexts.

Conclusion

Focused Concatenation demonstrates that sophisticated architectural changes are not always necessary for improving context-aware translation. By simply adjusting the loss function and position embeddings, models can better handle complex discourse phenomena while remaining efficient. These findings suggest that better training objectives and inductive biases are powerful tools for managing the "distraction" inherent in long-sequence processing. Future work may explore how these techniques scale with massive pre-training and even larger context windows.

Summary updated

BibTeX
@inproceedings{lupo2022focused,
  author = {Lorenzo Lupo and Marco Dinarelli and Laurent Besacier},
  title = {{Focused Concatenation for Context-Aware Neural Machine Translation}},
  booktitle = {Wmt},
  year = {2022},
}
Figure