mlsanityData to 7 Oct 2026

Enhancing Code Generation Performance of Smaller Models by Distilling the Reasoning Ability of LLMs

arXiv 2403.13271 ↗First posted 20 Mar 2024cs.SEcited by 17

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Large Language Models (LLMs) have recently made significant advances in code generation through the 'Chain-of-Thought' prompting technique. This technique empowers the model to autonomously devise "solution plans" to tackle intricate programming challenges, thereby improving its performance in code generation. Nevertheless, smaller models have been struggling to keep up with LLMs in deducing these plans, adversely affecting their code generation capabilities. Given the considerable size and associated deployment costs, along with concerns about data security, many teams opt for deploying smaller models for code generation. Consequently, there arises a compelling need for transferring LLMs' code generation reasoning abilities to the smaller models. In this paper, we propose the CodePLAN framework, which aims to transfer LLMs' reasoning capabilities to smaller models through distillation. We adopt a multi-task learning approach, jointly undertaking code generation and solution plan generation tasks, to enhance the code generation capabilities of the smaller model. To ensure the superior quality of the solution plans, we advocate for the utilization of backward reasoning and plan sampling strategies. Our experiments show that in comparison to the conventional fine-tuning approach, our approach improves the smaller model's code generation performance (measured in pass@1 metric) by over 130% on the challenging APPS benchmark.

Key facts. Cited by 17 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 22 of its 40 references that are in the map. First posted on arXiv 20 Mar 2024.

Builds on

22 of 40 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023Think Outside the Code: Brainstorming Boosts Large Language Models in Code Generation18 May

Other references · 21

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  8. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  9. 2023StarCoder: may the source be with you!cited by 790
  10. 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 710
  11. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  12. 2022CodeT: Code Generation with Generated Testscited by 369
9 more
  1. 2022Large Language Models Are Reasoning Teacherscited by 318
  2. 2023TACO: Topics in Algorithmic COde generation datasetcited by 150
  3. 2023Self-planning Code Generation with Large Language Modelscited by 121
  4. 2023Automatic Prompt Augmentation and Selection with Chain-of-Thought from Labeled Datacited by 119
  5. 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
  6. 2022Coder Reviewer Reranking for Code Generationcited by 83
  7. 2016Latent Predictor Networks for Code Generationcited by 73
  8. 2024IRCoCo: Immediate Rewards-Guided Deep Reinforcement Learning for Code Completioncited by 13
  9. 2024Knowledge-Aware Code Generation with Large Language Modelscited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 7; 2025: 4; 2026: 6.

17 papers.

Sort:

By area:

  1. 2024A Survey on Large Language Models for Code Generationcited by 646
  2. 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
  3. 2026Beyond Trajectory-Level Attribution: Graph-Based Credit Assignment for Agentic Reinforcement Learningcited by 23
  4. 2024CodeIP: A Grammar-Guided Multi-Bit Watermark for Large Language Models of Codecited by 21
  5. 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
  6. 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metricscited by 12
  7. 2025Talk to Your Slides: High-Efficiency Slide Editing via Language-Driven Structured Data Manipulationcited by 7
  8. 2025AdaSTaR: Adaptive Data Sampling for Training Self-Taught Reasonerscited by 6
  9. 2024Mastering the Craft of Data Synthesis for CodeLLMscited by 3
  10. 2024Visual Program Distillation with Template-Based Augmentationcited by 3
  11. 2026ClaimDB: A Fact Verification Benchmark over Large Structured Datacited by 3
  12. 2026LawThinker: A Deep Research Legal Agent in Dynamic Environmentscited by 3
5 more
  1. 2024Eliminating Backdoors in Neural Code Models for Secure Code Understandingcited by 2
  2. 2024Investigating the Transferability of Code Repair for Low-Resource Programming Languagescited by 0
  3. 2026Improving LLM Code Generation via Requirement-Aware Curriculum Reinforcement Learningcited by 0
  4. 2026ReAD: Reinforcement-Guided Capability Distillation for Large Language Modelscited by 0
  5. 2026Syntax Without Semantics: Teaching Large Language Models to Code in an Unseen Languagecited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?
  2. 2025Increasing LLM Coding Capabilities through Diverse Synthetic Coding Tasks
  3. 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmap
  4. 2025Reasoning Distillation and Structural Alignment for Improved Code Generation
  5. 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
  6. 2023Chain-of-Thought in Neural Code Generation: From and For Lightweight Language Models
  7. 2024CodeMind: Evaluating Large Language Models for Code Reasoning
  8. 2024Planning-Driven Programming: A Large Language Model Programming Workflow