Abstract
Modern neural machine translation (NMT) models have achieved competitive performance in standard benchmarks such as WMT. However, significant issues remain regarding robustness and domain generalization. This paper studies NMT models from the perspective of compositional generalization by introducing CoGnition, a benchmark dataset consisting of 216k clean and consistent sentence pairs. Through quantitative analysis using a novel compound translation error rate, we demonstrate that NMT models fail significantly on compositional generalization, despite performing remarkably well under traditional metrics like BLEU.
Introduction: The Compositional Gap
While NMT models achieve impressive scores on standard benchmarks, they are surprisingly brittle when faced with novel combinations of familiar words. Humans possess a "Lego-like" ability to combine known components (atoms) into infinite new phrases (compounds). If a person understands "red car" and "blue ball," they can effortlessly understand "red ball." In contrast, NMT models often rely on memorizing training patterns. When they encounter a specific combination they haven't seen before—even if they know the individual words—they frequently hallucinate or produce semantically incorrect translations. This paper aims to quantify this failure and identify the linguistic factors that cause NMT models to struggle with compositional logic.
Methodology: The CoGnition Benchmark
To isolate the effects of composition from other noise, the researchers created a controlled environment using the CoGnition (Compositional Generalization Machine Translation) dataset.
Derived from the ROCStories corpus, the dataset consists of 216,246 clean sentence pairs. The construction process involved:
- Defining Atoms and Compounds: Basic semantic units (nouns, verbs, adjectives) were defined as "atoms," which were then combined into syntactic "compounds" (e.g., Determiner + Adjective + Noun).
- Controlled Vocabulary: To avoid out-of-vocabulary (OOV) issues, the vocabulary was restricted to the 2,000 most frequent words.
- Expert Post-Editing: Initial English-Chinese pairs were post-edited by human experts to ensure perfect alignment.
- Novel Metric: The researchers introduced the Compound Translation Error Rate (CTER), which specifically measures whether a target compound is translated correctly within its sentential context, providing a more granular view than BLEU.
Key Results and Analysis
The study reveals a stark performance gap. A standard Transformer model achieved 69.58 BLEU on a random test set but plummeted to 48.66 BLEU on the specialized compositional generalization (CG) test set. While the instance-level error rate was 27.31%, a staggering 61.62% of novel compounds failed to translate correctly in at least one of their tested contexts.
Memorization vs. Generalization
A primary finding is that NMT models excel at "lookup" but fail at "logic." As shown in the frequency analysis, the model translates "many-shot" compounds (those seen frequently in training) with near-zero error. However, for "zero-shot" compounds—combinations of known words that never appeared together in training—the error rate jumps significantly.
Factors Influencing Failure
- Complexity Scaling: There is a clear correlation between compound length and error rate. As the number of atoms in a phrase increases from 2 to 5, the error rate climbs from approximately 4.5% to over 36%.
- Structural Difficulty: Compounds involving postpositive modifiers (e.g., "the doctor he liked") are harder for models than simple adjectives, likely due to the complex word reordering required between English and Chinese.
- Contextual Interference: Even when a model "knows" a compound, its ability to translate it degrades as the surrounding sentence becomes longer or syntactically more complex.
Conclusion
The CoGnition benchmark demonstrates that high BLEU scores can be deceptive; models can achieve high scores while failing to translate the core meaning of novel phrases. Simply scaling up data or model size may not solve this fundamental weakness. Future research should focus on "compositional-by-design" architectures or data augmentation techniques that force models to learn structural rules rather than surface patterns. While this study was limited to English-to-Chinese and a small vocabulary, it provides a rigorous framework for evaluating the true linguistic understanding of NMT systems.
Summary updated