Abstract: We present a simple method to incorporate syntactic information about the target language in a neural machine translation system by translating into linearized, lexicalized constituency trees. An experiment on the WMT16 German-English news translation task resulted in an improved BLEU score when compared to a syntax-agnostic NMT baseline trained on the same dataset. An analysis of the translations from the syntax-aware system shows that it performs more reordering during translation in comparison to the baseline. A small-scale human evaluation also showed an advantage to the syntax-aware system.
Introduction
Standard Neural Machine Translation (NMT) models are typically "syntax-agnostic," treating language as a flat sequence of words or sub-words. While effective, these models lack explicit knowledge of the underlying structural rules of language. In contrast, older Statistical Machine Translation (SMT) often utilized "string-to-tree" (S2T) approaches to ensure grammatically sound output and handle complex word-reordering between languages. This paper explores a method to provide NMT with similar structural guidance without requiring a radical redesign of neural architectures.
Methodology: String-to-Linearized-Tree
The authors propose a "string-to-linearized-tree" approach that modifies the target data format rather than the model itself. The process involves:
- Parsing: Generating constituency trees for the target side of a parallel corpus using an off-the-shelf parser (BLLIP).
- Linearization: Converting these trees into a flat sequence of tokens. For example, "Jane had a cat" becomes:
(ROOT (S (NP Jane )NP (VP had (NP a cat )NP )VP . )S )ROOT. - Lexicalization: Keeping actual words (or BPE sub-units) as the "leaves" of the tree while retaining structural brackets.
- Standard Seq2Seq: Training a standard attention-based encoder-decoder model (Nematus) to translate source sentences directly into these linearized tree strings.
At inference time, the structural brackets and labels are stripped away to recover the plain-text translation.
Key Insights: The "Planning Ahead" Effect
One of the most significant findings is that a standard sequence-to-sequence model can learn to "nest" brackets correctly, effectively learning grammar as it learns to translate. By analyzing the model's attention weights, the authors discovered a "planning ahead" effect. When the model generates the initial opening brackets of a sentence, it is already attending to the main verb or structural markers in the source sentence. This suggests the syntactic structure helps the model plan the global layout of the translation before writing the first word.
Results and Analysis
The syntax-aware model (bpe2tree) demonstrated clear advantages over the baseline across several metrics:
- BLEU Improvements: In the high-resource WMT16 German-English (DE-EN) task, the
bpe2treemodel outperformed the baseline by nearly 1.0 BLEU point. In low-resource settings, the gains were even more substantial, jumping from 14.16 to 16.13 BLEU. - Superior Reordering: The syntax-aware model showed significantly higher "distortion scores" than the baseline. This indicates a greater capacity for complex word reordering to fit target language grammar, rather than simply following the source word order.
- Human Preference: In a blind test of 500 sentences, human evaluators preferred the syntax-aware translations 37.2% of the time, compared to 30.8% for the baseline.
Limitations and Future Work
While successful, the approach has drawbacks. Linearizing a tree significantly increases the number of tokens the decoder must produce, which slows training and can strain Recurrent Neural Network (RNN) memory. Furthermore, the model's quality is dependent on the accuracy of the initial parser. Future work may explore including Part-of-Speech (POS) tags more efficiently or developing specialized tree-decoding schemes that are more efficient than flat-string linearization.
Summary updated