使用可执行符号表示,使大语言模型算术推理的准确率随问题复杂度的增加而更好地提升
摘要
这篇发表于《Neurocomputing》的论文介绍了 GSM 算术基准(GSM-AB),并表明,Lean 和 Python 思维程序(Program-of-Thought)等可执行符号表示能够提高大语言模型的算术准确率,并减缓其准确率随操作数位数和运算次数增加而下降的趋势。
arXiv:2611.27203v1 Announce Type: new
Abstract: High accuracy on mathematical benchmarks does not establish whether reasoning remains reliable as problem complexity increases. We examine how executable symbolic representations change accuracy scaling in large language models compared with natural-language reasoning. To address this limitation, we introduce the GSM Arithmetic Benchmark (GSM-AB), a controlled benchmark that independently varies operand digit length and operation count to probe numerical scale and compositional complexity. We find that executable representations can improve accuracy and slow its decline as complexity increases. Lean reduces average sensitivity to operand digit length at every tested model size. By contrast, slower degradation with increasing operation count emerges at the larger model sizes. A Python program-of-thought (Python-PoT) control shows a similar operation-axis pattern, suggesting that this finding is not specific to Lean. These findings show that reasoning representation shapes arithmetic accuracy scaling and support executable symbolic representations for more reliable reasoning on complex arithmetic tasks.
查看缓存全文
缓存时间: 2026/11/23 09:25
# Improved Accuracy Scaling with Problem Complexity in LLM Arithmetic Reasoning Using Executable Symbolic Representations Source: [https://arxiv.org/html/2611.27203](https://arxiv.org/html/2611.27203) Journal:NeurocomputingYu\-Bin LiuAffiliation:Center for Quantum Physics and Intelligent Sciences, Department of Physics, Capital Normal University, Beijing, ChinaShi\-Ju RanEmail:[sjran@cnu\.edu\.cn](mailto:[email protected])Corresponding author:Corresponding authorAffiliation:Center for Quantum Physics and Intelligent Sciences, Department of Physics, Capital Normal University, Beijing, China ###### Abstract High accuracy on mathematical benchmarks does not establish whether reasoning remains reliable as problem complexity increases\. We examine how executable symbolic representations change accuracy scaling in large language models compared with natural\-language reasoning\. To address this limitation, we introduce the GSM Arithmetic Benchmark \(GSM\-AB\), a controlled benchmark that independently varies operand digit length and operation count to probe numerical scale and compositional complexity\. We find that executable representations can improve accuracy and slow its decline as complexity increases\. Lean reduces average sensitivity to operand digit length at every tested model size\. By contrast, slower degradation with increasing operation count emerges at the larger model sizes\. A Python program\-of\-thought \(Python\-PoT\) control shows a similar operation\-axis pattern, suggesting that this finding is not specific to Lean\. These findings show that reasoning representation shapes arithmetic accuracy scaling and support executable symbolic representations for more reliable reasoning on complex arithmetic tasks\. ###### Keywords: large language models , arithmetic reasoning , controlled benchmark , accuracy scaling , executable symbolic representations , Lean ## 1Introduction Aggregate benchmark accuracy does not reveal how large language models \(LLMs\) respond to increasing mathematical problem complexity\. Broader evaluations show that larger, more instructable models do not consistently become more reliable[Zhou et al\. \[2024\]](https://arxiv.org/html/2611.27203#bib.bib17); mathematical benchmarks also expose degradation under numerical substitutions and logic\-preserving increases in difficulty[Mirzadeh et al\. \[2025\]](https://arxiv.org/html/2611.27203#bib.bib2),[Mondorf et al\. \[2026\]](https://arxiv.org/html/2611.27203#bib.bib4)\. Understanding accuracy scaling with complexity is therefore essential for assessing whether reasoning advances extend to harder problems\. Symbolic methods can complement neural reasoning, as demonstrated by AlphaGeometry in geometry[Trinh et al\. \[2024\]](https://arxiv.org/html/2611.27203#bib.bib18)\. In arithmetic, Program of Thoughts and Program\-Aided Language Models \(PAL\) improve accuracy by expressing reasoning as executable programs with explicit computational semantics and delegating calculation to an external executor[Chen et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib11),[Gao et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib12)\. Such executable symbolic representations make numerical computation reliable, but the model must still construct the correct expressions and compose the required steps\. Higher accuracy at a given difficulty thus need not imply more favorable scaling as complexity increases\. PAL already provides evidence of robustness to larger numbers and increasing object counts in a symbolic reasoning task[Gao et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib12)\. Other evaluations show that program\-of\-thought fine\-tuning can improve consistency across variants without reducing the accuracy gap under perturbations[Zhou et al\. \[2026\]](https://arxiv.org/html/2611.27203#bib.bib13)\. Building on these findings, we distinguish numerical scale from compositional complexity and examine whether the accuracy advantage of executable symbolic representations over natural\-language reasoning is accompanied by slower degradation along each axis, and how this relationship varies with model size\. This separation matters because larger operands increase the numerical burden of calculation, whereas additional operations require more arithmetic relations to be composed\. We investigate this question through the GSM Arithmetic Benchmark \(GSM\-AB\), which crosses operand digit length and operation count within a controlled family of balanced expression trees\. GSM denotes grade school math, as in the GSM8K word\-problem benchmark[Cobbe et al\. \[2021\]](https://arxiv.org/html/2611.27203#bib.bib1)\. Matching tree structures across digit lengths holds the underlying arithmetic structure fixed, while operation count varies compositional complexity within the template family\. Accuracy levels show overall performance, while two fitted slopes show how performance changes as complexity increases\. The digit\-axis slope measures the change in accuracy as operand digit length increases, and the operation\-axis slope measures the change as operation count increases; together, they form the dual\-slope framework\. Using the same training questions and aligned adaptation settings, we compare natural\-language chain\-of\-thought \(CoT\)[Wei et al\. \[2022\]](https://arxiv.org/html/2611.27203#bib.bib5)with executable Lean programs across three Qwen3 model sizes\. One\-shot and external evaluations further assess the scope of the observed differences\. Figure[1](https://arxiv.org/html/2611.27203#S1.F1)summarizes the construction and evaluation protocol; the complete benchmark, training data, and code are publicly available at[https://github\.com/Yubinliu\-physics/gsm\-arithmetic\-benchmark](https://github.com/Yubinliu-physics/gsm-arithmetic-benchmark)\. Our results show that executable symbolic representations can improve the complexity scaling of arithmetic accuracy under specific conditions\. Lean exhibits flatter averaged digit\-axis slopes at all three tested model sizes; flatter operation\-axis slopes over the common non\-floor interval are observed at 1\.7B and 8B, where B denotes billions of parameters\. The observed scaling improvements vary with the complexity axis and model size\. A paired Python–Lean comparison at 8B further finds similar accuracy for both executable representations, substantially above the natural\-language baseline\. These findings extend the evidence for executable representations from accuracy gains to their dependence on distinct dimensions of arithmetic complexity, with supporting results across two programming languages\. Figure 1:Controlled GSM\-AB construction and matched chain\-of\-thought \(CoT\) and Lean training with complexity slope evaluation\.Arithmetic expression trees are generated by independently controlling operand digit lengthddand operation countoo\. Each expression is decomposed into an abstract syntax tree \(AST\) plan, realized as a GSM8K\-style word problem, and retained only after numerical and solver validation\. At each Qwen3 scale, separate CoT and Lean adapters are trained from the same base model using the same questions\. The loss is computed only on response tokens\. The resulting models are evaluated on the common GSM\-AB complexity grid\. Accuracy profiles summarize performance levels, while complexity slopes quantify sensitivity to operand digit length and operation count\. The reported operation slope is estimated over the common non\-floor region\. In model\-size labels, B denotes billions of parameters\. ## 2Methods ### 2\.1Controlled arithmetic benchmark GSM\-AB contains 2,000 questions across 20 complexity cells, with 100 questions for each combination of operand digit lengthd∈\{3,4,5,6\}d\\in\\\{3,4,5,6\\\}and operation counto∈\{2,3,4,5,6\}o\\in\\\{2,3,4,5,6\\\}\. Each operation count uses a fixed balanced binary\-tree topology with sampled addition, subtraction, and multiplication\. We first generate and validate six\-digit expressions, then resample their operands to obtain five\-, four\-, and three\-digit counterparts\. Operators, parenthesization, and tree topology remain fixed within each matched group\. Subtractions are constructed to avoid negative intermediate values, yielding unambiguous integer\-valued answers\. Each expression is parsed into an abstract syntax tree \(AST\) that records operation dependencies\. A language model converts this plan into a GSM8K\-style word problem, preserving the operands and operation order\. Questions are retained after checks of number consistency, answer agreement, and solver verification\. Each record links its complexity metadata, expression, AST, question, and exact answer \(Appendix Fig\.[3](https://arxiv.org/html/2611.27203#A1.F3)\)\. Wording is regenerated across digit lengths; generation models and narrative complexity also vary with operation count\. The benchmark therefore controls arithmetic structure more tightly than linguistic form\. Seed pools, generation budgets, and cross\-digit selection are detailed in Appendix[A](https://arxiv.org/html/2611.27203#A1)\. ### 2\.2Reasoning representations and evaluation We compare natural\-language CoT with executable symbolic reasoning using Qwen3 models with 0\.6B, 1\.7B, and 8B parameters[Yang et al\. \[2025\]](https://arxiv.org/html/2611.27203#bib.bib7)\. CoT targets express intermediate reasoning and the final answer in natural language\. Lean targets encode quantities as typed definitions and arithmetic relations as expressions evaluated by an external executor\. For each size, both branches start from the same pretrained checkpoint and use low\-rank adaptation \(LoRA\)[Hu et al\. \[2022\]](https://arxiv.org/html/2611.27203#bib.bib6)with aligned training settings\. The training pool contains 1,553 paired questions: 1,353 from GSM8K and 200 integer\-arithmetic augmentations, including signed subtraction\. Each question has both a natural\-language solution and a Lean realization\. A seed\-42 split gives 1,398 training and 155 validation questions with identical question identifiers \(IDs\) and ordering in both branches\. LoRA settings, optimization schedule, maximum training budget, and the 1,024\-token training sequence limit are shared\. Checkpoints are selected independently by the lowest response\-only validation loss, without using GSM\-AB; selected steps can therefore differ between branches\. Exact checkpoints and training settings are listed in Appendix[B](https://arxiv.org/html/2611.27203#A2)\. All models are evaluated on the same frozen test items\. Main\-experiment decoding is greedy, with generation limits of 256 tokens for CoT and 384 for Lean\. CoT predictions are scored by extracting the final numerical answer; Lean predictions are compiled and executed with Lean 4\.27\.0\-rc1, then compared with the reference answer\. We also report execution validity to distinguish execution failures from programs that run but return an incorrect answer\. The Lean demonstration usesIntfor integer arithmetic, avoiding truncatingNatsubtraction, and retainsRatfor fractions\. This protocol compares complete supervision, representation, and execution configurations\. A separate Python control compares CoT, Python, and Lean at Qwen3\-8B on the same 500 six\-digit questions\. All three branches use 1,353 training questions, matched LoRA settings, and checkpoint 220 \(Appendix[G](https://arxiv.org/html/2611.27203#A7)\)\. We analyze this control separately because its training pool and checkpoint selection differ from the main experiment\. One\-shot evaluations assess the representations without parameter updates\. DeepSeek\-V4\-Flash and Qwen3\.5\-27B are accessed through application programming interfaces \(APIs\)[DeepSeek\-AI \[2026\]](https://arxiv.org/html/2611.27203#bib.bib10),[Qwen Team \[2026\]](https://arxiv.org/html/2611.27203#bib.bib8)and evaluated on the full 2,000\-question grid\. Local Qwen3 models use the 500\-questiond=6d=6subset\. Each mode receives one format\-matched demonstration, with internal thinking disabled and temperature set to zero\. CoT and Lean share test questions and use the answer\-scoring procedures described above\. For external out\-of\-distribution \(OOD\) evaluation, we use fixed, ordered 300\-example subsets of the SVAMP arithmetic word\-problem dataset, DeepMind Mathematics, and Math401[Patel et al\. \[2021\]](https://arxiv.org/html/2611.27203#bib.bib3),[Saxton et al\. \[2019\]](https://arxiv.org/html/2611.27203#bib.bib14),[Yuan et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib15)\. Persistent item IDs are shared across model sizes and reasoning modes\. We use the adapters selected in the main experiment, greedy decoding, and the same 256/384\-token limits\. Within each dataset, prompt format, answer extraction, and scoring remain fixed across model sizes\. Generation stops at a complete final\-answer marker or\#eval answer, respectively\. These datasets assess accuracy transfer; their uncontrolled complexity distributions do not support a separate scaling analysis\. ### 2\.3Measuring accuracy scaling LetAm\(d,o\)A\_\{m\}\(d,o\)denote final\-answer accuracy for reasoning modemmat digit lengthddand operation countoo\. We characterize two complementary aspects of complexity sensitivity on the conceptual accuracy response surface\. At fixedoo, the digit\-axis sensitivity is sm,o\(d\)=∂Am\(d,o\)∂d,s^\{\(d\)\}\_\{m,o\}=\\frac\{\\partial A\_\{m\}\(d,o\)\}\{\\partial d\},\(1\)which measures sensitivity to increasing numerical scale\. At fixeddd, the operation\-axis sensitivity is sm,d\(o\)=∂Am\(d,o\)∂o,s^\{\(o\)\}\_\{m,d\}=\\frac\{\\partial A\_\{m\}\(d,o\)\}\{\\partial o\},\(2\)which measures sensitivity to increasing compositional complexity as operationalized by operation count\. These derivatives define the two axis\-specific sensitivity measures independently of a particular benchmark grid\. Because GSM\-AB observesddandooonly at finite discrete values, we estimate the corresponding rates of change using ordinary least\-squares slopes fitted to the observed accuracy curves\. Cross\-model summaries average over the orthogonal axis before fitting; slice\-level slopes hold that axis fixed \(Appendix[C](https://arxiv.org/html/2611.27203#A3)\)\. Digit slopess\(d\)s^\{\(d\)\}used=\{3,4,5,6\}d=\\\{3,4,5,6\\\}\. Operation slopess\(o,nf\)s^\{\(o,\\mathrm\{nf\}\)\}use the common non\-floor intervalo=\{2,3,4\}o=\\\{2,3,4\\\}, excluding high\-operation cells where several CoT curves flatten near zero accuracy\. Slopes measure accuracy change per added digit or operation; less negative values indicate slower absolute degradation\. We report paired differencesΔd=sLean\(d\)−sCoT\(d\)\\Delta d=s^\{\(d\)\}\_\{\\mathrm\{Lean\}\}\-s^\{\(d\)\}\_\{\\mathrm\{CoT\}\}andΔonf=sLean\(o,nf\)−sCoT\(o,nf\)\\Delta o\_\{\\mathrm\{nf\}\}=s^\{\(o,\\mathrm\{nf\}\)\}\_\{\\mathrm\{Lean\}\}\-s^\{\(o,\\mathrm\{nf\}\)\}\_\{\\mathrm\{CoT\}\}, with positive values favoring Lean\. Throughout this paper, accuracy scaling describes finite\-range profiles and slopes, rather than an assumed power law\. Slopes are descriptive point estimates without confidence intervals and are interpreted alongside full curves and accuracy levels: unequal baselines and floor or ceiling effects can influence their magnitudes even within the common non\-floor interval\. ## 3Results ### 3\.1Accuracy scaling with numerical and compositional complexity Executable Lean representations improve mean GSM\-AB accuracy over CoT by 29\.5, 44\.1, and 47\.8 percentage points at 0\.6B, 1\.7B, and 8B, respectively \(Table[1](https://arxiv.org/html/2611.27203#S3.T1)\)\. Their scaling advantage depends on the complexity axis and model size \(Fig\.[2](https://arxiv.org/html/2611.27203#S3.F2)\)\. Figure 2:Cross\-model complexity scaling of CoT and Lean\-symbolic reasoning\.Accuracy is evaluated on the GSM\-AB grid for Qwen3\-0\.6B, Qwen3\-1\.7B, and Qwen3\-8B\. Top\-row panels vary operand digit lengthddand measure numerical\-scale sensitivity\. Bottom\-row panels vary operation countooand characterize compositional\-complexity sensitivity\. Thin curves show representative fixed\-complexity groups, and thick solid curves show averages \(avg\)\. Ops denotes operation count\. Degradation slopes summarize how rapidly accuracy changes as arithmetic complexity increases\. Quantitative slopes are reported in Table[1](https://arxiv.org/html/2611.27203#S3.T1)\. Operation\-axis slopes are fitted only over the non\-floor regiono=2,3,4o=2,3,4\.Along the digit axis, averaged Lean profiles are flatter at all three sizes\. The clearest separation occurs at 8B: CoT accuracy declines with operand length, whereas Lean accuracy remains approximately stable overd=3d=3–66\. This pattern also holds within all five operation\-count slices at 8B\. At each smaller size, Lean has flatter digit slopes in three of five slices, with the direction reversing ato=5o=5ando=6o=6\(Appendix[C](https://arxiv.org/html/2611.27203#A3)\)\. The numerical\-scale benefit is therefore most consistent at the largest tested size\. Table 1:Average accuracy differences and degradation slopes across model scales\.Note:ACC denotes accuracy;ΔACCavg\\Delta\\mathrm\{ACC\}\_\{\\mathrm\{avg\}\}is Lean minus CoT accuracy averaged over all 20 GSM\-AB cells\. Slopes are fitted to curves averaged over the orthogonal axis:d=3,4,5,6d=3,4,5,6for digit slopes and the common non\-floor intervalo=2,3,4o=2,3,4for operation slopes\.Δd\\Delta dandΔonf\\Delta o\_\{\\mathrm\{nf\}\}are the corresponding Lean\-minus\-CoT slope differences; positive values indicate flatter Lean slopes\. Values are rounded after calculation\. Slopes are descriptive and must be interpreted alongside accuracy levels because unequal baselines and floor or ceiling effects can affect the comparison\. Along the operation axis, Lean combines higher accuracy with slower degradation at 1\.7B and 8B\. Overo=2,3,4o=2,3,4, the largest model has a Lean slope of−0\.033\-0\.033, compared with−0\.114\-0\.114for CoT\. At 0\.6B, however, Lean declines slightly faster despite its higher accuracy\. Slice\-level comparisons support this model\-size dependence: Lean slopes are flatter in all four digit slices at 8B and in three with one tie at 1\.7B, but steeper in three of four at 0\.6B \(Appendix[C](https://arxiv.org/html/2611.27203#A3)\)\. The 0\.6B case also separates execution from answer correctness\. Fromo=2o=2too=4o=4, Lean accuracy falls from 0\.865 to 0\.440, while execution validity changes only from 0\.983 to 0\.963 \(Appendix[F](https://arxiv.org/html/2611.27203#A6)\)\. Most of the accuracy loss therefore comes from programs that execute but return incorrect answers\. Together, the two axes show that an accuracy gain can accompany improved numerical scaling without improved compositional scaling\. ### 3\.2Executable representations beyond Lean The paired Qwen3\-8B control shows a similar operation\-axis advantage for Python and Lean \(Table[10](https://arxiv.org/html/2611.27203#A7.T10)\)\. As operation count increases from two to six, CoT accuracy falls from 0\.690 to 0\.110, whereas both executable representations remain at or above 0\.860\. Overo=2,3,4o=2,3,4, the descriptive slopes are−0\.115\-0\.115for CoT,−0\.025\-0\.025for Python, and−0\.015\-0\.015for Lean\. The flatter profiles thus extend beyond a single executable language\. Pooled accuracy is 0\.384 for CoT, 0\.950 for Python, and 0\.946 for Lean\. Python alone answers 16 questions correctly and Lean alone answers 14\. The exact two\-sided McNemar test finds no statistically significant difference between Python and Lean \(p=0\.8555p=0\.8555\), indicating broadly comparable accuracy under this protocol[Fagerland et al\. \[2013\]](https://arxiv.org/html/2611.27203#bib.bib16)\. All 500 Python outputs and 499 Lean outputs execute successfully\. This control supports a benefit shared by both executable representations in the tested setting\. ### 3\.3Scope across prompting settings and tasks The advantage also appears in one\-shot inference\. On the complete GSM\-AB grid, Lean reaches 97\.85% accuracy for DeepSeek\-V4\-Flash and 97\.10% for Qwen3\.5\-27B, exceeding their CoT baselines \(Table[2](https://arxiv.org/html/2611.27203#S3.T2)\)\. Lean has flatter averaged slopes along both complexity axes \(Appendix[D](https://arxiv.org/html/2611.27203#A4)\), and its accuracy advantage grows with operation count in both models\. These profiles extend the main finding to settings without task\-specific fine\-tuning\. Table 2:One\-shot accuracy across model families on GSM\-AB\.Note:Each entry gives the number of correct predictions out of 100 in the form Lean/CoT\. DeepSeek\-V4\-Flash and Qwen3\.5\-27B are evaluated through APIs on all 20 cells, whereas the Qwen3 models are evaluated locally atd=6d=6\. All models use the same one\-shot prompt format without fine\-tuning\. All model families use the same GSM\-AB questions in the cells they share, and CoT and Lean are item\-paired within every model run\. Lean predictions are evaluated by local execution of the generated code, whereas CoT predictions are scored from the extracted final answer\. Valid is the aggregate Lean execution success rate over all cells shown for a model: 2,000 outputs for each API model and 500 outputs for each local Qwen3 model\. Atd=6d=6, all three local Qwen3 models favor Lean in every tested cell\. Performance nevertheless varies strongly with model size\. Execution validity rises from 72\.6% at 0\.6B to 99\.6% at 8B, while the larger models retain substantially higher accuracy as operation count increases\. For the larger local models and both API models, failed execution explains little of the remaining error\. External accuracy gains are more task dependent\. Lean exceeds CoT in seven of nine dataset–model combinations \(Table[3](https://arxiv.org/html/2611.27203#S3.T3)\)\. The largest gain is on SVAMP at 0\.6B \(\+0\.263\+0\.263\), whereas Lean trails CoT on DeepMind Mathematics at 8B \(−0\.050\-0\.050\)\. On Math401, the methods differ by only one correct answer at 1\.7B and 8B\. These results broaden the evidence for accuracy gains across arithmetic tasks while identifying settings in which the advantage shrinks or reverses\. Table 3:External OOD generalization on arithmetic datasets\.Note:Each dataset is evaluated on a fixed 300\-example subset using Qwen3 models\. The evaluated datasets are SVAMP[Patel et al\. \[2021\]](https://arxiv.org/html/2611.27203#bib.bib3), DeepMind Mathematics[Saxton et al\. \[2019\]](https://arxiv.org/html/2611.27203#bib.bib14), and Math401[Yuan et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib15)\. Lean accuracy is computed over all examples after local Lean execution\. Valid denotes the fraction of generated Lean outputs that execute or verify successfully, andΔ\\Deltadenotes Lean accuracy minus CoT accuracy\. ## 4Conclusion and Discussion This work examines how arithmetic accuracy changes as problems become more complex\. We propose a dual\-slope analysis\. One slope measures the effect of increasing operand digit length, and the other measures the effect of increasing operation count\. GSM\-AB makes these two trends measurable by varying digit length and operation count separately\. Across three Qwen3 model sizes, Lean achieves higher average accuracy and shows a smaller decline as digit length increases\. For operation count, however, a smaller decline appears only at 1\.7B and 8B\. Executable representations therefore improve accuracy, but they do not improve complexity scaling in every setting\. The difference between the two axes may come from the different demands they place on the model\. Longer operands mainly make numerical calculation harder\. Once the model produces the correct expression, the executor can perform the calculation\. More operations require the model to identify and combine more arithmetic relations\. This remains difficult even when the final calculation is executable\. Python and Lean show similar operation\-axis results at 8B, suggesting that this pattern is not unique to Lean\. The one\-shot and external evaluations also show that the observed benefits depend on model size and dataset\. These conclusions apply to the tested models and arithmetic problems\. The slopes describe the tested model and reasoning representation together, rather than the model’s general mathematical ability\. Future work can test other arithmetic structures, executable languages, and model families\. ## Acknowledgements We thank Ding Liu for his guidance in preparing the manuscript\. We also thank Pengfei Zhou, Ying Lu, Hao Cui, and Yao Yu for helpful discussions about large language models\. ## Funding This work was supported in part by the Strategic Priority Research Program of the Chinese Academy of Sciences \(Grant No\. XDB1270000\) and the robotic AI\-Scientist platform of the Chinese Academy of Sciences\. ## Data and code availability The GSM\-AB benchmark \(2,000 structure\-paired questions\), the paired training data and frozen splits, the complete construction, training, inference, and verification pipeline, and the frozen experimental results supporting all tables and figures in this paper are openly available at[https://github\.com/Yubinliu\-physics/gsm\-arithmetic\-benchmark](https://github.com/Yubinliu-physics/gsm-arithmetic-benchmark)\. ## References - W\. Chen, X\. Ma, X\. Wang, and W\. W\. CohenProgram of thoughts prompting: disentangling computation from reasoning for numerical reasoning tasks\.Transactions on Machine Learning Research\.Cited by:[Appendix G](https://arxiv.org/html/2611.27203#A7.p1.1),[§1](https://arxiv.org/html/2611.27203#S1.p2.1)\. - Cobbeet al\.\(2021\)K\. Cobbe, V\. Kosaraju, M\. Bavarian, M\. Chen, H\. Jun, L\. Kaiser, M\. Plappert, J\. Tworek, J\. Hilton, R\. Nakano, C\. Hesse, and J\. SchulmanTraining verifiers to solve math word problems\.InarXiv preprint arXiv:2110\.14168,Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p4.1)\. - DeepSeek\-AI \(2025\)DeepSeek\-AIDeepSeek\-V3\.2: pushing the frontier of open large language models\.arXiv preprint arXiv:2512\.02556\.Cited by:[§A\.4](https://arxiv.org/html/2611.27203#A1.SS4.p2.1)\. - DeepSeek\-AI \(2026\)DeepSeek\-AIDeepSeek API: models and pricing\.Note:[https://api\-docs\.deepseek\.com/quick\_start/pricing](https://api-docs.deepseek.com/quick_start/pricing)Accessed July 26, 2026Cited by:[§A\.4](https://arxiv.org/html/2611.27203#A1.SS4.p2.1),[§B\.3](https://arxiv.org/html/2611.27203#A2.SS3.p2.1),[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p5.1)\. - Fagerlandet al\.\(2013\)M\. W\. Fagerland, S\. Lydersen, and P\. LaakeThe McNemar test for binary matched\-pairs data: mid\-ppand asymptotic are better than exact conditional\.BMC Medical Research Methodology13\(1\),pp\. 91\.External Links:[Document](https://dx.doi.org/10.1186/1471-2288-13-91),[Link](https://doi.org/10.1186/1471-2288-13-91)Cited by:[Appendix G](https://arxiv.org/html/2611.27203#A7.p4.1),[§3\.2](https://arxiv.org/html/2611.27203#S3.SS2.p2.1)\. - Gaoet al\.\(2023\)L\. Gao, A\. Madaan, S\. Zhou, U\. Alon, P\. Liu, Y\. Yang, J\. Callan, and G\. NeubigPAL: program\-aided language models\.InProceedings of the 40th International Conference on Machine Learning,Proceedings of Machine Learning Research, Vol\.202,pp\. 10764–10799\.Cited by:[Appendix G](https://arxiv.org/html/2611.27203#A7.p1.1),[§1](https://arxiv.org/html/2611.27203#S1.p2.1),[§1](https://arxiv.org/html/2611.27203#S1.p3.1)\. - Huet al\.\(2022\)E\. J\. Hu, Y\. Shen, P\. Wallis, Z\. Allen\-Zhu, Y\. Li, S\. Wang, L\. Wang, and W\. ChenLoRA: low\-rank adaptation of large language models\.InInternational Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=nZeVKeeFYf9)Cited by:[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p1.1)\. - Mirzadehet al\.\(2025\)I\. Mirzadeh, K\. Alizadeh, H\. Shahrokhi, O\. Tuzel, S\. Bengio, and M\. FarajtabarGSM\-Symbolic: understanding the limitations of mathematical reasoning in large language models\.InInternational Conference on Learning Representations,Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p1.1)\. - Mondorfet al\.\(2026\)P\. Mondorf, S\. J\. Bell, J\. Dodge, and D\. HupkesLPDS: evaluating LLM robustness through logic\-preserving difficulty scaling\.arXiv preprint arXiv:2605\.15393\.Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p1.1)\. - Patelet al\.\(2021\)A\. Patel, S\. Bhattamishra, and N\. GoyalAre NLP models really able to solve simple math word problems?\.InProceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,pp\. 2080–2094\.Cited by:[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p6.1),[Table 3](https://arxiv.org/html/2611.27203#S3.T3.3.1.1)\. - Qwen Team \(2026\)Qwen TeamQwen3\.5\-27B model card\.Note:[https://huggingface\.co/Qwen/Qwen3\.5\-27B](https://huggingface.co/Qwen/Qwen3.5-27B)Accessed November 3, 2026Cited by:[§B\.3](https://arxiv.org/html/2611.27203#A2.SS3.p2.1),[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p5.1)\. - Saxtonet al\.\(2019\)D\. Saxton, E\. Grefenstette, F\. Hill, and P\. KohliAnalysing mathematical reasoning abilities of neural models\.arXiv preprint arXiv:1904\.01557\.Cited by:[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p6.1),[Table 3](https://arxiv.org/html/2611.27203#S3.T3.3.1.1)\. - Trinhet al\.\(2024\)T\. H\. Trinh, Y\. Wu, Q\. V\. Le, H\. He, and T\. LuongSolving olympiad geometry without human demonstrations\.Nature625,pp\. 476–482\.External Links:[Document](https://dx.doi.org/10.1038/s41586-023-06747-5),[Link](https://doi.org/10.1038/s41586-023-06747-5)Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p2.1)\. - Weiet al\.\(2022\)J\. Wei, X\. Wang, D\. Schuurmans, M\. Bosma, B\. Ichter, F\. Xia, E\. Chi, Q\. Le, and D\. ZhouChain\-of\-thought prompting elicits reasoning in large language models\.InAdvances in Neural Information Processing Systems,Vol\.35,pp\. 24824–24837\.Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p4.1)\. - Yanget al\.\(2025\)A\. Yang, A\. Li, B\. Yang, B\. Zhang, B\. Hui,et al\.Qwen3 technical report\.arXiv preprint arXiv:2505\.09388\.Cited by:[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p1.1)\. - Yuanet al\.\(2023\)Z\. Yuan, H\. Yuan, C\. Tan, W\. Wang, and S\. HuangHow well do large language models perform in arithmetic tasks?\.arXiv preprint arXiv:2304\.02015\.Cited by:[§2\.2](https://arxiv.org/html/2611.27203#S2.SS2.p6.1),[Table 3](https://arxiv.org/html/2611.27203#S3.T3.3.1.1)\. - Zhouet al\.\(2024\)L\. Zhou, W\. Schellaert, F\. Martínez\-Plumed, Y\. Moros\-Daval, C\. Ferri, and J\. Hernández\-OralloLarger and more instructable language models become less reliable\.Nature634,pp\. 61–68\.External Links:[Document](https://dx.doi.org/10.1038/s41586-024-07930-y),[Link](https://doi.org/10.1038/s41586-024-07930-y)Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p1.1)\. - Zhouet al\.\(2026\)M\. Zhou, F\. Bardoliya, V\. Gupta, and D\. RothProgram\-of\-thought reveals LLM abstraction ceilings\.InFindings of the Association for Computational Linguistics: EACL 2026,Rabat, Morocco,pp\. 4911–4919\.External Links:[Document](https://dx.doi.org/10.18653/v1/2026.findings-eacl.257),[Link](https://aclanthology.org/2026.findings-eacl.257/)Cited by:[§1](https://arxiv.org/html/2611.27203#S1.p3.1)\. ## Appendix AStructure\-paired construction of GSM\-AB ### A\.1Design objective and benchmark grid GSM\-AB is constructed to vary numerical scale and compositional complexity in a controlled factorial design\. Operand digit length is denoted byd∈\{3,4,5,6\}d\\in\\\{3,4,5,6\\\}, and the number of internal arithmetic operations is denoted byo∈\{2,3,4,5,6\}o\\in\\\{2,3,4,5,6\\\}\. The final grid contains 100 examples in every\(d,o\)\(d,o\)cell\. All examples use recursively constructed balanced binary tree templates\. For a node containingoointernal operations, the left subtree contains⌊o/2⌋\\lfloor o/2\\rflooroperations and the right subtree containso−1−⌊o/2⌋o\-1\-\\lfloor o/2\\rflooroperations, with the same rule applied recursively\. Thus, every example at a fixedoohas the same topology and associated computational dependency structure\. Changingddat fixedoochanges only the numerical magnitudes, not the arithmetic structure being evaluated\. We therefore build matched groups with persistent structure identifiers, rather than generating and filtering the 20 cells independently\. Figure[3](https://arxiv.org/html/2611.27203#A1.F3)illustrates the structure of a representative GSM\-AB example with its complexity metadata\. Figure 3:Internal structure of a GSM Arithmetic Benchmark \(GSM\-AB\) example\.The left panel shows a conventional GSM8K problem with a natural\-language solution and final answer\. The right panel shows a generated GSM\-AB example\. Each sample contains explicit complexity metadata \(operand digit length, operation count, and tree structure\), an arithmetic expression, its corresponding abstract syntax tree, a structure\-preserving word problem, and an exact answer\. This organization makes numerical scale and the associated computational dependency structure explicit\. Maximum execution depth is recorded and systematically determined by the balanced\-tree construction\. Colors align the symbolic operators with their realizations in this generated problem: red marks subtraction through removal and the final difference, green marks addition through a received quantity, and blue marks multiplication through per\-unit rates\. ### A\.2Arithmetic expressions and AST plans Candidate expressions instantiate these balanced binary tree templates with addition, subtraction, and multiplication\. The leaf nodes are integer operands whose lengths are controlled bydd, while the number of internal nodes is exactlyoo\. Operators are sampled with approximately equal probabilities\. Subtraction branches are instantiated so that all intermediate values remain nonnegative integers\. The reference answer is computed directly from the instantiated expression rather than produced by a language model\. Each expression is parsed with a deterministic abstract\-syntax\-tree procedure\. Leaves are assigned execution level zero, and the level of an internal node is one plus the maximum level of its children\. Operations at the same level are stored as parallel slots, whereas higher\-level slots explicitly reference the completed lower\-level subexpressions\. This representation preserves parenthesization and data dependencies and provides the language model with an ordered arithmetic plan rather than only an unstructured expression string\. Within this fixed template family,ooindexes a known dependency structure, including its maximum execution depth\. It therefore varies structural reasoning demands while holding the topology fixed for a given operation count\. Every seed is assigned a persistentstructure\_id\. Its source index, operation count, expression, tree representation, and exact answer are carried through the subsequent generation and validation stages\. ### A\.3Adaptive natural\-language realization The expression, the AST plan organized by level, and the reference answer are supplied to an OpenAI\-compatible chat\-completions model\. The model is instructed to output one GSM8K\-style English word problem in a single paragraph, include every source number exactly once, introduce no additional numerical quantities, preserve the prescribed operation order, omit the solution and answer, and finish with a question whose answer equals the reference value\. The realization prompt adapts to both controlled variables\. Problems witho≤2o\\leq 2use short, direct situations\. Problems witho=3o=3or44use connected multi\-stage events, while those witho≥5o\\geq 5use explicitly separated branches that are combined only after their intermediate quantities have been established\. Scenario scale is also adapted to the operands: smaller values permit everyday contexts, whereas six\-digit values use organization\-scale settings such as transportation records, warehouse inventories, website analytics, factory production, or survey totals\. Scenario selection is deterministic for a given input key, so restarting a run does not silently reshuffle the intended prompt category\. Generation results retain the structural identity and provenance fields and are sorted bystructure\_idand source index after asynchronous API calls\. Empty API content is treated as a failed call and retried\. For models whose default reasoning mode may return an empty content field, internal thinking is disabled during both generation and verification\. ### A\.4Six\-digit anchor pool and complexity\-adaptive budget We construct the paired benchmark from the highest numerical\-complexity condition first\. For eachoo, six\-digit expressions are realized and verified before any lower\-digit counterpart is derived\. We use larger verified reserves for higher operation counts because complex natural\-language realizations fail more often and because more structures may be lost when the four digit\-specific valid sets are later intersected\. Table[4](https://arxiv.org/html/2611.27203#A1.T4)reports the realized six\-digit anchor construction\. Table 4:Construction of the verified six\-digit anchor pool\.Note:“Initial” denotes previously validated unique examples\. “Generated” and “passed” refer to additional candidates and solver\-verified candidates, respectively\. Only the number needed to reach the pre\-specified anchor target is adopted\. Foro=6o=6, the counts aggregate the main generation round and two targeted regeneration rounds\. The target sizes, 120 foro=2,3o=2,3, 150 foro=4,5o=4,5, and 200 foro=6o=6, refer to examples that have already passed validation, not to raw generation calls\. The additionalo=3o=3examples are generated and verified with DeepSeek\-V3\.2\-Instruct[DeepSeek\-AI \[2025\]](https://arxiv.org/html/2611.27203#bib.bib9)\. Foro=4,5,6o=4,5,6, both stages use DeepSeek\-V4\-Pro[DeepSeek\-AI \[2026\]](https://arxiv.org/html/2611.27203#bib.bib10)with internal thinking disabled\. We used the stronger model for the more complex strata to reduce verification failures and repeated API calls\. The acceptance rules remain unchanged, but model allocation is therefore confounded with operation count\. Foro=6o=6, the main round produces 83 accepted examples from 156 candidates\. Two targeted rounds subsequently recover 6 examples from 25 failed structures and 6 examples from 15 further candidates\. Only 3 examples from the final set of 6 are needed to reach the target of 200\. Targeted regeneration changes only the natural\-language question\. The arithmetic expression, exact answer, andstructure\_idremain fixed\. This avoids replacing difficult structures with newly sampled, easier ones\. ### A\.5Numerical and solver\-based validation Validation separates inexpensive deterministic checks from model\-based solution checking\. First, the multiset of numerical strings in the generated question must exactly match that of the source expression, including repeated values\. Questions that introduce, omit, or duplicate a number are rejected before an API call\. We also audit that the expression evaluates to the stored answer, the number of internal operators equalsoo, every leaf has the specified digit length, and the question is nonempty\. Candidates passing the numerical checks are then presented to a verifier at temperature zero\. The verifier solves the natural\-language problem step by step and emits a final numerical answer in a constrained format\. The extracted answer is compared with the programmatically computed reference answer using symbolic normalization\. API errors, missing answer fields, answer mismatches, and numerical\-multiset failures are retained with explicit failure reasons\. Only candidates satisfying both stages enter the correct pool\. Generation and verification are separate API calls, although the model capacity is matched to the operation\-count stratum as described above\. The finalized six\-digit anchor contains 740 examples: 120 each foro=2,3o=2,3, 150 each foro=4,5o=4,5, and 200 foro=6o=6\. The release audit confirms 740 uniquestructure\_idvalues, 740 unique expressions, nonempty questions, exact agreement between expressions and answers, correct operation counts, six\-digit leaf operands, and exact agreement between the numerical multisets in each question and expression\. Existing validated examples are retained first, and newly verified examples are added only after deduplication by bothstructure\_idand normalized expression\. ### A\.6Persistent pairing and joint selection across digit lengths Every validated six\-digit anchor is used as a mother structure for its five\-, four\-, and three\-digit variants\. For a fixedstructure\_id, the operators, parenthesization, number of internal operations, and ordered expression\-tree topology are held fixed\. Only the leaf values are resampled to the target digit length, subject to the same requirement that intermediate values remain nonnegative, and the answer is recomputed programmatically\. A new scale\-appropriate word problem is then realized and passed through the same two\-stage validation procedure\. A failed realization is regenerated for the same identifier rather than replaced by an independently sampled structure\. After all digit\-specific variants have been checked, we compute, separately for every operation count, 𝒞o=𝒞3,o∩𝒞4,o∩𝒞5,o∩𝒞6,o,\\mathcal\{C\}\_\{o\}=\\mathcal\{C\}\_\{3,o\}\\cap\\mathcal\{C\}\_\{4,o\}\\cap\\mathcal\{C\}\_\{5,o\}\\cap\\mathcal\{C\}\_\{6,o\},\(3\) where𝒞d,o\\mathcal\{C\}\_\{d,o\}is the set of identifiers that pass validation at digit lengthddand operation countoo\. We sort the commonstructure\_idvalues lexicographically, select the first 100, and retain all four digit\-specific members of each selected group\. This deterministic rule introduces no model\-dependent or run\-dependent resampling\. Thus, for eachoo, the frozen benchmark obeys 𝒮3,o=𝒮4,o=𝒮5,o=𝒮6,o\.\\mathcal\{S\}\_\{3,o\}=\\mathcal\{S\}\_\{4,o\}=\\mathcal\{S\}\_\{5,o\}=\\mathcal\{S\}\_\{6,o\}\.\(4\) The final benchmark contains 20 cells and 2,000 examples\. All CoT, Lean, and evaluations across model scales read the same frozen files\. Consequently, comparisons across digit lengths are made on matched arithmetic structures, and observed digit\-scaling slopes cannot be attributed to structure\-distribution drift caused by independently filtering each\(d,o\)\(d,o\)cell\. ## Appendix BExperimental details ### B\.1Training data and LoRA configuration The paired fine\-tuning pool contains 1,553 questions: 1,353 GSM8K questions and 200 augmentations involving integer arithmetic\. Every record stores an answer trace in natural language and a verified Lean4 target, allowing the two adapters to be trained from identical questions\. A fixed seed\-42 stratified split assigns 1,398 questions to training \(1,218 original and 180 augmented\) and 155 to validation \(135 original and 20 augmented\)\. The same question IDs and order are used by every model scale and both supervision modes\. The prompt prefix is\#\#\# Problemin both branches, followed by either\#\#\# Answeror\#\#\# Lean4\. A custom causal language\-model collator sets prompt and padding labels to−100\-100, so the loss is computed only over the format\-specific response\. Checks before training verify the response boundary, preservation of the mask, and absence of truncation\. Table[5](https://arxiv.org/html/2611.27203#A2.T5)reports the settings shared across model scales\. Both branches use a 1,024\-token training limit\. Each branch is trained for at most three epochs and evaluated once per epoch on the fixed validation split\. The selected adapter is the checkpoint with the lowest response\-only validation loss, with earlier checkpoints preferred on an exact tie\. GSM\-AB is not consulted during checkpoint selection\. Table 5:Fine\-tuning and inference configuration for the main experiment\.Note:The CoT and Lean branches use identical questions, LoRA capacity, optimization schedule, and effective batch size\. Different generation limits reflect the different output formats and are reported explicitly\. For Qwen3\-0\.6B, Qwen3\-1\.7B, and Qwen3\-8B, respectively, the selected CoT checkpoints are steps 522, 522, and 350, with response\-only validation losses of 0\.491, 0\.405, and 0\.302\. The corresponding Lean checkpoints are steps 522, 522, and 522, with validation losses of 0\.248, 0\.190, and 0\.142\. These checkpoints are selected independently for each combination of model and mode using only the fixed validation split\. No GSM\-AB result enters the selection procedure\. ### B\.2Model checkpoints and evaluation toolchain The main complexity\-scaling experiment uses Qwen3\-0\.6B, Qwen3\-1\.7B, and the standard Qwen3\-8B checkpoint\. CoT and Lean adapters at a given scale always start from the same checkpoint\. The local one\-shot experiment also uses these three standard checkpoints without loading an adapter\. The external OOD generalization evaluation uses the same three standard checkpoints and the response\-only selected CoT and Lean adapters from the main scaling experiment\. Lean outputs are compiled and executed locally\. Verification uses Lean 4\.27\.0\-rc1 with a 60\-second per\-sample timeout\. A sample is valid only if compilation and execution succeed, and is correct only if the resulting value agrees with the reference answer after numeric normalization\. ### B\.3One\-shot prompt and decoding protocol The local one\-shot comparison uses one format\-matched demonstration describing the same tomato\-seed arithmetic problem in both modes\. The CoT demonstration ends with a line of the form\#\#\#\# <answer\>\. The Lean demonstration defines intermediate values and terminates with exactly one\#eval answer\. The target question is appended using raw text concatenation\. Internal thinking is disabled\. Inference uses bfloat16 model weights, batch size 2, greedy decoding, and a maximum of 700 newly generated tokens\. Generation stops after the first valid final\-answer marker in CoT or after\#eval answerin Lean\. Eachd=6d=6,o∈\{2,3,4,5,6\}o\\in\\\{2,3,4,5,6\\\}cell contains the same 100 paired questions in the two modes\. DeepSeek\-V4\-Flash and Qwen3\.5\-27B are queried through APIs[DeepSeek\-AI \[2026\]](https://arxiv.org/html/2611.27203#bib.bib10),[Qwen Team \[2026\]](https://arxiv.org/html/2611.27203#bib.bib8)with the corresponding format\-matched one\-shot prompts, thinking disabled, and deterministic decoding\. Each API evaluation covers all 20 GSM\-AB cells, using the same 2,000 questions for both API models\. The local Qwen3 evaluations use the same 500 questions from thed=6d=6cells\. Model\-family comparisons are therefore item\-matched in the cells they share, as are the CoT and Lean comparisons within each run\. ### B\.4External OOD dataset subsets and scoring Each frozen external OOD evaluation file contains 300 persistent item IDs, and the same ordered IDs are used for every model scale and both reasoning modes\. The subsets are not resampled during evaluation\. SVAMP is scored by normalized numerical equality\. DeepMind Mathematics and Math401 contain direct computations and are scored with a numerical tolerance of 0\.0011, matching the stored evaluation metadata\. Lean validity is determined independently of answer correctness\. CoT and Lean use dataset\-matched demonstrations, greedy decoding, and maximum generation lengths of 256 and 384 tokens, respectively\. ## Appendix CSlice\-wise complexity slopes The main analysis fits a slope after averaging over the orthogonal complexity axis\. To check whether those averages are driven by a small number of conditions, Tables[6](https://arxiv.org/html/2611.27203#A3.T6)and[7](https://arxiv.org/html/2611.27203#A3.T7)repeat the fits within each fixed\-condition slice\. Digit\-axis slopes used=3,4,5,6d=3,4,5,6at each fixed operation count\. Operation\-axis slopes use the same non\-floor intervalo=2,3,4o=2,3,4as the main analysis at each fixed digit length\. In both tables,Δs=sLean−sCoT\\Delta s=s\_\{\\mathrm\{Lean\}\}\-s\_\{\\mathrm\{CoT\}\}, so a positive value denotes a flatter Lean slope\. Table 6:Digit\-axis slopes within fixed\-operation slices\.Note:Each slope is an ordinary least\-squares fit overd=3,4,5,6d=3,4,5,6\. The slice\-wise results show both consistency and heterogeneity\. For the digit axis, the positive aggregate difference is reproduced ato=2,3,4o=2,3,4for Qwen3\-0\.6B and Qwen3\-1\.7B, but reverses ato=5,6o=5,6; Qwen3\-8B has a positive difference in all five slices\. For the operation axis, the negative aggregate difference at 0\.6B is reproduced at three of four digit lengths, withd=5d=5as the exception\. At 1\.7B, three slices are positive and thed=3d=3slice is tied; all four 8B slices are positive\. Because ordinary least\-squares slopes are linear in the fitted accuracies, the aggregate slope equals the mean of its slice slopes\. These slice fits therefore expose where the average pattern is stable and where it changes, but they remain descriptive summaries of the fixed GSM\-AB grid rather than significance tests\. Table 7:Non\-floor operation\-axis slopes within fixed\-digit slices\.Note:Each slope is an ordinary least\-squares fit overo=2,3,4o=2,3,4\. ## Appendix DOne\-shot slopes for API models Following the main procedure, digit slopes used=3,4,5,6d=3,4,5,6after averaging over operation counts, and non\-floor operation slopes useo=2,3,4o=2,3,4after averaging over digit lengths\. We fit accuracy proportions from each complete API grid; the estimates are specific to the stated prompt and decoding protocol\. Table 8:One\-shot dual slopes for API models\.Note:PositiveΔs=sLean−sCoT\\Delta s=s\_\{\\mathrm\{Lean\}\}\-s\_\{\\mathrm\{CoT\}\}denotes a flatter Lean slope\. ## Appendix ETraining dynamics on GSM8K Figure[4](https://arxiv.org/html/2611.27203#A5.F4)gives a checkpoint\-level view of Qwen3\-8B on original GSM8K\. It is included to compare trajectories, not to select a checkpoint\. CoT accuracy is relatively high throughout training and fluctuates without a clear monotonic trend\. The curve therefore shows little measured improvement over these checkpoints, although accuracy alone cannot determine which internal capability changed during training\. Lean accuracy starts below CoT and rises substantially over training, eventually approaching the CoT range\. Because this evaluation uses original GSM8K rather than GSM\-AB, it complements the main complexity analysis but does not measure a degradation slope\. The trajectory is compatible with gradual acquisition of executable Lean output, but it does not by itself show that the model internalizes a structured reasoning procedure or that this procedure causes the GSM\-AB gains\. Figure 4:Training dynamics of Qwen3\-8B on GSM8K\.Accuracy is evaluated across LoRA training checkpoints for CoT and Lean\-symbolic supervision\. CoT accuracy fluctuates without a clear monotonic gain, whereas Lean\-symbolic accuracy increases substantially during training\. ## Appendix FExecution validity diagnostic for Qwen3\-0\.6B Table[9](https://arxiv.org/html/2611.27203#A6.T9)decomposes the current Qwen3\-0\.6B Lean results by operation count\. Each row aggregates the four digit length cells at the corresponding value ofoo\(400 paired questions\)\. Lean ACC counts a prediction as correct only when the generated program executes and returns the reference answer\. Lean Valid reports only whether the program executes successfully\. It does not establish that the generated program faithfully represents the word problem\. We omit accuracy conditional on validity because that quantity from the selected subset is not directly comparable with end\-to\-end accuracy\. Table 9:Qwen3\-0\.6B Lean accuracy and execution validity by operation count\.Note:Values aggregate the four digit lengthsd=3,4,5,6d=3,4,5,6in the frozen response\-only evaluation\. The non\-floor slope reported in Table[1](https://arxiv.org/html/2611.27203#S3.T1)is fitted overo=2,3,4o=2,3,4\. Across the fitted interval fromo=2o=2too=4o=4, accuracy decreases by 0\.425 while validity decreases by only 0\.020\. Non\-executable generations therefore contribute to the decline but cannot account for most of it\. The larger residual consists of executable programs that return an incorrect answer\. End\-to\-end execution does not reveal whether such a failure arose from an incorrect translation of the natural\-language relations into Lean or from an incorrect computation encoded within the generated program\. ## Appendix GControlled comparison with Python program\-of\-thought We add Python program\-of\-thought \(Python\-PoT\) as a second executable baseline[Chen et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib11),[Gao et al\. \[2023\]](https://arxiv.org/html/2611.27203#bib.bib12)\. The comparison uses the same standard Qwen3\-8B checkpoint and the same 1,353 GSM8K questions for CoT, Python\-PoT, and Lean supervision\. The target associated with each question is respectively a natural\-language solution, an execution\-verified Python program, or a Lean program\. All three adapters use LoRA rank 8, alpha 32, dropout 0\.05, a learning rate of2×10−52\\times 10^\{\-5\}, an effective batch size of 8, two epochs, 16\-bit floating\-point training, AdamW, and the same target modules\. A custom causal language\-model collator preserves the response\-only label mask, so prompt tokens do not contribute to the loss in any branch\. We pre\-specify checkpoint 220 for all three branches to provide a matched\-training\-step control\. This 1,353\-question control is separate from the frozen main scaling experiment, in which checkpoints are selected independently by validation loss\. Evaluation uses the same 500 paired GSM\-AB questions atd=6d=6ando∈\{2,3,4,5,6\}o\\in\\\{2,3,4,5,6\\\}, with 100 questions per cell\. Decoding is greedy and each format receives one matched demonstration\. Python outputs are parsed with a restricted AST policy and executed in an isolated interpreter\. Parsing stops at the first safe single\-variable print statement\. Exact adherence to the requestedprint\(answer\)surface form is audited separately and is not conflated with executability\. A prediction is correct only when execution succeeds and the numerical result matches the reference answer\. Lean outputs are compiled and executed with Lean 4\.27\.0\-rc1 under the same numerical criterion\. For Lean, we retain the same trained checkpoint and change only the evaluation prompt and matched demonstration: every numerical definition, includinganswer, is required to have typeInt, and the program ends with\#eval answer\. Thus, this is a prompt\-only protocol change rather than a separately retrained model\. Table 10:Controlled comparison of CoT, Python\-PoT, and Lean supervision on GSM\-AB\.Note:All branches use Qwen3\-8B, the same 1,353 training questions, matched LoRA settings, response\-only loss, and the same pre\-specified checkpoint 220\. This matched\-step choice is specific to the controlled three\-branch comparison and is not the checkpoint\-selection rule used in the frozen main scaling experiment\. Each non\-overall row contains 100 paired questions atd=6d=6\. Overall pools all 500 questions\. Lean applies the prompt\-only signed\-integer protocol described in the text\. Both executable representations maintain substantially higher accuracy than CoT as operation count increases\. CoT accuracy falls from 0\.690 ato=2o=2to 0\.110 ato=6o=6, whereas Python\-PoT and Lean remain at or above 0\.860 throughout the tested range\. Their pooled accuracies are nearly identical: 0\.950 for Python\-PoT and 0\.946 for Lean\. Python\-PoT is higher ato=2o=2,o=3o=3, ando=6o=6, the methods tie ato=4o=4, and Lean is higher ato=5o=5\. Execution validity is omitted from Table[10](https://arxiv.org/html/2611.27203#A7.T10)because it is near ceiling: all 500 Python\-PoT outputs executed successfully, and 499 of 500 Lean outputs compiled and executed successfully\. Because the two methods answer the same questions, we compare them with a two\-sided exact McNemar test[Fagerland et al\. \[2013\]](https://arxiv.org/html/2611.27203#bib.bib16), which uses only paired disagreements rather than treating the two sets of 500 predictions as independent samples\. Python\-PoT alone is correct on 16 questions and Lean alone is correct on 14\. Both are correct on 459 questions and both are wrong on 11\. Under the null hypothesis that the two methods have equal probabilities of winning a discordant pair, the probability of observing an imbalance at least this extreme isp=0\.8555p=0\.8555\. Thispp\-value is not the probability that the methods are identical\. Rather, its large value means that the observed 0\.004 accuracy difference provides no statistically significant evidence of a performance difference\. This controlled experiment supports a benefit of executable intermediate representations over natural\-language CoT on GSM\-AB\. The small, non\-significant difference between Python and Lean does not support a general accuracy advantage for either language\.
相似文章
大语言模型数学问题求解中可执行推理约束下的表示鲁棒性
本文通过系统性地变化等价问题的表面表示,研究了大语言模型在数学问题求解中的表示鲁棒性,发现存在显著的敏感性,并表明代码增强推理并不能统一消除脆弱性。
算术启发神经元是否具有形式不变性?对LLMs中符号、文本和代码的机制分析
本文研究了LLM中的算术启发神经元在符号算术、自然语言文字题和Python代码中是否具有形式不变性。通过激活修补,他们发现了一个共享的神经元回路,该回路对于算术计算是必要且充分的,并且跨格式失败源于激活状态而非不同的回路。
用于小型语言模型算术微调的结构化合成推理数据
本文研究了在消费级硬件限制下,结构化合成推理数据是否能提升小型语言模型的算术推理能力。使用基于GSM8K的合成语料库,通过LoRA对Qwen3-0.6B和Qwen3-1.7B进行微调,精确匹配准确率提升了12-13个百分点,并在相关基准测试中表现出较强的迁移能力。
从LLM生成的猜想到Lean形式化验证:基于平方和证书的自动多项式不等式证明
本文提出了NSPI,一种结合LLM与符号计算的神经符号框架,用于证明多项式不等式。它利用LLM生成的平方和猜想,通过符号计算进行精炼,并在Lean中形式化验证证明,在最多10个变量的多项式上展示了可扩展性。
揭示大语言模型中的数学推理:内部机制的方法学研究
本文通过早期解码分析大语言模型的内部机制,研究其如何执行算术运算。研究发现,能力强的模型在推理任务中,注意力模块和 MLP 模块之间呈现明确的分工。