RefGrader: Automated Grading of Mathematical Competition Proofs using Agentic Workflows

Hamed Mahdavi, Pouria Mahdavinia, Pegah Mohammadipour, Samira Malek, Alireza Farhadi, Majid Daliri, Alireza Hashemi, Niloofar Mireshghallah, Amir Khasahmadi, Vasant G. Honavar · DOI

TL;DR

Large Language Models (LLMs) are now capable of solving complex math competition problems, but can they grade them? This paper introduces "RefGrader," an agentic workflow that uses LLMs to automatically generate grading rubrics from reference solutions. RefGrader significantly improves upon single-step LLM grading, achieving better agreement with human graders and more consistent assignment of partial credit for mathematical proofs.

What Problem Does This Paper Address?

The paper tackles the challenge of automated grading for complex mathematical competition proofs, such as those found in the International Mathematical Olympiad (IMO). While recent LLMs have shown impressive capabilities in solving these problems, their ability to grade them reliably, especially in assigning nuanced partial credit, has been questionable. Traditional automated grading often relies on binary correctness or simple keyword matching, failing to capture the subtleties of a proof's logic, error severity, and the awarding of partial credit. This gap is critical for educational applications and for developing more sophisticated AI systems that can understand and evaluate complex reasoning.

Methods

The authors introduce "RefGrader," a multi-step agentic workflow designed to automate the grading of mathematical proofs. The core idea is to leverage reference solutions to dynamically generate problem-specific grading rubrics. The workflow involves several stages:

  1. Reference Solution Clustering: Grouping similar reference solutions to identify common strategic approaches.
  2. Solution Matching: Identifying the most similar reference solution group for a given student proof.
  3. Solution Analysis: Deconstructing the reference solution into "Key Strategic Insights" (main ideas or "aha moments") and their detailed sub-steps.
  4. Rubric Design: Automatically generating a grading rubric by assigning points to these Key Strategic Insights and defining rules for allocating partial credit based on the sub-steps. This can be done using various strategies, including approachability-based weighting (how difficult a step is to discover) or milestone-based rubrics (focusing on logical achievements).
  5. Grading: Using the generated rubric to evaluate the student's proof, detecting errors and assigning a score.

The paper also explores different "agentic workflows" (combinations of these steps) and ablations to understand the contribution of each component.

Datasets

The study utilizes two primary datasets:

  1. IMO Shortlist Dataset: A curated set of 90 challenging IMO-style problems. For each problem, Gemini 2.5 Pro generated a solution, which was then manually graded on a 1-4 scale and annotated with specific error types and locations by expert evaluators.
  2. MathArena Dataset: A collection of 385 solutions for IMO/USAMO 2025 problems, graded on a 0-7 scale by human judges.

Key Insights and Ideas

  • Single-step LLM grading is insufficient for partial credit: While LLMs can identify incorrect proofs, they struggle to assign nuanced partial credit accurately. They tend to be overly optimistic, assigning higher scores than warranted for incomplete proofs.
  • Reference solutions are crucial for rubric generation: Dynamically creating rubrics from reference solutions allows LLMs to better understand the problem's structure and the expected reasoning path, leading to more calibrated grading.
  • Agentic workflows significantly improve grading: Breaking down the grading process into multiple steps, especially those involving rubric generation from reference solutions, leads to substantial improvements in agreement with human grades and partial credit assignment.
  • Different rubric design strategies have trade-offs: Both approachability-weighted and milestone-based rubric designs show strong performance, suggesting that focusing on the difficulty of discovering insights or the logical necessity of achievements are effective strategies.
  • Caching is key for efficiency: Many steps in the agentic workflow can be cached, making the overall process more cost-effective despite the increased token usage.

Key Results

  • RefGrader workflows consistently outperformed single-turn LLM grading across various metrics (Pearson, Spearman, MAE, RMSE, QWK, AC2) on both the IMO Shortlist and MathArena datasets.
  • For instance, on the IMO Shortlist, the best RefGrader variants achieved Pearson correlations around 0.73 and QWK scores around 0.83, significantly higher than the single-turn grader's 0.60 and 0.43, respectively.
  • The multi-step approach demonstrated a much better ability to detect partial progress in solutions, a task where single-step grading struggled.
  • The paper releases code, data, and prompts to facilitate further research in automated mathematical proof grading.

Limitations and Future Work

  • Token Consumption: While caching helps, agentic workflows still require more tokens than single-turn grading, leading to higher computational costs.
  • Ensembling: The paper briefly mentions that ensembling predictions from multiple RefGrader variants can further improve performance, suggesting this as a promising avenue for future work.
  • Generalizability: While tested on IMO-style problems, further research is needed to assess the generalizability of RefGrader to other domains or types of mathematical reasoning.
  • Human-LLM Collaboration: The authors suggest future work could explore how these grading workflows can support human educators and students.

Summary updated

BibTeX
@misc{mahdavi2025refgrader,
  author = {Hamed Mahdavi and Pouria Mahdavinia and Pegah Mohammadipour and Samira Malek and Alireza Farhadi and Majid Daliri and Alireza Hashemi and Niloofar Mireshghallah and Amir Khasahmadi and Vasant G. Honavar},
  title = {{RefGrader: Automated Grading of Mathematical Competition Proofs using Agentic Workflows}},
  year = {2025},
  eprint = {2510.09021},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.09021},
}
Figure