mlsanityData to 14 Oct 2026

Evaluating Intermediate Reasoning of Code-Assisted Large Language Models for Mathematics

arXiv 2504.17665 ↗First posted 24 Apr 2025cs.CLcited by 1

On the map: LLM reasoning → Mathematical reasoning

Abstract (arXiv)

Assisting LLMs with code generation improved their performance on mathematical reasoning tasks. However, the evaluation of code-assisted LLMs is generally restricted to execution correctness, lacking a rigorous evaluation of their generated programs. In this work, we bridge this gap by conducting an in-depth analysis of code-assisted LLMs generated programs in response to math reasoning tasks, with a focus on evaluating the soundness of the underlying reasoning processes. For this purpose, we assess the generations of five LLMs, on several math datasets, both manually and automatically, and propose a taxonomy of generated programs based on their logical soundness. Our findings show that the capabilities of models significantly impact the logic implemented to solve the problem. Closed-source LLMs ground their programs in mathematical concepts, whereas open-source models often resort to unsound reasoning, relying on memorized information and exhaustive searches. Furthermore, increasing the difficulty of problems decreases sound generations for all models, revealing a critical shortcoming of LLMs on complex mathematics, contrary to what accuracy metrics suggest. Our work highlights the need for more holistic evaluations of code-assisted LLMs beyond execution accuracy metrics, toward a better understanding of LLMs' limits in the math domain.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 22 of its 34 references that are in the map. First posted on arXiv 24 Apr 2025.

Builds on

22 of 34 references.

Closest ancestors · 5

Same direction, newest first

  1. 2024Evaluating Mathematical Reasoning of Large Language Models: A Focus on Error Identification and Correction2 Jun
  2. 2024MATHSENSEI: A Tool-Augmented Large Language Model for Mathematical Reasoning27 Feb
  3. 2023ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving29 Sep
  4. 2023Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-Verification15 Aug
  5. 2023MathPrompter: Mathematical Reasoning using Large Language Models4 Mar

Other references · 17

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
  5. 2024Qwen2.5 Technical Reportcited by 4,942
  6. 2023Let's Verify Step by Stepcited by 3,789
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  8. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  9. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  10. 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 487
  11. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  12. 2023Faithful Chain-of-Thought Reasoningcited by 288
5 more
  1. 2022ROSCOE: A Suite of Metrics for Scoring Step-by-Step Reasoningcited by 177
  2. 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 102
  3. 2024LLM Reasoners: New Evaluation, Library, and Analysis of Step-by-Step Reasoning with Large Language Modelscited by 70
  4. 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 53
  5. 2024How Interpretable are Reasoning Explanations from Prompting Large Language Models?cited by 29

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Thinking Machines: Mathematical Reasoning in the Age of LLMs
  2. 2025Do LLMs Overthink Basic Math Reasoning? Benchmarking the Accuracy-Efficiency Tradeoff in Language Models
  3. 2024Evaluating LLMs' Mathematical and Coding Competency through Ontology-guided Interventions
  4. 2025Mathematical Reasoning in Large Language Models: Assessing Logical and Arithmetic Errors across Wide Numerical Ranges
  5. 2026Rethinking Math Reasoning Evaluation: A Robust LLM-as-a-Judge Framework Beyond Symbolic Rigidity
  6. 2025Can LLMs textitunderstand Math? -- Exploring the Pitfalls in Mathematical Reasoning
  7. 2026Mathematical Reasoning in Large Language Models: Benchmarks, Architectures, Evaluation, and Open Challenges
  8. 2023MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical Reasoning