On Code-Induced Reasoning in LLMs
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Code data has been shown to enhance the reasoning capabilities of large language models (LLMs), but it remains unclear which aspects of code are most responsible. We investigate this question with a systematic, data-centric framework. We construct parallel instruction datasets in ten programming languages and apply controlled perturbations that selectively disrupt structural or semantic properties of code. We then finetune LLMs from five model families and eight scales on each variant and evaluate their performance on natural language, math, and code tasks. Across 3,331 experiments, our results show that LLMs are more vulnerable to structural perturbations than semantic ones, particularly on math and code tasks. Appropriate abstractions like pseudocode and flowcharts can be as effective as code, while encoding the same information with fewer tokens without adhering to original syntax can often retain or even improve performance. Remarkably, even corrupted code with misleading signals remains competitive when surface-level regularities persist. Finally, syntactic styles also shape task-specific gains with Python favoring natural language reasoning and lower-level languages such as Java and Rust favoring math. Through our systematic framework, we aim to provide insight into how different properties of code influence reasoning and inform the design of training data for enhancing LLM reasoning capabilities.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 25 of its 49 references that are in the map. First posted on arXiv 25 Sep 2025.
Builds on
25 of 49 references.
Closest ancestors · 1
Same direction, newest first
Other references · 24
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2025Qwen3 Technical Reportcited by 8,195
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2025Gemma 3 Technical Reportcited by 1,686
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
- 2024A Survey on LLM-as-a-Judgecited by 1,384
- 2023Instruction-Following Evaluation for Large Language Modelscited by 1,143
- 2021Deduplicating Training Data Makes Language Models Bettercited by 705
12 more
- 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 307
- 20242 OLMo 2 Furiouscited by 302
- 2023From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuningcited by 301
- 2025LLMs Can Easily Learn to Reason from Demonstrations Structure, not content, is what matters!cited by 132
- 2023At Which Training Stage Does Code Data Help LLMs Reasoning?cited by 82
- 2024A Survey on Data Selection for LLM Instruction Tuningcited by 76
- 2020LogiQA: A Challenge Dataset for Machine Reading Comprehension with Logical Reasoningcited by 68
- 2024Persistent Pre-Training Poisoning of LLMscited by 46
- 2025Understand, Solve and Translate: Bridging the Multilingual Mathematical Reasoning Gapcited by 41
- 2022Execution-based Evaluation for Data Science Code Generation Modelscited by 31
- 2024Unveiling the Impact of Coding Data Instruction Fine-Tuning on Large Language Models Reasoningcited by 31
- 2024Understanding the Effect of Noise in LLM Training Data with Algorithmic Chains of Thoughtcited by 19
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Coding Agents are Effective Long-Context Processorscited by 11
- 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoningcited by 1
- 2026The Biomimetic Architecture of Software 4.0cited by 0
- 2026Wrong Design Intent Is Worse Than Never Conditioning: A Derangement-Control Diagnosis of Header Conditioning in CAD Program Completioncited by 0
- 2026How code helps different tasks? A decompositional lens on LLM post-trainingcited by 0
- 2026How code helps different tasks? A decompositional lens on LLM post-training27 Sep 2026
- 2026Wrong Design Intent Is Worse Than Never Conditioning: A Derangement-Control Diagnosis of Header Conditioning in CAD Program Completion25 Jul 2026
- 2026The Biomimetic Architecture of Software 4.01 Jun 2026
- 2026Coding Agents are Effective Long-Context Processors20 Mar 2026
- 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning29 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?
- 2025Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings
- 2025Which Data Attributes Stimulate Math and Code Reasoning? An Investigation via Influence Functions
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2025Cross-Task Benchmarking and Evaluation of General-Purpose and Code-Specific Large Language Models ↗
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning
- 2026How Robustly do LLMs Understand Execution Semantics?
- 2024Evaluating LLMs' Mathematical and Coding Competency through Ontology-guided Interventions