cd /news/large-language-models/reasoning-code-or-both-how-large-lan… · home topics large-language-models article
[ARTICLE · art-14911] src=arxiv.org pub= topic=large-language-models verified=true sentiment=· neutral

Reasoning, Code, or Both? How Large Language Models Handle Variations in Math Questions

Large language models (LLMs) show reduced accuracy on math problems when simple details like names or numbers are changed, and a new study finds that using code execution methods does not improve this robustness. Researchers tested three approaches—chain-of-thought reasoning, single-shot code execution, and iterative code execution—on 1,000 modified problems from the GSM-Symbolic dataset using Claude Haiku 4.5. Chain-of-thought proved the most robust, with a 1.3 percentage point accuracy drop and 1.8% of problems breaking, while code execution methods performed worse, indicating that generating and running Python code does not enhance reasoning stability for grade-school-level math variations.

read1 min publishedMay 27, 2026
arXiv:2605.26414v1 Announce Type: new
Abstract: Large Language Models (LLMs) achieve impressive accuracy on mathematical reasoning benchmarks, yet their performance drops when problems are modified with simple changes like different names or numbers. Code execution methods, which let models generate and run Python code instead of reasoning in natural language, have been proposed as a solution, but their effect on reasoning robustness (the ability to maintain accuracy across problem variations) has not been systematically tested. This study evaluates three approaches on 1,000 problems from the GSM-Symbolic dataset: pure reasoning using chain-of-thought (CoT) prompting, single-shot code execution using Program-Aided Language models (PAL), and iterative code execution using Step-by-Step Coding (SBSC). All three were run on paired original and modified problems using Claude Haiku 4.5. CoT was the most robust method, with an accuracy drop of 1.3 percentage points and 1.8% of problems breaking under perturbation. PAL was the least robust at 1.7 percentage points and 3.1% broke, with SBSC falling in between. Although these differences were not statistically significant ($p = .096$), the directional trend was consistent across all measures, suggesting that code execution, whether single-shot or iterative, does not improve reasoning robustness on grade-school-level problem variations.
── more in #large-language-models 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/reasoning-code-or-bo…] indexed:0 read:1min 2026-05-27 ·