Learning from Partially Annotated Data: Example-aware Creation of Gap-filling Exercises for Language Learning

Semere Kiros Bitew, Johannes Deleu, A. Seza Dogruöz, Chris Develder, Thomas Demeester

Abstract

Creating high-quality gap-filling (cloze) exercises is a labor-intensive task for educators. Traditional automation relies on either rigid heuristic rules or expensive, fully annotated datasets. We propose an Example-aware Span Detection Model that learns to identify pedagogical gaps by observing a small set of exemplar sentences. By leveraging a pre-trained multilingual transformer and a dot-product matching mechanism, our model captures the "hidden rules" of an exercise—such as specific verb tenses—without explicit supervision. Our approach, evaluated on the new GF2 benchmark, achieves an F1 score of 82.4%, demonstrating significant improvements in both precision and grammatical relevance over static baselines.

Introduction

Gap-filling exercises are a staple of language learning, yet their manual creation is time-consuming. Automated systems often struggle with the nuance required for effective pedagogy. Simple rule-based systems (e.g., "n-th word deletion") often produce irrelevant gaps, while fully supervised models require datasets where every gap is meticulously labeled with grammatical metadata (e.g., "this gap targets the French futur simple"). Such expert annotation is rare and expensive to produce.

This research addresses the challenge of learning from partially annotated data. We aim to develop a model that can look at an existing exercise, infer the underlying grammatical target (the "exemplar"), and apply that logic to new texts. This "monkey see, monkey do" approach allows for flexible exercise generation without hard-coded rules.

Methodology: Example-aware Span Detection

The core of our approach is a model that is "conditioned" on examples rather than fixed rules. The architecture consists of several key components:

  1. Backbone: We utilize XLM-RoBERTa, a pre-trained multilingual transformer, to encode both the input text and the exemplar.
  2. Exemplar Encoding: The model receives an "exemplar"—a set of sentences where gaps are marked with special tokens ([[ and ]]). This is compressed into a single vector (using the [CLS] token) representing the exercise's "style" or "rule."
  3. Span Embedding: For the target input text, the model generates embeddings for every possible sequence of words (span) by concatenating the start and end token representations with a width embedding.
  4. Matching Logic: The model computes a compatibility score via a dot product between the span's representation and the exemplar vector.
Figure 3: Architecture of the Example-aware Span Detection Model showing the dot product between span embeddings and exemplar vectors.

This architecture allows the model to dynamically adapt. If the exemplar highlights past-tense verbs, the matching mechanism naturally prioritizes similar structures in the new text, effectively "following" the teacher's implicit instructions.

The GF2 Dataset

To evaluate this approach, we introduce the GF2 (Gap-Filling for Grammar in French) benchmark. Derived from real-world exercises on the Televic Education platform, it consists of 768 documents and over 5,500 human-selected gaps. Unlike synthetic datasets, GF2 reflects real-world pedagogical choices, including inconsistencies where teachers may skip certain valid verbs to focus on specific learning objectives. For evaluation purposes, the authors manually labeled the test set with 12 different French verb tenses to measure the model's ability to distinguish between them.

Results and Discussion

Our example-aware model significantly outperforms static baselines that lack access to exemplars.

Figure 6: Overall performance comparison showing the improvement in Precision, Recall, and F1 score.

As shown in the results, the model achieved an 82.4% F1 score, an 8.5 percentage point improvement over the baseline. Notably, the model reached 84.3% precision, ensuring that suggested gaps are pedagogically useful and grammatically valid.

Emergent Grammar Recognition

A key finding is the model's ability to "disentangle" grammatical categories. Despite never being trained on labels like "Imparfait" or "Subjonctif," the model learned to distinguish between them based solely on the provided exemplar. In tense-specific identification tasks, the model's Macro F1 reached 24.4%, nearly doubling the baseline's performance of 13.9%. This suggests that the span-based approach effectively captures multi-word verb constructions (e.g., passé composé) which are essential for advanced grammar instruction.

Conclusion and Future Work

By shifting from static rules to example-driven detection, we provide a flexible tool for automated exercise generation. While currently focused on French, the architecture is language-agnostic and demonstrates that models can learn complex pedagogical rules from minimal, partially annotated data. Future research will explore generative models to provide "hints" (e.g., infinitives) and mitigate topical biases, further streamlining the workflow for language educators.

Summary updated

BibTeX
@inproceedings{bitew2023learning,
  author = {Semere Kiros Bitew and Johannes Deleu and A. Seza Dogruöz and Chris Develder and Thomas Demeester},
  title = {{Learning from Partially Annotated Data: Example-aware Creation of Gap-filling Exercises for Language Learning}},
  booktitle = {BEA @ ACL},
  year = {2023},
  doi = {10.18653/v1/2023.bea-1.51},
}
Figure