Source-linked AI summary

Context Gates for Neural Machine Translation

Zhaopeng Tu, Yang Liu, Zhengdong Lu, Xiaohua Liu, Hang Li

arXiv:1608.06043v3cs.CL

TL;DR

Conventional NMT can be fluent but inadequate because it lacks effective control over source and target context influence. The paper introduces context gates that dynamically regulate these contributions during decoding. The method improves performance by an average of +2.3 BLEU points over standard attention-based NMT.

  • Problem

    Conventional NMT lacks effective control over source and target context influence and therefore often produces fluent but inadequate translations.

  • Method

    Context gates dynamically control the amount of information flowing from source and target contexts during target-word generation.

  • Results

    +2.3 BLEU points were achieved on average over a standard attention-based NMT system.

  • Takeaways & Limitations

    Context gates provide a mechanism for choosing appropriate source and target information during decoding, with consistent improvements across different NMT models.

  • Takeaways & Limitations

    The approach still requires validation on more language pairs, other NMT architectures, and additional sequence-to-sequence tasks.

Abstract

from arXiv · show

In neural machine translation (NMT), generation of a target word depends on both source and target contexts. We find that source contexts have a direct impact on the adequacy of a translation while target contexts affect the fluency. Intuitively, generation of a content word should rely more on the source context and generation of a functional word should rely more on the target context. Due to the lack of effective control over the influence from source and target contexts, conventional NMT tends to yield fluent but inadequate translations. To address this problem, we propose context gates which dynamically control the ratios at which source and target contexts contribute to the generation of target words. In this way, we can enhance both the adequacy and fluency of NMT with more careful control of the information flow from contexts. Experiments show that our approach significantly improves upon a standard attention-based NMT system by +2.3 BLEU points.

1 Introduction

NMT can produce fluent but inadequate translations because conventional decoding lacks effective control over source and target context influence. The paper proposes context gates to dynamically balance these contributions, improving translation quality.

  • 1 Introduction: Conventional NMT often produces fluent but inadequate translations because target context can exert stronger influence during generation.The paper attributes this imbalance to a stronger language model than in statistical machine translation.
  • 1 Introduction: Halving source-context contribution further reduced adequacy, while halving target-context contribution caused repetitive, unfluent output.The example illustrates that changing context ratios affects translation quality in different ways.
  • 1 Introduction: Source context is associated primarily with adequacy, whereas target context is associated primarily with fluency.Content words should rely more on source context, while function words should rely more on target context.
  • 1 Introduction: Context gates dynamically control source and target contributions when generating target words.They examine both contexts and output ratios determining how much information to use from each.
  • 1 Introduction: +2.3 BLEU points over a standard attention-based NMT system were achieved with context gates.The approach also matched GRU-based performance using a simpler decoder with half the parameters and matrix computations.

2 Neural Machine Translation

NMT generates each target word from source and target contexts, but varying their influence reveals a trade-off between adequacy and fluency. These findings motivate mechanisms that dynamically control context contributions during decoding.

  • 2 Neural Machine Translation: The decoder computes each state from the previous word embedding, previous decoding state, and source representation through a recurrent function.The recurrent function may use a vanilla RNN, GRU, or LSTM; the source representation may be fixed or attention-derived.
  • 2.1 Effects of Source and Target Contexts: Reducing target-context influence produces longer translations, while reducing source-context influence produces shorter translations.With source fully weighted and target context halved, most translations reach the maximum length of three times the source length.
  • 2.1 Effects of Source and Target Contexts: Source-context reduction yields more fluent but less adequate translations, whereas target-context reduction tends to produce more adequate but less fluent outputs.Manual evaluation on 200 randomly sampled test sentences reports these opposing effects, with additional repetition and omission artifacts when target-context influence is reduced.
  • 2.1 Effects of Source and Target Contexts: NMT can repeat phrases or terminate incompletely because changing context contributions weakens coverage or lets source-context influence dominate generation.Lower source-context contribution can encourage repeated phrases, while overwhelming source-context influence can cause loops until the implementation’s maximum length is reached.
  • 2.1 Effects of Source and Target Contexts: Quantitative and qualitative results support the hypothesis that source and target contexts are strongly associated with translation adequacy and fluency.Figure 2 and Table 1 motivate dynamically selecting information from both contexts.

3 Context Gates

Context gates dynamically regulate source and target information during decoding, using element-wise weights to balance translation adequacy and fluency. The section describes alternative architectures that gate one context or jointly control both.

  • 3.1 Architecture: Context gates dynamically control information flowing from source and target contexts to balance NMT fluency and adequacy at each decoding step.The gate examines source and target-side signals and determines how much information to transfer before updating the decoding state.
  • 3.1 Architecture: Each gate produces element-wise weights between zero and one, so individual context-vector elements can be selectively transferred or ignored.The weights are computed by a sigmoid layer and applied through element-wise multiplication.
  • 3.2 Integrating Context Gates into NMT: Figure 4 contrasts gates that scale only the source context, only the target context, or both translation contexts.The three integration strategies differ in which context signals the gate affects.
  • 3.2 Integrating Context Gates into NMT: The gate can increase source-context weight when the partial translation suggests that source information is more important for generating the next word.For example, after a partial translation, it may assign higher source-context and lower target-context weights before the activation layer.
  • 3.2 Integrating Context Gates into NMT: The source-only and target-only strategies resemble output gates, while the joint strategy interpolates between source and target contexts.The source- or target-specific designs use a gate on one side; the final strategy is inspired by the GRU update gate.

4 Related Work

The related-work discussion distinguishes context gates from gating scalars, coverage mechanisms, auxiliary-context language models, and gated decoder units. Its central distinction is that machine translation requires joint control of source and target contexts, with element-wise rather than shared scalar weights.

  • Comparison to Xu et al. (2015): Unlike image-captioning gating scalars that scale only image context, context gates jointly control source and target contexts in machine translation.The difference reflects the paper’s view that both translation languages contain equivalent information and both sides matter for balancing adequacy and fluency.
  • Comparison to Xu et al. (2015): Context gates use distinct element-wise weights rather than one scalar shared across the source context, enabling more precise control of different information components.The paper also adds peephole connections and the previously generated word as gate inputs; experiments report that these modifications consistently improve translation quality.
  • Comparison to Gated RNN: Context gates are complementary to GRU or LSTM decoder gates: they regulate contextual information entering the decoding state, while gated units capture long-term dependencies.The paper also motivates context gates for words lacking strong source correspondence, where lowering source-context weight can reduce reliance on source information.
  • Comparison to Coverage Mechanism: Coverage mechanisms track translated source words to address over- and under-translation, whereas context gates regulate context contributions and apply beyond attention-based NMT.The coverage vector is fed to attention to guide focus toward untranslated source words and avoid repetition.
  • Comparison to Exploiting Auxiliary Contexts in Language Modeling: Auxiliary-context language models fuse additional sentence- or document-level information, while this approach dynamically controls required source and target contexts for machine translation.The comparison is made with early-fusion recurrent language models.

5 Experiments

Experiments show that context gates improve translation quality across NMT variants, including vanilla, GRU, and coverage-based systems, while retaining efficiency advantages. They also improve long-sentence translation, interact beneficially with coverage, and produce better alignments when combined with coverage mechanisms.

  • Translation Quality: Context gates improve translation quality across NMT variants, and jointly controlling source and target contexts consistently outperforms controlling either side alone.The gates also improve the GRU-based system, indicating complementarity with GRU reset and update gates.
  • Over GroundHog (vanilla): +4.2 BLEU points on average over GroundHog (vanilla) demonstrate that context gates substantially improve the simple decoder baseline.The context-gate model uses 3.6M rather than 7.2M additional parameters and half the matrix computations of the GRU comparison.
  • Over GroundHog-Coverage (GRU): +1.6 BLEU points on average over GroundHog-Coverage (GRU), while the best model exceeds the SMT baseline by 3.3 BLEU points.These results support complementarity between context gates and improved attention with coverage.
  • Alignment Quality: Context gates alone do not improve alignment quality, but combined with coverage they produce better, especially more concentrated, alignments.The authors attribute this to better decoding states together with coverage information.
  • Ablation Study: Element-wise context control outperforms scalar gating, while peephole connections improve performance by 0.57 BLEU score.Previously generated words provide an additional explicit signal for judging context importance.
  • Effects on Long Sentences: Context gates improve translation across all source-length groups and alleviate degradation on long sentences by balancing source and target contexts.The baseline performs well on short sentences but degrades for sentences of length at least 30.
  • Gate Analysis: Higher average context-gate weights, indicating greater source-context contribution, correlate with better sentence-level translation performance.The sentence-level gate weight is computed as the mean of the sequence of gate values.

6 Conclusion

The paper concludes that context gates dynamically control source and target context contributions, improving translation quality across NMT models. It also identifies broader sequence-to-sequence applications and calls for validation across additional tasks, language pairs, and architectures.

  • Context gates achieve consistent and significant translation-quality improvements across different NMT models.
  • Context gates dynamically control source and target context contributions so NMT can choose appropriate information during target-sentence generation.
  • The approach is in principle applicable to sequence-to-sequence tasks where source information is transformed into a target sequence and the target sequence is generated.
  • Future work should test context gates on dialogue, summarization, more language pairs, and other NMT architectures.
Loading 1608.06043v3…