[Paper Review] Can LLMs Master Math? Investigating Large Language Models on Math Stack Exchange
This study evaluates large language models (LLMs) on open-ended mathematical questions from Math Stack Exchange using a two-stage approach: benchmarking state-of-the-art LLMs on 78 real-world math questions and conducting a detailed case analysis on GPT-4. GPT-4 achieves the highest performance (nDCG=0.48, P@10=0.37), outperforming prior methods on ArqMATH3 Task1, but still struggles with complex reasoning, revealing persistent gaps in mathematical accuracy and consistency despite strong surface-level coherence.
Large Language Models (LLMs) have demonstrated exceptional capabilities in various natural language tasks, often achieving performances that surpass those of humans. Despite these advancements, the domain of mathematics presents a distinctive challenge, primarily due to its specialized structure and the precision it demands. In this study, we adopted a two-step approach for investigating the proficiency of LLMs in answering mathematical questions. First, we employ the most effective LLMs, as identified by their performance on math question-answer benchmarks, to generate answers to 78 questions from the Math Stack Exchange (MSE). Second, a case analysis is conducted on the LLM that showed the highest performance, focusing on the quality and accuracy of its answers through manual evaluation. We found that GPT-4 performs best (nDCG of 0.48 and P@10 of 0.37) amongst existing LLMs fine-tuned for answering mathematics questions and outperforms the current best approach on ArqMATH3 Task1, considering P@10. Our Case analysis indicates that while the GPT-4 can generate relevant responses in certain instances, it does not consistently answer all questions accurately. This paper explores the current limitations of LLMs in navigating complex mathematical problem-solving. Through case analysis, we shed light on the gaps in LLM capabilities within mathematics, thereby setting the stage for future research and advancements in AI-driven mathematical reasoning. We make our code and findings publicly available for research: \url{https://github.com/gipplab/LLM-Investig-MathStackExchange}
Motivation & Objective
- To assess the proficiency of state-of-the-art LLMs in answering open-ended, conceptually rich mathematical questions from real-world sources.
- To identify the strengths and limitations of LLMs in mathematical reasoning beyond standard benchmark datasets.
- To evaluate whether fine-tuned LLMs can reliably generate accurate, coherent, and mathematically correct responses to complex questions requiring deep conceptual understanding.
- To establish a benchmark for LLM performance on Math Stack Exchange questions, which reflect the diversity and complexity of real mathematical discourse.
- To publicly release code and model outputs to enable reproducibility and further research in AI-driven mathematical reasoning.
Proposed method
- The study selects 78 open-ended mathematical questions from Math Stack Exchange (MSE), covering a broad range of difficulty and mathematical domains.
- It evaluates multiple fine-tuned LLMs, including GPT-4, Mistral, and smaller models like Tora-7b-Code, on their ability to generate relevant and accurate answers.
- Performance is measured using standard IR metrics: normalized Discounted Cumulative Gain (nDCG) and Precision@10 (P@10), with relevance determined by human judgment.
- A detailed case study is conducted on GPT-4, involving manual evaluation of answer quality, logical consistency, and mathematical correctness.
- The study compares model outputs against reference answers and identifies common failure modes such as hallucination, incorrect reasoning, and misinterpretation of mathematical notation.
- All model-generated answers and evaluation code are made publicly available via a GitHub repository to support reproducibility and future research.
Experimental results
Research questions
- RQ1How do state-of-the-art LLMs perform on real, open-ended mathematical questions from Math Stack Exchange compared to standardized benchmarks?
- RQ2Which LLM architecture demonstrates the highest relevance and accuracy in answering complex mathematical queries requiring conceptual reasoning?
- RQ3To what extent do LLMs, even those fine-tuned for math, produce logically sound and mathematically correct answers on advanced topics?
- RQ4What are the primary failure modes and reasoning errors in LLM-generated mathematical responses, especially in proofs and abstract concepts?
- RQ5Can retrieval-augmented or conversational-style outputs from LLMs improve answer relevance, even if they lack factual correctness?
Key findings
- GPT-4 achieves the highest performance among tested LLMs, with an nDCG score of 0.48 and a P@10 of 0.37 on the MSE question set.
- GPT-4 outperforms the current best approach on ArqMATH3 Task1 in terms of P@10, indicating strong retrieval and relevance capabilities.
- Despite high relevance scores, GPT-4 fails to answer many complex questions accurately, especially those requiring deep conceptual or proof-based reasoning.
- Smaller models like Tora-7b-Code and Mistral produce low-quality outputs, often misunderstanding prompts, generating incoherent reasoning, or returning only end-of-sequence tokens.
- The case study reveals that GPT-4 frequently generates plausible-sounding but logically flawed or incorrect answers, particularly in number theory and abstract algebra contexts.
- The study demonstrates that even top-performing LLMs struggle with mathematical precision and consistency, highlighting a critical gap in reasoning reliability for advanced mathematics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.