Abstract
Neural Machine Translation (NMT) models often struggle to capture the underlying syntactic structure of the target language, particularly in complex or long sentences. This paper introduces ST-NMT, a framework that improves translation quality by first predicting a "soft template"—a structural skeleton of the target sentence—and then using it to guide the final generation. By combining source text with these syntactic templates extracted from constituency parse trees, the model achieves significant performance gains across multiple language pairs, including Chinese-English and German-English.
Introduction
Standard NMT models typically employ an end-to-end approach, mapping a source sentence directly to a target sentence. While effective, these models frequently fail to model the underlying grammar and word order of the target language explicitly. Previous attempts to incorporate syntax have relied on rigid templates or complex tree-to-tree mappings, which can be computationally expensive or overly restrictive.
ST-NMT addresses this gap by providing the model with a "soft" structural hint. This hint, or template, acts as a syntactic scaffold, allowing the model to establish the sentence's skeleton before committing to specific vocabulary.
Methodology
The ST-NMT framework operates in two distinct phases:
1. Soft Template Extraction and Prediction
During the training phase, a constituency-based parser is used to generate a parse tree for the target sentence. This tree is "pruned" at a specific depth to create a soft template. These templates are sequences containing both actual words (often functional words) and syntactic tags (e.g., on the other hand , if NP VP , we will VP .). A standard Transformer model is then trained to predict these templates directly from the source text.
2. Template-Guided Translation
The core architecture consists of a dual-encoder Transformer. One encoder processes the source language, while the second encoder processes the predicted soft template. The decoder then performs cross-attention over both encoders to generate the final translation. Crucially, the templates are "soft"; the model uses them as a guide rather than a rigid constraint, allowing it to recover from minor errors in template prediction.
Experimental Results
The model was evaluated on four diverse benchmarks: LDC Chinese-English, IWSLT14 German-English, WMT14 English-German, and ASPEC Japanese-Chinese. ST-NMT consistently outperformed strong baselines, including the standard Transformer and multi-pass models like Deliberation Networks.
| Language Pair | BLEU Score | Improvement over Baseline |
|---|---|---|
| Zh→En | 41.53 | +1.14 |
| De→En | 35.24 | +0.81 |
| En→De | 29.68 | +0.43 |
| Ja→Zh | 52.84 | +0.82 |
Qualitative analysis indicates that the model successfully learns recurring sentence patterns from the templates, leading to more grammatically correct and natural-sounding outputs.
Discussion and Insights
- Optimal Tree Depth: The authors identified a "Goldilocks" depth for the parse trees. A depth of approximately 4 provides the best balance; shallower trees offer too little information, while deeper trees become too difficult to predict accurately.
- Joint Optimization: Training the model with a dual objective—standard translation and template-guided translation—enhances robustness.
- Template Diversity: Interestingly, using beam search to provide multiple candidate templates actually decreased performance. The model performs best when following a single, high-confidence structural path.
Limitations
The primary limitation of ST-NMT is its dependency on high-quality constituency parsers for the target language during training, which may not be available for low-resource languages. Additionally, the two-step generation process (template then translation) likely introduces higher inference latency compared to single-pass models.
Summary updated