Generalizing Morphological Inflection Systems to Unseen Lemmas

Changbing Yang, Ruixin (Ray) Yang, Garrett Nicolai, Miikka Silfverberg

TL;DR

This paper introduces a transformer-based system for morphological inflection that significantly improves generalization to unseen word forms. By incorporating reverse positional encoding, data augmentation techniques like lemma copying, and a novel training strategy called "student forcing," the system achieves state-of-the-art results on a challenging benchmark, outperforming previous methods, especially in low-resource scenarios.

What Problem Does This Paper Address?

Morphological inflection, the process of changing a word's form to fit grammatical rules (e.g., "walk" to "walked"), is a fundamental task in natural language processing. A major challenge, particularly in low-resource languages or when dealing with rare words, is generalization to unseen lemmas. Traditional models often struggle when encountering words not present in their training data. This paper tackles this problem by developing a system that can more effectively inflect words it hasn't seen before, a crucial step towards building more robust and versatile NLP tools for diverse languages. The SIGMORPHON-UniMorph 2022 Shared Task specifically focused on this generalization aspect, presenting data conditions with varying degrees of "lemma overlap" (how many training lemmas also appear in the test set) to highlight this challenge.

Methods

The authors build upon the standard Transformer architecture, a powerful neural network model, and introduce several key innovations:

  • Reverse Positional Encoding: Standard Transformers use positional encodings to understand word order, but these are typically "forward-looking." For inflection, understanding positions from the end of a word is also critical (e.g., English pluralization often involves suffixes). This method adds a "reverse" positional encoding to allow the model to directly attend to the end of the input string.
  • Type Embeddings: To distinguish between different types of input tokens (e.g., characters of a lemma vs. morphosyntactic tags), they use learned "type embeddings" that are added to the token embeddings.
  • Data Augmentation: To combat data sparsity and improve generalization, they explore two techniques:
  • Data Hallucination: This method synthesizes new training examples by replacing parts of existing examples with random character sequences, aiming to create novel but plausible variations.
  • Lemma Copying: A more effective approach where the model is trained to simply copy lemmas from the test set, marked with a special "+COPY" tag. This acts as a form of domain adaptation, directly exposing the model to the target lemmas.
  • Student Forcing: This is a training strategy that aims to mitigate "exposure bias," a common issue where models perform well during training (seeing "gold standard" outputs) but poorly during inference (seeing their own potentially erroneous predictions). Student forcing gradually introduces model-generated outputs into the training process, acting as a form of scheduled sampling.

Datasets

The experiments are conducted on data from the SIGMORPHON-UniMorph 2022 Shared Task 0. This task includes data for 33 languages, with two main conditions:

  • Small Data Condition: Up to 700 training examples per language.
  • Large Data Condition: Up to 7,000 training examples per language.

The task organizers provided standard training, development, and testing splits. The paper highlights that lemma overlap varies significantly across languages and conditions, with some having very low overlap (making generalization harder) and others very high.

Key Insights and Ideas

  • Reverse Positional Encoding is Crucial: The authors found that simply adding reverse positional encoding to a standard Transformer provided a noticeable improvement over the official baseline, suggesting that understanding word endings is vital for inflection.
  • Lemma Copying Outperforms Hallucination: While data hallucination showed some promise, lemma copying proved to be a more robust and effective data augmentation strategy for improving generalization, especially under low-data conditions.
  • Data Augmentation is Key for Low-Resource Settings: The paper strongly emphasizes that data augmentation techniques are particularly impactful when training data is scarce. In some cases, augmented models trained on small datasets outperformed models trained on large datasets without augmentation.
  • Student Forcing Offers Marginal Gains (and sometimes harm): While student forcing was explored to counter exposure bias, its impact was often small, and in some combinations with data augmentation, it even slightly decreased performance. The authors note this is an area ripe for further investigation.
  • Architectural Innovations Matter More Than Baseline: The authors' modified Transformer, even without data augmentation, slightly outperformed the official shared task baseline, underscoring the value of their architectural improvements.

Key Results

The proposed system, particularly the "COPY+SF" variant (lemma copying with student forcing), achieved the best results.

  • The system achieved significant improvements over the official neural shared task baseline, outperforming it by 9.6% on the small data condition and 8.6% on the large data condition (micro-averaged full-form accuracy).
  • Specifically, the "OUR BASELINE" (Transformer with reverse positional encoding and type embeddings, no augmentation) improved the baseline by about 7%-points on the large data condition.
  • Lemma copying ("COPY") consistently improved accuracy, yielding an 8.71%-point gain under the small data condition.
  • The best performing model, "COPY+SF," achieved 57.23% accuracy on the small data condition and 71.26% on the large data condition, representing a substantial leap over the ST BASELINE (47.63% and 62.39% respectively).

Limitations and Future Work

  • Student Forcing Nuances: The authors acknowledge that they don't have a clear explanation for why student forcing sometimes harms performance when combined with data augmentation. Further investigation into this phenomenon is suggested.
  • Multilingual vs. Monolingual Baselines: The paper notes that their system is monolingual, while the shared task baseline was multilingual. They suggest that teasing apart the effects of architectural innovation versus multilingualism would be an interesting future direction.
  • Interpreting Sampling Effects: The role of sampling in spaces populated by artificial examples (generated data) is still an area that requires more interpretation.
  • Language-Specific Difficulties: While the system shows strong generalization, some languages remain significantly more challenging for inflection. Understanding the linguistic reasons behind these difficulties is a key area for future research.
  • Real-World Applicability of Lemma Copying: While the authors argue for its utility even outside of fixed test sets, further exploration of its broader applicability in dynamic scenarios could be beneficial.

Summary updated

BibTeX
@inproceedings{yang2022generalizing,
  author = {Changbing Yang and Ruixin (Ray) Yang and Garrett Nicolai and Miikka Silfverberg},
  title = {{Generalizing Morphological Inflection Systems to Unseen Lemmas}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
}
Figure