Abstract
Syntax has been proven to be remarkably effective in neural machine translation (NMT). Previous models obtained syntax information from syntactic parsing tools and integrated it into NMT models to improve translation performance. In this work, we propose a method to incorporate syntax information into a complex-valued Encoder-Decoder architecture. The proposed model, SynCoNMT, jointly learns word-level and syntax-level attention scores from the source side to the target side using an attention mechanism. Importantly, it is not dependent on specific network architectures and can be directly integrated into any existing sequence-to-sequence (Seq2Seq) framework. The experimental results demonstrate that the proposed method can bring significant improvements in BLEU scores on two datasets. In particular, the proposed method achieves a greater improvement in BLEU scores in translation tasks involving language pairs with significant syntactic differences.
Introduction: The Challenge of Syntactic Ambiguity
While Neural Machine Translation (NMT) has revolutionized how we translate languages, it often struggles with polysemy—words that have the same spelling but different meanings based on their grammatical context. A classic example is the sentence "He saw her duck," where the word "duck" could be a noun (a bird) or a verb (an action to avoid being hit).
Standard NMT models represent words as real-valued vectors (embeddings) that often fail to capture these subtle syntactic nuances. While previous research has attempted to "inject" syntax into models, these efforts often focused solely on the source language or relied on rigid, architecture-specific designs. SynCoNMT addresses this by holistically integrating syntactic dependency information from both source and target languages into a flexible framework.
Methodology: Complex-Valued Neural Networks
The core innovation of SynCoNMT lies in the use of Complex-Valued Neural Networks (CVNNs) to represent words and their syntactic roles simultaneously.
Syntax Embedding (SE)
Instead of a standard real-valued vector, each word is represented as a complex number $C = a + ib$. The real part ($a$) represents the word's semantic meaning, while the imaginary part ($b$) represents its syntactic dependency relation (e.g., subject, object, or possessive). This mathematically elegant approach keeps semantics and syntax coupled but distinct, preventing syntactic "noise" from overwhelming the word's meaning.
Complex-Valued Attention and Dual-Task Learning
The model utilizes a novel attention mechanism operating on these complex numbers, allowing the decoder to simultaneously attend to a word's meaning and its grammatical role. Furthermore, the model is trained using a joint loss function; it must predict both the next word in the translation and that word's syntactic dependency. This forces the model to learn structural correspondences between the two languages rather than just word-level alignments.
Experimental Setup
The model was evaluated on two major benchmarks:
- Chinese-to-English: 1.25 million sentence pairs from LDC corpora.
- English-to-German: 4.43 million sentence pairs from the WMT’14 dataset.
The SpaCy library was used for tokenization and to generate the initial syntactic dependency labels required for training. Notably, SynCoNMT is architecture-agnostic and was integrated into standard Seq2Seq frameworks like GRUs and LSTMs for testing.
Key Results and Discussion
SynCoNMT demonstrated significant performance gains across several metrics:
- BLEU Score Improvements: On Chinese-to-English tasks, the model improved over standard Bahdanau and Luong attention baselines by an average of 1.28 and 0.80 BLEU points, respectively. For English-to-German, the improvement reached 1.61 BLEU points over the Bahdanau baseline.
- Robustness in Long Sentences: The most dramatic improvements occurred in sentences exceeding 50 words. While baseline models typically see a sharp drop in performance as length increases, SynCoNMT remained robust by maintaining a clear representation of the sentence's grammatical skeleton.
- Structural Alignment: Analysis suggests that the model excels because it looks for syntactic correspondences between the source and target. This is particularly effective for language pairs with significant structural differences, such as Chinese and English.
Conclusion and Future Work
By treating syntax as the "imaginary" component of a word's representation, SynCoNMT provides a robust method for structural translation. While the model currently depends on the quality of external parsers like SpaCy, it opens new avenues for complex-valued neural networks in NLP. Future research may explore applying this approach to other tasks where the relationship between meaning and grammar is critical, such as text summarization or sentiment analysis.
Summary updated