Abstract
We present a simple and effective approach to incorporating syntactic structure into neural attention-based encoder-decoder models for machine translation. We rely on graph-convolutional networks (GCNs), a recent class of neural networks developed for modeling graph-structured data. Our GCNs use predicted syntactic dependency trees of source sentences to produce representations of words (i.e. hidden states of the encoder) that are sensitive to their syntactic neighborhoods. GCNs take word representations as input and produce word representations as output, so they can easily be incorporated as layers into standard encoders (e.g., on top of bidirectional RNNs or convolutional neural networks). We evaluate their effectiveness with English-German and English-Czech translation experiments for different types of encoders and observe substantial improvements over their syntax-agnostic versions in all the considered setups.
Introduction
Standard Neural Machine Translation (NMT) models, such as those based on Recurrent Neural Networks (RNNs) or Convolutional Neural Networks (CNNs), typically treat sentences as linear sequences. However, language is inherently hierarchical, defined by syntactic structures where words relate to one another across varying distances. This paper addresses the lack of explicit syntax in standard NMT by introducing a flexible method to bake linguistic structure into the encoder using Graph Convolutional Networks (GCNs).
Methodology
The core innovation is the use of Syntactic GCNs as stackable layers within the NMT encoder. The process begins with dependency parsing of the source sentence to create a graph where words are nodes and syntactic dependencies are edges.
Unlike standard GCNs, these are tailored for natural language through:
- Directionality and Labels: Using distinct weights for head-to-dependent and dependent-to-head edges.
- Edge-wise Gating: To mitigate noise from imperfect automatic parsers, a gating mechanism allows the model to down-weight or ignore irrelevant syntactic links.
- Stackability: GCNs can be placed on top of any standard encoder (Bag-of-Words, CNN, or BiRNN), allowing the model to refine word representations based on their syntactic neighborhoods.
Experimental Setup
The models were evaluated on the WMT16 translation task for two language pairs:
- English-German (En-De): Tested on both small (News Commentary v11) and large (full WMT16) datasets.
- English-Czech (En-Cs): Tested on the News Commentary v11 dataset.
Key Results and Analysis
The GCN-enhanced models consistently outperformed syntax-agnostic baselines. In English-German tasks, the BiRNN+GCN model achieved a +1.2 BLEU improvement. In English-Czech, the improvement was +0.7 BLEU.
Analysis of the results yielded several key insights:
- Long-range Dependencies: GCNs allow information to "teleport" across the dependency tree, connecting distant subjects and verbs directly. This helps capture relationships that linear models often miss.
- Robustness via Gating: The gating mechanism proved essential for handling the noise of automatic parsing, ensuring the model remains robust even when the dependency tree is imperfect.
- Performance across Lengths: While it was hypothesized that syntax would primarily benefit long sentences, improvements were observed uniformly across all sentence lengths, as shown in the performance curves.
Conclusion
Incorporating explicit syntactic trees via GCNs provides a significant boost to NMT performance, even when stacked on top of strong sequential models like BiRNNs. This suggests that structural linguistic information is complementary to the features learned by standard encoders. Future work may extend this framework to incorporate semantic structures, such as Semantic Role Labeling (SRL), to provide even richer context for translation.
Summary updated