At Which Training Stage Does Code Data Help LLMs Reasoning?
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
Large Language Models (LLMs) have exhibited remarkable reasoning capabilities and become the foundation of language technologies. Inspired by the great success of code data in training LLMs, we naturally wonder at which training stage introducing code data can really help LLMs reasoning. To this end, this paper systematically explores the impact of code data on LLMs at different stages. Concretely, we introduce the code data at the pre-training stage, instruction-tuning stage, and both of them, respectively. Then, the reasoning capability of LLMs is comprehensively and fairly evaluated via six reasoning tasks in five domains. We critically analyze the experimental results and provide conclusions with insights. First, pre-training LLMs with the mixture of code and text can significantly enhance LLMs' general reasoning capability almost without negative transfer on other tasks. Besides, at the instruction-tuning stage, code data endows LLMs the task-specific reasoning capability. Moreover, the dynamic mixing strategy of code and text data assists LLMs to learn reasoning capability step-by-step during training. These insights deepen the understanding of LLMs regarding reasoning ability for their application, such as scientific question answering, legal support, etc. The source code and model parameters are released at the link:~urlhttps://github.com/yingweima2022/CodeLLM.
Key facts. Cited by 82 papers in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 31 of its 44 references that are in the map. First posted on arXiv 28 Sep 2023.
Builds on
31 of 44 references.
Closest ancestors · 3
Same direction, newest first
- 2023Code Llama: Open Foundation Models for Code24 Aug
- 2023LLaMA: Open and Efficient Foundation Language Models27 Feb
- 2022E-KAR: A Benchmark for Rationalizing Natural Language Analogical Reasoning16 Mar
Other references · 28
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2022Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answeringcited by 1,881
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
16 more
- 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
- 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,026
- 2023C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Modelscited by 694
- 2023Instruction Tuning with GPT-4cited by 676
- 2023Baichuan 2: Open Large-scale Language Modelscited by 664
- 2023How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resourcescited by 405
- 2021PanGu-α: Large-scale Autoregressive Pretrained Chinese Language Models with Auto-parallel Computationcited by 134
- 2019JEC-QA: A Legal-Domain Question Answering Datasetcited by 115
- 2017DuReader: a Chinese Machine Reading Comprehension Dataset from Real-world Applicationscited by 110
- 2020OCNLI: Original Chinese Natural Language Inferencecited by 86
- 2019Investigating Prior Knowledge for Challenging Chinese Machine Reading Comprehensioncited by 80
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 67
- 2020CPM: A Large-scale Generative Chinese Pre-trained Language Modelcited by 60
- 2022PanGu-Coder: Program Synthesis with Function-Level Language Modelingcited by 47
- 2021OPT: Omni-Perception Pre-Trainer for Cross-Modal Understanding and Generationcited by 20
Built on by
Citing papers per year: 2023: 1; 2024: 36; 2025: 32; 2026: 13.
82 papers.
Sort:
By area:
- 2023MEDITRON-70B: Scaling Medical Pretraining for Large Language Modelscited by 272
- 2024SaulLM-7B: A pioneering Large Language Model for Lawcited by 136
- 2024Rho-1: Not All Tokens Are What You Needcited by 132
- 2024GTBench: Uncovering the Strategic Reasoning Limitations of LLMs via Game-Theoretic Evaluationscited by 118
- 2024The BiGGen Bench: A Principled Benchmark for Fine-grained Evaluation of Language Models with Language Modelscited by 89
- 2025GuardReasoner: Towards Reasoning-based LLM Safeguardscited by 89
- 2024A Peek into Token Bias: Large Language Models Are Not Yet Genuine Reasonerscited by 73
- 2025Organize the Web: Constructing Domains Enhances Pre-Training Data Curationcited by 73
- 2025CAD-Llama: Leveraging Large Language Models for Computer-Aided Design Parametric 3D Model Generationcited by 65
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
- 2024InstructGraph: Boosting Large Language Models via Graph-centric Instruction Tuning and Preference Alignmentcited by 56
- 2024To Code, or Not To Code? Exploring Impact of Code in Pre-trainingcited by 47
38 more
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
- 2024Adaptive Data Optimization: Dynamic Sample Selection with Scaling Lawscited by 46
- 2025GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoningcited by 38
- 2024Mitigating Catastrophic Forgetting in Language Transfer via Model Mergingcited by 36
- 2024Can Large Language Models Understand Symbolic Graphics Programs?cited by 32
- 2024Unveiling the Impact of Coding Data Instruction Fine-Tuning on Large Language Models Reasoningcited by 31
- 2024Code Pretraining Improves Entity Tracking Abilities of Language Modelscited by 31
- 2024Sketch2Code: Evaluating Vision-Language Models for Interactive Web Design Prototypingcited by 29
- 2024Enhancing Reasoning Capabilities of LLMs via Principled Synthetic Logic Corpuscited by 29
- 2024How Does Code Pretraining Affect Language Model Task Performance?cited by 28
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Computecited by 25
- 2025SAFEPATH: Preventing Harmful Reasoning in Chain-of-Thought via Early Alignmentcited by 24
- 2025On Linear Representations and Pretraining Data Frequency in Language Modelscited by 23
- 2025Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-trainingcited by 23
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimizationcited by 23
- 2024Explainable Generative AI (GenXAI): A Survey, Conceptualization, and Research Agendacited by 22
- 2025Common Corpus: The Largest Collection of Ethical Data for LLM Pre-Trainingcited by 19
- 2025Uni-X: Mitigating Modality Conflict with a Two-End-Separated Architecture for Unified Multimodal Modelscited by 18
- 2024Codev-Bench: How Do LLMs Understand Developer-Centric Code Completion?cited by 17
- 2024Cross-Lingual Auto Evaluation for Assessing Multilingual LLMscited by 17
- 2024EMMA-500: Enhancing Massively Multilingual Adaptation of Large Language Modelscited by 16
- 2025Token Weighting for Long-Range Language Modelingcited by 14
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineeringcited by 14
- 2025Chameleon: A Flexible Data-mixing Framework for Language Model Pretraining and Finetuningcited by 14
- 2024Data Mixture Inference: What do BPE Tokenizers Reveal about their Training Data?cited by 13
- 2025Not-Just-Scaling Laws: Towards a Better Understanding of the Downstream Impact of Language Model Design Decisionscited by 11
- 2025One Tokenizer To Rule Them All: Emergent Language Plasticity via Multilingual Tokenizerscited by 11
- 2026Coding Agents are Effective Long-Context Processorscited by 11
- 2024CodeTaxo: Enhancing Taxonomy Expansion with Limited Examples via Code Language Promptscited by 10
- 2024CodePMP: Scalable Preference Model Pretraining for Large Language Model Reasoningcited by 10
- 2024LLMs as Continuous Learners: Improving the Reproduction of Defective Code in Software Issuescited by 10
- 2025Rethinking Multilingual Continual Pretraining: Data Mixing for Adapting LLMs Across Languages and Resourcescited by 10
- 2024An Exploratory Investigation into Code License Infringements in Large Language Model Training Datasetscited by 8
- 2025R-TOFU: Unlearning in Large Reasoning Modelscited by 8
- 2024Are LLMs classical or nonmonotonic reasoners? Lessons from genericscited by 7
- 2025ChemPile: A 250GB Diverse and Curated Dataset for Chemical Foundation Modelscited by 7
- 2025Don't throw the baby out with the bathwater: How and why deep learning for ARCcited by 7
- 2025Analyzing the Effects of Supervised Fine-Tuning on Model Knowledge from Token and Parameter Levelscited by 7
50 most cited of 82 All 82 (JSON)
- 2026Does Learning Protein Folding Generalize to Broader Reasoning?30 Sep 2026
- 2026How code helps different tasks? A decompositional lens on LLM post-training27 Sep 2026
- 2026Domain-Aware Scaling Laws Uncover Data Synergy13 Jul 2026
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Code19 May 2026
- 2026Automatic Textbook Formalization3 Apr 2026
- 2026GPT-NL Public Corpus: A Permissively Licensed, Dutch-First Dataset for LLM Pre-training1 Apr 2026
- 2026To Memorize or to Retrieve: Scaling the Interaction Between Pretraining and Retrieval1 Apr 2026
- 2026Coding Agents are Effective Long-Context Processors20 Mar 2026
- 2026A Family of LLMs Liberated from Static Vocabularies16 Mar 2026
- 2026CodeScaler: Scaling Code LLM Training and Test-Time Inference via Reward Models4 Feb 2026
- 2026Can Large Language Models Generalize Procedures Across Representations?3 Feb 2026
- 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning29 Jan 2026
38 more
- 2026Racka: Efficient Hungarian LLM Adaptation on Academic Infrastructure3 Jan 2026
- 2025Breaking Memorization Barriers in LLM Code Fine-Tuning via Information Bottleneck for Improved Generalization15 Oct 2025
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimization15 Oct 2025
- 2025Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-training30 Sep 2025
- 2025Uni-X: Mitigating Modality Conflict with a Two-End-Separated Architecture for Unified Multimodal Models29 Sep 2025
- 2025On Code-Induced Reasoning in LLMs25 Sep 2025
- 2025Benchmark Profiling: Mechanistic Diagnosis of LLM Benchmarks23 Sep 2025
- 2025Analyzing the Effects of Supervised Fine-Tuning on Model Knowledge from Token and Parameter Levels20 Sep 2025
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environment6 Aug 2025
- 2025Don't throw the baby out with the bathwater: How and why deep learning for ARC17 Jun 2025
- 2025One Tokenizer To Rule Them All: Emergent Language Plasticity via Multilingual Tokenizers12 Jun 2025
- 2025When Style Breaks Safety: Defending LLMs Against Superficial Style Alignment9 Jun 2025
- 2025Common Corpus: The Largest Collection of Ethical Data for LLM Pre-Training2 Jun 2025
- 2025Chameleon: A Flexible Data-mixing Framework for Language Model Pretraining and Finetuning30 May 2025
- 2025Efficient Reasoning via Chain of Unconscious Thought26 May 2025
- 2025R-TOFU: Unlearning in Large Reasoning Models21 May 2025
- 2025SAFEPATH: Preventing Harmful Reasoning in Chain-of-Thought via Early Alignment20 May 2025
- 2025ChemPile: A 250GB Diverse and Curated Dataset for Chemical Foundation Models18 May 2025
- 2025GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning16 May 2025
- 2025CAD-Llama: Leveraging Large Language Models for Computer-Aided Design Parametric 3D Model Generation7 May 2025
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineering18 Apr 2025
- 2025On Linear Representations and Pretraining Data Frequency in Language Models16 Apr 2025
- 2025Rethinking Multilingual Continual Pretraining: Data Mixing for Adapting LLMs Across Languages and Resources5 Apr 2025
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Compute31 Mar 2025
- 2025Empowering LLMs in Decision Games through Algorithmic Data Synthesis18 Mar 2025
- 2025Combinatorial Optimization for All: Using LLMs to Aid Non-Experts in Improving Optimization Algorithms14 Mar 2025
- 2025Token Weighting for Long-Range Language Modeling12 Mar 2025
- 2025Multi Agent based Medical Assistant for Edge Devices7 Mar 2025
- 2025Not-Just-Scaling Laws: Towards a Better Understanding of the Downstream Impact of Language Model Design Decisions5 Mar 2025
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs26 Feb 2025
- 2025Organize the Web: Constructing Domains Enhances Pre-Training Data Curation14 Feb 2025
- 2025Confidence Elicitation: A New Attack Vector for Large Language Models7 Feb 2025
- 2025GuardReasoner: Towards Reasoning-based LLM Safeguards30 Jan 2025
- 2024CoinMath: Harnessing the Power of Coding Instruction for Math LLMs16 Dec 2024
- 2024Thinking with Knowledge Graphs: Enhancing LLM Reasoning Through Structured Data14 Dec 2024
- 2024LLMs as Continuous Learners: Improving the Reproduction of Defective Code in Software Issues21 Nov 2024
- 2024Enhancing Reasoning Capabilities of LLMs via Principled Synthetic Logic Corpus19 Nov 2024
- 2024Crystal: Illuminating LLM Abilities on Language and Code6 Nov 2024
50 newest of 82 All 82 (JSON)
- 2024GTBench: Uncovering the Strategic Reasoning Limitations of LLMs via Game-Theoretic Evaluationscited by 118
- 2025GuardReasoner: Towards Reasoning-based LLM Safeguardscited by 89
- 2024A Peek into Token Bias: Large Language Models Are Not Yet Genuine Reasonerscited by 73
- 2024InstructGraph: Boosting Large Language Models via Graph-centric Instruction Tuning and Preference Alignmentcited by 56
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
- 2025GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoningcited by 38
- 2024Unveiling the Impact of Coding Data Instruction Fine-Tuning on Large Language Models Reasoningcited by 31
- 2024Enhancing Reasoning Capabilities of LLMs via Principled Synthetic Logic Corpuscited by 29
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Computecited by 25
- 2025SAFEPATH: Preventing Harmful Reasoning in Chain-of-Thought via Early Alignmentcited by 24
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimizationcited by 23
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineeringcited by 14
12 most cited of 24 All 24 (JSON)
- 2026Does Learning Protein Folding Generalize to Broader Reasoning?30 Sep 2026
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Code19 May 2026
- 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning29 Jan 2026
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimization15 Oct 2025
- 2025On Code-Induced Reasoning in LLMs25 Sep 2025
- 2025Efficient Reasoning via Chain of Unconscious Thought26 May 2025
- 2025R-TOFU: Unlearning in Large Reasoning Models21 May 2025
- 2025SAFEPATH: Preventing Harmful Reasoning in Chain-of-Thought via Early Alignment20 May 2025
- 2025GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning16 May 2025
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineering18 Apr 2025
- 2025Rethinking Multilingual Continual Pretraining: Data Mixing for Adapting LLMs Across Languages and Resources5 Apr 2025
- 2025Thinking Longer, Not Larger: Enhancing Software Engineering Agents via Scaling Test-Time Compute31 Mar 2025
12 newest of 24 All 24 (JSON)
- 2023MEDITRON-70B: Scaling Medical Pretraining for Large Language Modelscited by 272
- 2024SaulLM-7B: A pioneering Large Language Model for Lawcited by 136
- 2024Rho-1: Not All Tokens Are What You Needcited by 132
- 2024The BiGGen Bench: A Principled Benchmark for Fine-grained Evaluation of Language Models with Language Modelscited by 89
- 2025Organize the Web: Constructing Domains Enhances Pre-Training Data Curationcited by 73
- 2025CAD-Llama: Leveraging Large Language Models for Computer-Aided Design Parametric 3D Model Generationcited by 65
- 2024To Code, or Not To Code? Exploring Impact of Code in Pre-trainingcited by 47
- 2024Adaptive Data Optimization: Dynamic Sample Selection with Scaling Lawscited by 46
- 2024Mitigating Catastrophic Forgetting in Language Transfer via Model Mergingcited by 36
- 2024Can Large Language Models Understand Symbolic Graphics Programs?cited by 32
- 2024Code Pretraining Improves Entity Tracking Abilities of Language Modelscited by 31
- 2024How Does Code Pretraining Affect Language Model Task Performance?cited by 28
12 most cited of 50 All 50 (JSON)
- 2026How code helps different tasks? A decompositional lens on LLM post-training27 Sep 2026
- 2026Domain-Aware Scaling Laws Uncover Data Synergy13 Jul 2026
- 2026Automatic Textbook Formalization3 Apr 2026
- 2026GPT-NL Public Corpus: A Permissively Licensed, Dutch-First Dataset for LLM Pre-training1 Apr 2026
- 2026A Family of LLMs Liberated from Static Vocabularies16 Mar 2026
- 2026Can Large Language Models Generalize Procedures Across Representations?3 Feb 2026
- 2026Racka: Efficient Hungarian LLM Adaptation on Academic Infrastructure3 Jan 2026
- 2025Breaking Memorization Barriers in LLM Code Fine-Tuning via Information Bottleneck for Improved Generalization15 Oct 2025
- 2025Learning to See Before Seeing: Demystifying LLM Visual Priors from Language Pre-training30 Sep 2025
- 2025Uni-X: Mitigating Modality Conflict with a Two-End-Separated Architecture for Unified Multimodal Models29 Sep 2025
- 2025Benchmark Profiling: Mechanistic Diagnosis of LLM Benchmarks23 Sep 2025
- 2025Analyzing the Effects of Supervised Fine-Tuning on Model Knowledge from Token and Parameter Levels20 Sep 2025
12 newest of 50 All 50 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2025Cross-Task Benchmarking and Evaluation of General-Purpose and Code-Specific Large Language Models ↗
- 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
- 2025DeepDistill: Enhancing LLM Reasoning Capabilities via Large-Scale Difficulty-Graded Data Training
- 2024Eliciting Better Multilingual Structured Reasoning from LLMs through Code
- 2025Open the Oyster: Empirical Evaluation and Improvement of Code Reasoning Confidence in LLMs
- 2025Front-Loading Reasoning: The Synergy between Pretraining and Post-Training Data
- 2025Position: On the Methodological Pitfalls of Evaluating Base LLMs for Reasoning
- 2024Can LLMs Reason in the Wild with Programs?