Skip to main content
QUICK REVIEW

[Paper Review] Syntax-Directed Attention for Neural Machine Translation

Kehai Chen, Rui Wang|arXiv (Cornell University)|Nov 12, 2017
Natural Language Processing TechniquesComputer Science58 citations
TL;DR

The paper introduces syntax-directed attention (SDAtt) to augment local attention with a syntax-distance constraint, plus a double-context NMT architecture combining global and syntax-directed local context, achieving improvements on Chinese-English and English-German translations.

ABSTRACT

Attention mechanism, including global attention and local attention, plays a key role in neural machine translation (NMT). Global attention attends to all source words for word prediction. In comparison, local attention selectively looks at fixed-window source words. However, alignment weights for the current target word often decrease to the left and right by linear distance centering on the aligned source position and neglect syntax-directed distance constraints. In this paper, we extend local attention with syntax-distance constraint, to focus on syntactically related source words with the predicted target word, thus learning a more effective context vector for word prediction. Moreover, we further propose a double context NMT architecture, which consists of a global context vector and a syntax-directed context vector over the global attention, to provide more translation performance for NMT from source representation. The experiments on the large-scale Chinese-to-English and English-to-Germen translation tasks show that the proposed approach achieves a substantial and significant improvement over the baseline system.

Motivation & Objective

  • Motivate and address limitations of linear-distance local attention in NMT by incorporating syntax distance constraints.
  • Propose syntax-distance constraint (SDC) masks derived from dependency trees to guide attention.
  • Introduce syntax-directed attention (SDAtt) that uses SDC to compute a syntax-focused context vector.
  • Propose a double-context NMT architecture combining global context with a syntax-directed local context.
  • Evaluate on large-scale ZH-EN and EN-DE tasks and demonstrate improvements over strong baselines.

Proposed method

  • Extend local attention by learning a syntax-distance constraint mask matrix M from dependency trees.
  • Compute alignment scores e_ij with a Gaussian over syntax distance using M[p_i], producing alpha^{s_n}_{ij} for the n-gram SDAtt.
  • Derive syntax-directed context vector c^s_i from h_j weighted by alpha^{s_n}_{ij} and use it in word prediction.
  • Integrate SDAtt into a double-context architecture that also includes the global context vector c^g_i, yielding P(y_i|y_<i,x,T) = softmax(L_o tanh(L_w E_y[y_{i-1}] + L_d s_i + L_cg c^g_i + L_cs c^s_i)).
  • Train and evaluate with Nematus on Chinese-English (ZH-EN) and English-German (EN-DE) tasks; use Stanford parser for dependency trees; vocabulary cap at 50k; max 80 tokens; ADADELTA optimization.
  • Compare against PBSMT, GlobalAtt, LocalAtt, FlexibleAtt, and Chen et al. 2017 baselines.

Experimental results

Research questions

  • RQ1Can syntax distance information improve attention-based NMT beyond linear distance constraints?
  • RQ2Does a syntax-directed attention mechanism yield better translation quality than standard global/local/flexible attention baselines?
  • RQ3Does combining a syntax-directed local context with the traditional global context (double-context) yield additional gains?
  • RQ4How does SDAtt perform across language pairs with different typological characteristics (ZH-EN and EN-DE) and across sentence lengths?

Key findings

  • SDAtt improves over GlobalAtt by 1.32 BLEU points on average for ZH-EN.
  • SDAtt outperforms LocalAtt and FlexibleAtt by 0.97 and 1.04 BLEU points on average for ZH-EN.
  • SDAtt surpasses Chen et al. 2017 by 0.47 BLEU points on average for ZH-EN.
  • For EN-DE, SDAtt provides improvements similar to those on ZH-EN, indicating robustness across language pairs.
  • The double-context +SDAtt setup yields additional gains over single-context variants, e.g., +SDAtt outperforms +LocalAtt and +FlexibleAtt on ZH-EN by substantial margins.
  • SDAtt maintains higher BLEU scores across various sentence lengths, including longer sentences, compared to baselines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.