LLMs cannot spot math errors, even when allowed to peek into the solution

Kv Aditya Srivatsa, Kaushal Kumar Maurya, Ekaterina KochmarEMNLP 2025

TL;DR

Large Language Models (LLMs) are great at solving math problems, but they're surprisingly bad at identifying errors in student solutions, even when given the correct answer. This paper shows that providing a "corrected" version of the student's solution, which aligns more closely with their original approach, significantly improves LLMs' ability to pinpoint the first mistake.

What Problem Does This Paper Address?

LLMs have become incredibly adept at solving complex math word problems, achieving near-human accuracy on benchmarks like GSM8K. However, a crucial aspect of mathematical understanding and learning is the ability to identify and correct errors. This paper focuses on a specific type of "meta-reasoning" task: teaching LLMs to act like tutors by spotting the first error in a student's step-by-step solution. Existing research shows that LLMs that excel at solving problems often fail at this error localization task. The challenge is that student solutions and "gold standard" (correct) solutions can differ significantly in their approach and step alignment, making it hard for LLMs to compare them effectively.

Methods

The core of this paper's contribution lies in its proposed method for improving LLM error localization. Instead of just providing the LLM with the original problem and the student's incorrect solution, or even the correct "gold" solution, they introduce a "corrected student solution." This corrected solution is generated by another LLM and aims to:

  1. Preserve the student's original approach: It doesn't rewrite the solution from scratch but rather modifies the student's steps.
  2. Align structurally and stylistically: It tries to match the student's way of thinking and notation as much as possible, especially up to the point of the first error.
  3. Fix errors using the gold solution: It uses the correct answer as a guide to ensure the intermediate steps are mathematically sound.

This "corrected student solution" acts as a more direct and comparable reference for the LLM tasked with error detection. The authors then evaluate LLMs under three prompting conditions:

  • w/o-S: Problem + Student Solution
  • w-GS: Problem + Student Solution + Gold Solution
  • w-Cor: Problem + Student Solution + Corrected Student Solution

Datasets

The study utilizes two existing datasets for evaluating error localization in math word problems:

  • VtG (Daheim et al., 2024): Contains 1,002 incorrect stepwise student solutions to grade-school math problems. These are sourced from MathDial and originally from GSM8K. Each error is annotated with its step, description, and type.
  • PRM800K (Lightman et al., 2023): Features 80,000 incorrect stepwise student solutions to more advanced math problems from the MATH dataset. It includes annotations for the first erroneous step.

Key Insights and Ideas

  • LLMs are bad at meta-reasoning: Even top-performing LLMs struggle to identify errors in student work, highlighting a gap between problem-solving prowess and diagnostic capability.
  • Gold solutions help, but not enough: Providing the correct "gold" solution improves LLM performance on error localization, but the gains are often modest.
  • "Corrected student solutions" are key: The novel approach of generating an intermediate, corrected version of the student's solution significantly boosts LLM accuracy in finding the first error. This works because it maintains better step-level alignment with the student's original reasoning.
  • Alignment matters more than problem-solving skill: Feature importance analysis shows that semantic alignment between the student's and reference solution (up to the error) is a stronger predictor of successful error localization than the LLM's general problem-solving ability.
  • Error type influences localization: The paper suggests that different types of errors (e.g., misunderstanding vs. calculation errors) might be localized differently, hinting at more nuanced approaches for error detection.

Key Results

  • w/o-S vs. w-GS: Providing the gold solution (w-GS) consistently improved error localization accuracy compared to just the problem and student solution (w/o-S) across most models.
  • w-GS vs. w-Cor: The "corrected student solution" (w-Cor) prompt generally yielded the highest accuracy for error localization, outperforming the w-GS prompt for most LLMs.
  • Performance gains: For instance, on the VtG dataset, Llama3.1-405B achieved 62.38% accuracy with w-GS, which increased to 64.77% with w-Cor. LearnLM-1.5-Pro saw a similar boost from 64.07% to 63.67% (though this specific model showed less gain, as discussed below).
  • Model-specific variations: While most models benefited from w-Cor, LearnLM-1.5-Pro, already fine-tuned for pedagogical reasoning, showed minimal improvement, suggesting its existing capabilities already leverage gold solution signals effectively. Qwen2.5-72B-Math, fine-tuned for problem-solving, performed poorly on error localization, even dropping in accuracy with additional context.
  • Error proximity: Even when LLMs failed to pinpoint the exact first error step, their predictions were often close (within ±1 or ±2 steps), especially on the more complex PRM800K dataset.

Limitations and Future Work

  • Domain Specificity: The study is limited to math word problems. It's unclear if these findings generalize to other domains requiring similar meta-reasoning.
  • LLM-Generated Corrections: While validated for correctness, the "corrected student solutions" might still contain subtle inconsistencies. Expert-annotated corrections were not used due to resource constraints.
  • Prompting Strategies: Advanced prompting techniques like "tree-of-thought" were not explored, leaving potential for further improvements.
  • Language Barrier: The study was conducted solely in English, and performance might differ in languages with less data.

Future work could explore these limitations, potentially by developing LLMs specifically tuned for error detection and feedback, and investigating more sophisticated alignment strategies. The authors also suggest that error-step prediction strategies could be tailored based on the type of error identified.

Summary updated

BibTeX
@inproceedings{srivatsa2025llms,
  author = {Kv Aditya Srivatsa and Kaushal Kumar Maurya and Ekaterina Kochmar},
  title = {{LLMs cannot spot math errors, even when allowed to peek into the solution}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure