MathAgent: Leveraging a Mixture-of-Math-Agent Framework for Real-World Multimodal Mathematical Error Detection

Yibo Yan, Shen Wang, Jiahao Huo, Philip S. Yu, Xuming Hu, Qingsong Wen · OpenReview

Abstract

Mathematical error detection in educational settings presents a significant challenge for Multimodal Large Language Models (MLLMs), requiring a sophisticated understanding of both visual and textual mathematical content along with complex reasoning capabilities. Though effective in mathematical problem-solving, MLLMs often struggle with the nuanced task of identifying and categorizing student errors in multimodal mathematical contexts. Therefore, we introduce MathAgent, a novel Mixture-of-Math-Agent framework designed specifically to address these challenges. Our approach decomposes error detection into three phases, each handled by a specialized agent: an image-text consistency validator, a visual semantic interpreter, and an integrative error analyzer. This architecture enables more accurate processing of mathematical content by explicitly modeling relationships between multimodal problems and student solution steps. We evaluate MathAgent on real-world educational data, demonstrating approximately 5% higher accuracy in error step identification and 3% improvement in error categorization compared to baseline models. Besides, MathAgent has been successfully deployed in an educational platform that has served over one million K-12 students, achieving nearly 90% student satisfaction while generating significant cost savings by reducing manual error detection.

Introduction

While Multimodal Large Language Models (MLLMs) like GPT-4o have demonstrated remarkable proficiency in solving complex mathematical problems, their ability to detect errors in student work remains a significant bottleneck. Error detection is fundamentally more demanding than problem-solving; it requires the model to parse potentially flawed reasoning, map it against visual elements such as geometry diagrams or tables, and identify the precise point of logical failure.

Existing MLLMs frequently suffer from "semantic misalignment," where the model misinterprets a diagram or fails to notice contradictions between a student's written steps and the visual cues provided in the problem. Furthermore, manual error detection by human experts is unscalable for digital learning platforms serving millions of students. MathAgent addresses these gaps by transitioning from a monolithic model approach to a specialized, multi-agent pipeline designed for high-precision mathematical analysis.

The MathAgent Framework

The core of MathAgent is a Mixture-of-Math-Agent framework that decomposes the error detection task into three sequential phases:

  1. Phase 1: Image-Text Consistency Validator: This agent serves as an initial gatekeeper. It evaluates the redundancy and consistency between the problem's text and its accompanying image. If the information is highly consistent, the system can streamline the process; if discrepancies or high complexity are detected, it flags the need for intensive visual analysis.
  2. Phase 2: Visual Semantic Interpreter: Rather than relying on a general MLLM to interpret raw pixels during reasoning, this phase employs specialized models to translate visual data into formal symbolic language. For instance, it utilizes Inter-GPS for geometry to convert diagrams into logic-based descriptions (e.g., Triangle(A,B,C)) and StructTable for tabular data. This symbolic representation grounds the final analysis in verifiable facts rather than potentially hallucinated visual features.
  3. Phase 3: Integrative Error Analyzer: The final agent synthesizes the textual problem, the translated symbolic visual data, the ground-truth solution, and the student's submission. It performs a granular, step-by-step comparison to achieve two goals: Error Step Identification (pinpointing where the logic failed) and Error Categorization (determining why the error occurred).

Experimental Setup and Dataset

The framework was evaluated using a real-world dataset of 2,500 multimodal mathematical questions sourced from authentic student submissions on a K-12 educational platform. The dataset composition reflects the diversity of school curricula:

  • 62.4% Plane Geometry
  • 11.5% Algebra
  • 9.3% Diagrams
  • Remaining: Solid Geometry and Mathematical Commonsense.

Unlike synthetic benchmarks, this dataset contains authentic "flawed reasoning" from students. Every error step and category was verified by a panel of three experienced educational specialists to ensure ground-truth accuracy.

Key Results and Impact

MathAgent was benchmarked against leading models, including GPT-4o, Gemini-Pro-1.5, and InternVL2. The results demonstrate the clear advantage of the multi-agent approach:

  • Performance Gains: MathAgent improved error step identification by an average of 5.2% and error categorization by 3.2% over baseline models. When GPT-4o was integrated as the core analyzer within the MathAgent framework, its performance rose from 54.09% to 57.30%.
  • Visual Accuracy: The most significant improvements were observed in Visual Perception (VIS) and Misinterpretation (MIS) errors, confirming that symbolic translation effectively mitigates the visual reasoning weaknesses of standard MLLMs.
  • Industrial Deployment: Beyond theoretical gains, MathAgent has been deployed at scale, serving over one million students. The system achieved a 90% student satisfaction rate and generated approximately $1.2 million in annual savings by automating tasks that previously required manual expert annotation (costing ~$1 per problem).

Discussion and Future Work

The success of MathAgent highlights that symbolic translation often outperforms raw visual processing for logical tasks. By separating the interpretation of an image from the analysis of logic, the framework significantly reduces hallucinations.

However, limitations remain. The system's performance is sensitive to the quality of initial multimodal inputs, and the current error taxonomy—covering Visual, Calculation, Reasoning, Knowledge, and Misinterpretation—could be expanded to capture more granular student misconceptions. Future research will explore the integration of "slow-thinking" mechanisms, such as long-chain-of-thought reasoning and reinforcement learning, to further refine the depth of mathematical error analysis.

Summary updated

BibTeX
@misc{yan2025mathagent,
  author = {Yibo Yan and Shen Wang and Jiahao Huo and Philip S. Yu and Xuming Hu and Qingsong Wen},
  title = {{MathAgent: Leveraging a Mixture-of-Math-Agent Framework for Real-World Multimodal Mathematical Error Detection}},
  year = {2025},
  eprint = {2503.18132},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.18132},
}
Figure