Abstract
Neural Machine Translation (NMT) systems have achieved remarkable fluency, yet the internal mechanisms by which they handle linguistic structures remain poorly understood. This paper investigates the "lazy encoder" hypothesis: the idea that NMT models do not learn morphology as a general linguistic property, but rather as a selective, task-driven process. By analyzing French-to-X translation models, we show that morphological features like gender, number, and tense are captured primarily when required by the target language. Furthermore, we demonstrate that this information is reconstructed dynamically within contextual layers rather than being stored in static word embeddings.
Introduction
While NMT models are effective, they are often criticized as "black boxes." A central question in interpretability is whether these models learn a general understanding of the source language's grammar. Previous research suggested that NMT models learn morphology better when translating into "easier" languages. This paper challenges that notion with a more surgical approach. Instead of looking at "morphology" as a single block, the authors perform a fine-grained analysis of individual features—gender, number, and tense—to see exactly where and why an encoder decides to store this information.
Methodology
The researchers trained attentional encoder-decoder models using LSTMs to translate from French into three target languages with varying morphological requirements: Italian (high agreement), German (moderate), and English (low).
Probing Classifiers
To analyze the encoder's internal state, the authors employed probing classifiers—simple logistic regression models trained to predict morphological labels from internal vectors. Two types of representations were tested:
- Word Embeddings: Static, context-independent input vectors.
- LSTM States: Dynamic, context-aware representations from the encoder's hidden layers.
To ensure the probes measured linguistic generalization rather than rote memorization, the training and test sets for the classifiers had zero vocabulary overlap.
Data Sources
Models were trained on the Europarl corpus (approx. 1.3 million sentence pairs). Morphological ground truth for French was obtained from the Lexique des Formes Fléchies du Français (Lefff).
Key Findings
Context is Essential for Morphology
A primary discovery is that morphological information is largely absent from static word embeddings. Instead, it is computed "on the fly" within the LSTM layers. As shown in Figure 1, accuracy for tense, number, and gender significantly improves when moving from embeddings to contextualized states. This suggests the model treats morphology as a property of sentence structure rather than an intrinsic attribute of individual word types.
The "Lazy" Encoder Hypothesis
The encoder's behavior is fundamentally utilitarian. It does not learn morphology for its own sake; it learns it to satisfy the needs of the decoder.
- Gender: In French-to-Italian models, gender is captured with high accuracy because Italian requires pervasive gender agreement. Conversely, in French-to-English models, gender detection is near baseline levels because English rarely marks gender on nouns or adjectives.
- Number and Tense: These features are captured more consistently across all language pairs because they typically transfer directly from source to target (e.g., a plural subject in French usually remains plural in English).
The "IT*" Experiment and Multilingualism
To confirm that target language requirements drive feature retention, the authors created a modified Italian dataset ("IT*") where gender markings were removed. The encoder's accuracy for French gender plummeted, proving that the model's "knowledge" is reactive to output constraints.
Furthermore, training a single model to translate into multiple languages simultaneously (multitarget NMT) results in a more robust and consistent internal representation of morphology, as seen in the comparative results in Figure 5.
Conclusion and Limitations
The study concludes that NMT encoders are "lazy," prioritizing the encoding of features that minimize translation error for a specific target. While this efficiency is impressive, it highlights a lack of general linguistic abstraction in single-pair models.
Limitations: * The study utilized LSTM architectures; future work should investigate if Transformer-based self-attention exhibits similar "lazy" tendencies. * The analysis was restricted to word-level representations, excluding subword (BPE) information common in modern systems. * French was the sole source language; results may vary for more morphologically complex languages.
Summary updated