MathDebugger: Detecting and Diagnosing Errors in Synthetic Mathematical Data

Hao Liang, Meiyi Qiang, Yuying Li, Zefeng He, Xiaochen Ma, Ruichuan An, Yongzhen Guo, Zhengzhou Zhu, Bin Cui, Wentao Zhang

TL;DR

Synthetic math data is essential for scaling the training of Large Language Models (LLMs), but it is frequently riddled with hidden flaws. This paper introduces MathDebugger, the first text-only, type-aware benchmark designed to evaluate how well models can detect and diagnose fine-grained errors in both mathematical questions and answers. Evaluating 14 state-of-the-art LLMs reveals a prominent "solving-vs-verifying" gap, proving that even advanced reasoning models like DeepSeek-R1 and GPT-o3 struggle to audit synthetic training data.

What Problem Does This Paper Address?

To bypass the scarcity of high-quality human data, AI researchers heavily rely on synthetic datasets to train LLMs in mathematical reasoning. However, automated data generation pipelines are imperfect: models often generate flawed questions (e.g., missing crucial conditions or containing logical contradictions) or incorrect step-by-step solutions.

While existing verification tools and benchmarks focus on scoring final answers or verifying individual steps, they fail to audit the structural quality of the training data itself. MathDebugger addresses this gap by shifting the task from solving math problems to debugging them, providing a framework to evaluate whether LLMs can act as reliable automated data-cleaners.

Overview of the MathDebugger benchmark tasks

Methods

The authors constructed MathDebugger by combining targeted LLM generation with rigorous human-in-the-loop validation. They designed 10 novel question-rewriting prompts to inject specific errors and 16 prompts to diversify the mathematical contexts.

The core contribution is a fine-grained error taxonomy:

  • Question Errors: Expression Error (linguistic ambiguity), Lack of Conditions (unsolvable due to missing data), Contradictions (mutually exclusive constraints), and Unrealistic (violating real-world common sense).
  • Answer Errors: Expression, Logic, and Computational errors.

To ensure high data quality, a team of 30 STEM graduate annotators and 10 reviewers verified every item. They implemented a strict "earliest error" adjudication rule: an item is labeled based on the very first point where the mathematical logic breaks down, discarding subsequent consequential errors.

Datasets

The resulting benchmark, MathDebugger, consists of 6,000 meticulously annotated items divided into two difficulty tiers: Simple (seeded from GSM8K) and Challenging (seeded from the MATH dataset).

  • 2,000 correct questions
  • 2,000 erroneous questions (balanced evenly at 500 per error type)
  • 2,000 annotated answers (including 610 erroneous solutions)

Compared to existing datasets like ProcessBench or ErrorRadar, MathDebugger uniquely covers both the question and answer sides within a text-only format, offering a highly detailed error taxonomy.

Positioning of MathDebugger relative to existing benchmarks

Key Insights and Ideas

  • The Solving-vs-Verifying Gap: One might assume that math-tuned models (like Qwen2.5-Math) or long-chain reasoning models (like DeepSeek-R1) would excel at auditing data. Surprisingly, they consistently trail their general-purpose siblings (like Qwen2.5-72B-Instruct) at verification. Optimization for generating long solutions does not inherently translate to concise error detection.
  • Diagnosis is Capacity-Sensitive: While basic binary error detection (correct vs. incorrect) is relatively accessible to medium-sized models, fine-grained error-type classification scales monotonically with model size.
  • Actionable Supervision: Knowing why a piece of data is broken has practical utility. The authors demonstrate that providing the exact error type as a prompt prefix significantly boosts an LLM's ability to successfully correct the flawed question or answer.

Key Results

  • Benchmark Unsaturation: Current frontier models are far from saturating the benchmark. While most models can clear 75% accuracy at simply flagging whether an answer contains an error, identifying the exact type of error is significantly harder.
  • Low Typing Performance: The best Macro-F1 score for classifying answer error types on simple problems tops out at just ~55% (achieved by GPT-o3).
  • Correction Gains: Integrating error-type awareness into data-correction pipelines yielded statistically significant absolute accuracy gains of up to +4.7 percentage points (e.g., GPT-4o fixing questions suffering from a lack of conditions).

Limitations and Future Work

  • Class Imbalance in Answers: The answer-side error distribution reflects real-world synthesis flaws but is highly imbalanced (52% logic errors vs. only 10% expression errors), leading to higher evaluation variance for rarer categories.
  • Strictly Text-Based: The benchmark does not currently support multimodal mathematical data, meaning it cannot evaluate errors embedded in geometry diagrams or charts.
  • Future Directions: The authors suggest exploring the root causes of the verification deficit in reasoning models and leveraging type-aware feedback to build fully automated, self-correcting data synthesis loops.

Summary updated

Abstract

Synthetic mathematical data has become an important resource for scaling the reasoning capabilities of large language models, yet errors in generated questions and solutions can substantially undermine its value. We introduce MathDebugger, a type-aware benchmark for evaluating whether models can detect and diagnose errors in synthetic mathematical data. MathDebugger contains 2,000 correct questions, 2,000 erroneous questions balanced across four error types, and 2,000 annotated solutions, including 610 erroneous solutions spanning three error types. Each instance is manually verified and labeled for correctness, with erroneous instances further assigned a fine-grained error category. Human annotation achieves substantial to near-perfect agreement, with per-type Fleiss kappa ranging from 0.69 to 0.91. We evaluate 14 representative large language models and three process reward models. The results show that even strong reasoning models remain far from saturating MathDebugger, particularly when identifying fine-grained error types. We also uncover a consistent solving-verification gap: models specialized for mathematical reasoning or long-form reasoning do not necessarily outperform their general-purpose counterparts when auditing mathematical data. Finally, we show that explicit error-type information provides actionable guidance for correcting erroneous questions and solutions, yielding consistent and statistically significant improvements. MathDebugger provides a practical benchmark for developing more reliable mathematical data synthesis and quality-control pipelines.
BibTeX
@misc{liang2025mathdebugger,
  author = {Hao Liang and Meiyi Qiang and Yuying Li and Zefeng He and Xiaochen Ma and Ruichuan An and Yongzhen Guo and Zhengzhou Zhu and Bin Cui and Wentao Zhang},
  title = {{MathDebugger: Detecting and Diagnosing Errors in Synthetic Mathematical Data}},
  year = {2025},
  eprint = {2502.19058},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.19058},
}
Figure