Skip to main content
QUICK REVIEW

[Paper Review] Automatic Short Math Answer Grading via In-context Meta-learning

Mengxue Zhang, Sami Baral|arXiv (Cornell University)|May 30, 2022
Online Learning and AnalyticsComputer Science12 citations
TL;DR

This paper proposes a novel in-context meta-learning framework for automatic short answer grading in math education using fine-tuned MathBERT. By incorporating scoring examples as context during inference, the model achieves superior generalization to unseen questions, significantly outperforming prior methods—especially on new, untrained questions—while avoiding per-question model training and leveraging domain-specific language understanding.

ABSTRACT

Automatic short answer grading is an important research direction in the exploration of how to use artificial intelligence(AI)-based tools to improve education. Current state-of-the-art approaches use neural language models to create vectorized representations of students' responses, followed by classifiers to predict the score. However, these approaches have several key limitations, including i) they use pre-trained language models that are not well-adapted to educational subject domains and/or student-generated text and ii) they al-most always train one model per question, ignoring the link-age across questions and resulting in a significant model storage problem due to the size of advanced language models. In this paper, we study the problem of automatic short answer grad-ing for students' responses to math questions and propose a novel framework for this task. First, we use MathBERT, a variant of the popular language model BERT adapted to mathematical content, as our base model and fine-tune it on the downstream task of student response grading. Second, we use an in-context learning approach that provides scoring examples as input to the language model to provide additional context information and promote generalization to previously unseen questions. We evaluate our framework on a real-world dataset of student responses to open-ended math questions and show that our framework (sometimes significantly) outperforms existing approaches, especially for new questions that are not seen during training.

Motivation & Objective

  • Address the limitations of existing automatic short answer grading (ASAG) systems that rely on question-specific models and generic language models unsuited for mathematical content.
  • Improve generalization to previously unseen math questions by leveraging in-context learning with shared model parameters across all questions.
  • Enhance representation of student responses by using MathBERT, a BERT variant pre-trained on mathematical text and expressions, to better capture symbolic and linguistic components in student answers.
  • Reduce model storage and management overhead by training a single shared model instead of one per question, enabling scalable deployment in educational platforms.

Proposed method

  • Fine-tune MathBERT, a BERT-based language model pre-trained on mathematical content, on a real-world dataset of student responses to math questions.
  • Design a structured input format that includes the question, student response, and multiple labeled example responses with scores as in-context demonstrations.
  • Apply meta-learning principles by training the model to adapt quickly to new questions using few-shot in-context examples during inference.
  • Use a shared, multi-task learning setup where the same model processes all questions, with context examples providing task-specific guidance.
  • Optimize the input prompt design to include relevant context such as question type, skills, and correct answer structure to improve model alignment with human scoring standards.
  • Leverage the model’s attention mechanism to weigh the relevance of in-context examples when predicting scores for new responses.

Experimental results

Research questions

  • RQ1Can a single, shared model trained with in-context learning generalize effectively to new, previously unseen math questions without fine-tuning per-question?
  • RQ2Does using MathBERT as a base model improve scoring accuracy compared to standard BERT for math-specific short answer grading?
  • RQ3How does in-context learning with example responses affect model performance, especially on rare or unseen question types?
  • RQ4What are the main failure modes of the proposed framework in handling numerical errors, spelling variations, or paraphrased responses?
  • RQ5Can the framework reduce the need for per-question model training while maintaining or improving scoring accuracy?

Key findings

  • The proposed in-context meta-learning framework significantly outperforms existing state-of-the-art methods, especially on previously unseen questions, demonstrating strong generalization capability.
  • Despite using MathBERT as the base model, which is specifically designed for mathematical content, the model's performance was worse than standard BERT in the initial setup, indicating challenges in adapting MathBERT to the specific grading task.
  • The in-context learning component—providing example responses with scores as input—was the key driver of improved performance, enabling the model to generalize effectively across diverse questions.
  • The model struggles with numerical reasoning errors, such as incorrect operators or reversed number orders (e.g., "15*5=3"), often overestimating such responses due to token-level similarity.
  • Spelling errors in key terms like "equals" lead to unjustified score penalties, even when the mathematical meaning remains clear to human graders.
  • Paraphrased responses containing non-essential phrases (e.g., "I think that it is") are misclassified due to added noise, indicating sensitivity to linguistic variation rather than semantic content.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.