DiVERT: Distractor Generation with Variational Errors Represented as Text for Math Multiple-choice Questions

Nigel Fernandez, Alexander Scarlatos, Wanyong Feng, Simon Woodhead, Andrew S. Lan

Introduction

In educational assessment, the quality of a multiple-choice question (MCQ) depends heavily on its "distractors"—the incorrect options presented alongside the correct answer. A high-quality distractor is more than just a wrong number; it is a diagnostic tool that identifies a specific student misconception. For instance, in a fraction addition problem, a distractor reached by adding both numerators and denominators reveals a fundamental misunderstanding of fraction rules.

Manually crafting these diagnostic distractors is a labor-intensive task for educators. While Large Language Models (LLMs) have shown promise in automating content generation, they often struggle with the rigorous logic required for mathematics or produce distractors that lack a clear pedagogical rationale. DiVERT (Distractor Generation with Variational Errors Represented as Text) addresses this gap by explicitly modeling student reasoning failures as a latent text-based variable, bridging the divide between mathematical errors and the resulting incorrect answers.

The DiVERT Framework

DiVERT introduces a novel variational framework that treats the underlying student error as a latent variable. Unlike traditional models that might represent errors as abstract vectors, DiVERT represents them as human-readable text. This approach ensures that the model's "reasoning" is interpretable by educators.

Architectural Components

The system utilizes three specialized LLMs, all fine-tuned from the MetaMath-Mistral-7B base model using QLoRA:

  1. Error Prior Model ($p(e|s)$): This model predicts potential student errors based solely on the question stem ($s$). It learns the distribution of common mistakes associated with specific mathematical topics.
  2. Error Identifier Model ($q(e|s, d)$): Acting as a variational encoder, this model analyzes a question-distractor pair ($s, d$) to identify the specific error ($e$) that most likely led to that incorrect answer.
  3. Controllable Distractor Generator ($p(d|s, e)$): Serving as the decoder, this model takes the question stem and a specific error description to generate the corresponding distractor.

Variational Training with Soft Tokens

A significant technical challenge in training this architecture end-to-end is the discrete nature of text. Standard backpropagation cannot pass gradients through discrete tokens. To overcome this, the authors employ a "soft token" approximation, using a differentiable version of the embedding space during training. This allows the model to explore the "error space" and optimize the connection between reasoning failures and distractors in a fully automated, end-to-end fashion.

Experimental Setup

The researchers evaluated DiVERT using a real-world dataset from the Eedi learning platform, comprising 1,434 math MCQs across 41 subtopics, including algebra and fractions. Each question includes a stem, the correct key, and three human-authored distractors. To initialize the model, a small subset of data featuring error explanations written by middle school math teachers was used for supervised fine-tuning (SFT) before transitioning to the variational learning phase.

Key Insights and Results

Performance Against Large-Scale Models

Despite its modest size (7B parameters), DiVERT demonstrated superior performance compared to proprietary models like GPT-4o. In the "Proportional Match" metric—which measures how closely generated distractors match those created by humans—DiVERT achieved a score of 63.24% (at K=10). This outperformed GPT-4o using k-Nearest Neighbors (60.19%) and GPT-4o using Zero-shot Chain-of-Thought (50.00%). This suggests that task-specific architectural design can be more effective than raw model scale for specialized educational tasks.

Human-Level Interpretability

In a blind evaluation conducted by experienced math educators, DiVERT’s generated error explanations were rated for their pedagogical utility. DiVERT achieved an average rating of 3.07/5, nearly reaching the quality of human-authored labels (3.23/5) and significantly exceeding the performance of GPT-4o (2.56/5). The use of text as a latent variable allows the model to discover and articulate error types that were not explicitly present in the initial training data.

Efficiency and Robustness

DiVERT proved remarkably resilient to data scarcity. The model maintained high performance even when a significant portion of human error labels were removed, demonstrating that its self-supervised variational objective effectively learns the underlying structure of mathematical misconceptions.

Limitations and Future Directions

While DiVERT represents a significant step forward, the authors noted a challenge regarding "faithfulness." Occasionally, the model may generate a logically sound error description (e.g., "the student subtracted instead of added") but fail to produce a distractor that numerically follows that logic. Future iterations may incorporate a "consistency penalty" during training to ensure the generated distractor strictly adheres to the identified error.

Additionally, the authors plan to expand the framework to multi-modal contexts, such as questions involving geometry diagrams, and integrate these learned error representations into real-time tutoring systems to provide students with immediate, personalized feedback based on their specific mistakes.

Summary updated

BibTeX
@inproceedings{fernandez2024divert,
  author = {Nigel Fernandez and Alexander Scarlatos and Wanyong Feng and Simon Woodhead and Andrew S. Lan},
  title = {{DiVERT: Distractor Generation with Variational Errors Represented as Text for Math Multiple-choice Questions}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.512},
}
Figure