Abstract
Generating grammatically correct text requires more than just semantic understanding; it requires precise morphological inflection. This paper investigates contextual morphological inflection—predicting the correct form of a word based on its lemma and surrounding sentence context. We present a joint neural model that treats morphological tags as latent variables, demonstrating that explicit grammatical reasoning significantly improves performance across diverse languages.
The Challenge of Contextual Morphology
In natural language generation (NLG), producing grammatically correct text is a significant hurdle. While standard language models excel at predicting "content," they often stumble on the fine-grained grammar of word forms—what linguists call morphology.
Traditional morphological tasks usually provide a "gold" tag (e.g., "give me the plural of cat"). However, in real-world scenarios like machine translation or grammar correction, a system must infer that a word should be plural or past-tense based solely on the surrounding words.
The authors isolate this "contextual" challenge, asking if a model can reconstruct a fully inflected sentence from a partially lemmatized version without being told the specific grammatical rules to follow.
Methodology: A Structured Neural Approach
The proposed model employs a structured neural architecture that splits the problem into two distinct but connected steps:
- Tagging (The "Why"): A Neural Conditional Random Field (CRF) analyzes the entire sequence of lemmata (base words). It uses a bidirectional LSTM to encode the context and predicts a sequence of morphological tags (e.g.,
POS=NOUN, Num=Plur). These tags act as "latent variables"—intermediate steps the model uses to reason about the sentence structure. - Inflection (The "How"): Once the tags are predicted, a neural encoder-decoder model with hard attention takes the base lemma and the predicted tag to generate the final word character-by-character (e.g., taking
cat+Pluralto producecats).
This "Joint" approach is compared against "Direct" models that attempt to jump straight from context to the final word form without explicitly labeling the grammar.
Experimental Results
The researchers evaluated their model using the Universal Dependencies (UD) v1.2 dataset across ten typologically diverse languages, including Bulgarian, English, Finnish, and Hindi.
As shown in the results, the JOINT model outperformed the DIRECT baseline on almost every language, validating the hypothesis that explicit morphological tagging aids inflection. The model achieved state-of-the-art performance on 7 out of 10 languages compared to previous multi-task systems like CPH. Accuracy reached 90.4% in English and 80.4% in Italian. However, performance remains a challenge in languages with rich case systems or complex agglutination, such as Basque (61.1%) and Finnish (59.3%).
Key Insights and Future Directions
The primary finding is that models perform better when forced to explicitly predict morphological tags. By separating grammatical intent from orthographic realization (the actual spelling), the model becomes more robust. Error analysis showed the model was particularly good at "agreement"—for example, correctly inferring that an adjective should match the gender and number of the noun it modifies.
However, limitations remain. The model still struggles with long-distance dependencies and "inherent" features (like tense) that depend on the speaker's mind rather than explicit syntactic clues. Future work will focus on better modeling of long-range dependencies and exploring how these linguistically-motivated latent variables can be integrated into larger-scale neural machine translation systems.
Summary updated