Contextualization of Morphological Inflection

Ekaterina Vylomova, Ryan Cotterell, Trevor Cohn, Timothy Baldwin, Jason Eisner

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.

Example of the contextual morphological inflection task, showing the mapping from lemmata and context to target inflected forms.

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:

  1. 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.
  2. 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 + Plural to produce cats).

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.

Accuracy scores across ten languages comparing the JOINT model against baselines and state-of-the-art systems.

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

BibTeX
@inproceedings{vylomova2019contextualization,
  author = {Ekaterina Vylomova and Ryan Cotterell and Trevor Cohn and Timothy Baldwin and Jason Eisner},
  title = {{Contextualization of Morphological Inflection}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1203},
}
Figure