Improved Accuracy Scaling with Problem Complexity in LLM Arithmetic Reasoning Using Executable Symbolic Representations

Yu-Bin Liu, Shi-Ju RanarXiv 2026

TL;DR

Large Language Models (LLMs) are notoriously shaky at math, often tripping over their own feet as problems get longer or numbers get bigger. This paper demonstrates that if you teach a model to write formal code (like Lean or Python) instead of just "thinking out loud" in English, its accuracy doesn't just improve—it scales far more gracefully as complexity increases. By letting a computer handle the literal "math" part, the model can focus on the logic, making it much more reliable for high-stakes reasoning.

What Problem Does This Paper Address?

We’ve all seen LLMs perform impressive feats of logic, only to fail at adding two six-digit numbers. The core issue is that we usually ask models to perform Chain-of-Thought (CoT) reasoning—basically, showing their work in natural language. But natural language is fuzzy, and doing multi-step arithmetic in a "mental" workspace is hard for a transformer.

The authors identify a gap in how we evaluate these models: we don't usually distinguish between numerical scale (how big the numbers are) and compositional complexity (how many steps are in the problem). Does a model fail because it can't handle 1,234,567, or because it lost track after the fifth addition? To solve this, they created a way to measure how "gracefully" a model's performance degrades as things get tougher.

Methods

The researchers introduced a "dual-slope" framework to measure sensitivity to these two different types of complexity.

Instead of natural language, they trained models to use Executable Symbolic Representations. Specifically, they used Lean, a formal proof language, and Python. The idea is simple: the LLM acts as the architect, writing a precise program that describes the problem. Then, an external "executor" (a Lean compiler or a Python interpreter) does the actual heavy lifting of the calculation.

The experimental pipeline: from generating a controlled benchmark to training models in different "modes" (CoT vs. Lean).

They fine-tuned three sizes of the Qwen3 model (0.6B, 1.7B, and 8B parameters) using Low-Rank Adaptation (LoRA), comparing the classic English CoT approach against this new "code-first" approach.

Datasets

  • GSM-AB (GSM Arithmetic Benchmark): A brand-new, highly controlled benchmark. It consists of 2,000 questions across 20 "complexity cells." It independently varies the number of digits in the operands (from 3 to 6) and the number of operations required (from 2 to 6).
  • GSM8K: Used for the initial training pool.
  • OOD (Out-of-Distribution) Sets: To see if the skills transferred, they tested on SVAMP, DeepMind Mathematics, and Math401.

Key Insights and Ideas

  • The "Calculator" Effect: When using Lean, the model's sensitivity to the size of the numbers (digit length) almost vanished, especially in larger models. Since the model only has to write the number correctly once, it doesn't matter if it's "12" or "12,345,678"—the computer handles the rest.
  • Logic is still the Bottleneck: While bigger numbers became easy, more steps (operation count) still caused performance to drop. However, the drop was significantly slower when using executable code compared to English.
  • Scaling Matters: Small models (0.6B) actually struggled more with the logic of writing Lean code as the number of operations grew. The "scaling advantage" of using code really starts to shine as the model size increases to 8B parameters.
  • Language Agnostic: The benefits weren't unique to Lean. A control test using Python showed nearly identical improvements, suggesting that the "executable" nature of the representation is what matters, not the specific syntax.

Key Results

The results were stark. Using Lean improved average accuracy by 29.5 to 47.8 percentage points over the standard CoT approach across the different model sizes.

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 length d and measure numerical-scale sensitivity. Bottom-row panels vary operation count o and characterize compositional-complexity sen- sitivity. 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 re- ported in Table 1. Operation-axis slopes are fitted only over the non-floor region o = 2, 3, 4.

As seen in Figure 2, the "slopes" tell the story. In the 8B model (panel c), the Lean accuracy line is nearly horizontal as digits increase—meaning the model is essentially immune to numerical scale. Meanwhile, the CoT line (orange) dives downward. For operation counts (panel f), the Lean slope was -0.033, while the CoT slope was a much steeper -0.114. In plain English: the CoT model's accuracy fell nearly four times faster as the problems got more complex.

Limitations and Future Work

The authors are careful to note that these results are specific to arithmetic. While Lean and Python help with "doing the math," they don't necessarily help the model understand a complex word problem if the linguistic phrasing is tricky.

Furthermore, the very smallest models (0.6B) sometimes produced code that was syntactically correct but logically wrong—they "hallucinated" the wrong math steps even if the computer executed them perfectly. Future work could explore more diverse mathematical structures beyond the "balanced trees" used here, or look at how these executable representations might help in even larger "frontier" models.

Summary updated

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.
BibTeX
@misc{liu2026improved,
  author = {Yu-Bin Liu and Shi-Ju Ran},
  title = {{Improved Accuracy Scaling with Problem Complexity in LLM Arithmetic Reasoning Using Executable Symbolic Representations}},
  year = {2026},
  eprint = {2611.27203},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27203},
}
Figure