LLM-Assisted Code Cleaning For Training Accurate Code Generators
Not on the map. Why?
Abstract (arXiv)
Natural language to code generation is an important application area of LLMs and has received wide attention from the community. The majority of relevant studies have exclusively concentrated on increasing the quantity and functional correctness of training sets while disregarding other stylistic elements of programs. More recently, data quality has garnered a lot of interest and multiple works have showcased its importance for improving performance. In this work, we investigate data quality for code and find that making the code more structured and readable leads to improved code generation performance of the system. We build a novel data-cleaning pipeline that uses these principles to transform existing programs by 1.) renaming variables, 2.) modularizing and decomposing complex code into smaller helper sub-functions, and 3.) inserting natural-language based plans via LLM based transformations. We evaluate our approach on two challenging algorithmic code generation benchmarks and find that fine-tuning CodeLLaMa-7B on our transformed modularized programs improves the performance by up to 30% compared to fine-tuning on the original dataset. Additionally, we demonstrate improved performance from using a smaller amount of higher-quality data, finding that a model fine-tuned on the entire original dataset is outperformed by a model trained on 15% of our cleaned dataset. Even in comparison to closed-source models, our models outperform the much larger AlphaCoder models.
Key facts. Cited by 27 papers in the map (data through 14 Oct 2026). Builds on 49 of its 55 references that are in the map. First posted on arXiv 25 Nov 2023.
Builds on
49 of 55 references.
References · 49
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Let's Verify Step by Stepcited by 3,789
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,407
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,332
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
37 more
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2022STaR: Bootstrapping Reasoning With Reasoningcited by 940
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 625
- 2023Textbooks Are All You Needcited by 569
- 2023Textbooks Are All You Need II: phi-1.5 technical reportcited by 565
- 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 560
- 2023MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuningcited by 487
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2022CodeT: Code Generation with Generated Testscited by 384
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
- 2022Teaching Small Language Models to Reasoncited by 284
- 2021Symbolic Knowledge Distillation: from General Language Models to Commonsense Modelscited by 270
- 2023Specializing Smaller Language Models towards Multi-Step Reasoningcited by 251
- 2023Planning with Large Language Models for Code Generationcited by 182
- 2019SPoC: Search-based Pseudocode to Codecited by 176
- 2023Symbolic Chain-of-Thought Distillation: Small Models Can Also "Think" Step-by-Stepcited by 148
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
- 2023Self-planning Code Generation with Large Language Modelscited by 124
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 99
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 91
- 2022Natural Language to Code Generation in Interactive Data Science Notebookscited by 87
- 2022Language Models Can Teach Themselves to Program Bettercited by 78
- 2023Maybe Only 0.5% Data is Needed: A Preliminary Exploration of Low Training Data Instruction Tuningcited by 58
- 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58
- 2023ICE-Score: Instructing Large Language Models to Evaluate Codecited by 52
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2023Improving ChatGPT Prompt for Code Generationcited by 28
- 2023Think Outside the Code: Brainstorming Boosts Large Language Models in Code Generationcited by 19
- 2022Referee: Reference-Free Sentence Summarization with Sharper Controllability through Symbolic Knowledge Distillationcited by 14
- 2023Explaining Competitive-Level Programming Solutions using LLMscited by 13
Built on by
Citing papers per year: 2024: 15; 2025: 7; 2026: 5.
27 papers.
Sort:
By area:
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2024A Survey on Knowledge Distillation of Large Language Modelscited by 284
- 2024OpenMathInstruct-2: Accelerating AI for Math with Massive Open-Source Instruction Datacited by 200
- 2025Synthetic Data Generation Using Large Language Models: Advances in Text and Codecited by 61
- 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 53
- 2024The Limits of Inference Scaling Through Resamplingcited by 53
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?cited by 29
- 2025Rewriting Pre-Training Data Boosts LLM Performance in Math and Codecited by 21
- 2024Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agentscited by 17
- 2025Hard Negatives, Hard Lessons: Revisiting Training Data Quality for Robust Information Retrieval with LLMscited by 17
15 more
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2024On Catastrophic Inheritance of Large Foundation Modelscited by 15
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025Vision-G1: Towards General Vision Language Reasoning with Multi-Domain Data Curationcited by 13
- 2024Scattered Forest Search: Smarter Code Space Exploration with LLMscited by 10
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2024Mastering the Craft of Data Synthesis for CodeLLMscited by 3
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2025JARVIS: A Multi-Agent Code Assistant for High-Quality EDA Script Generationcited by 2
- 2026VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generationcited by 1
- 2026Aligning Thoughts with Answers: Probability Rewards to Tame Thinking Driftcited by 1
- 2024Revisiting the Impact of Pursuing Modularity for Code Generationcited by 0
- 2025Reasoning Distillation and Structural Alignment for Improved Code Generationcited by 0
- 2026Instruction-Tuned LLMs for Parsing and Mining Unstructured Logs on Leadership HPC Systemscited by 0
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generationcited by 0
- 2026Aligning Thoughts with Answers: Probability Rewards to Tame Thinking Drift30 Sep 2026
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generation2 Jul 2026
- 2026Instruction-Tuned LLMs for Parsing and Mining Unstructured Logs on Leadership HPC Systems6 Apr 2026
- 2026VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generation4 Feb 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2025Reasoning Distillation and Structural Alignment for Improved Code Generation20 Oct 2025
- 2025Vision-G1: Towards General Vision Language Reasoning with Multi-Domain Data Curation18 Aug 2025
- 2025Hard Negatives, Hard Lessons: Revisiting Training Data Quality for Robust Information Retrieval with LLMs22 May 2025
- 2025JARVIS: A Multi-Agent Code Assistant for High-Quality EDA Script Generation20 May 2025
- 2025Rewriting Pre-Training Data Boosts LLM Performance in Math and Code5 May 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025Synthetic Data Generation Using Large Language Models: Advances in Text and Code18 Mar 2025
15 more
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024The Limits of Inference Scaling Through Resampling26 Nov 2024
- 2024Scattered Forest Search: Smarter Code Space Exploration with LLMs22 Oct 2024
- 2024Mastering the Craft of Data Synthesis for CodeLLMs16 Oct 2024
- 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?10 Oct 2024
- 2024OpenMathInstruct-2: Accelerating AI for Math with Massive Open-Source Instruction Data2 Oct 2024
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging2 Oct 2024
- 2024Revisiting the Impact of Pursuing Modularity for Code Generation16 Jul 2024
- 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Study8 Jul 2024
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Models29 Jun 2024
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions22 Jun 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar 2024
- 2024Tapilot-Crossing: Benchmarking and Evolving LLMs Towards Interactive Data Analysis Agents8 Mar 2024
- 2024A Survey on Knowledge Distillation of Large Language Models20 Feb 2024
- 2024On Catastrophic Inheritance of Large Foundation Models2 Feb 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024OpenMathInstruct-2: Accelerating AI for Math with Massive Open-Source Instruction Datacited by 200
- 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?cited by 29
- 2025Rewriting Pre-Training Data Boosts LLM Performance in Math and Codecited by 21
- 2025Vision-G1: Towards General Vision Language Reasoning with Multi-Domain Data Curationcited by 13
- 2024Scattered Forest Search: Smarter Code Space Exploration with LLMscited by 10
- 2026Aligning Thoughts with Answers: Probability Rewards to Tame Thinking Driftcited by 1
- 2025Reasoning Distillation and Structural Alignment for Improved Code Generationcited by 0
- 2026Aligning Thoughts with Answers: Probability Rewards to Tame Thinking Drift30 Sep 2026
- 2025Reasoning Distillation and Structural Alignment for Improved Code Generation20 Oct 2025
- 2025Vision-G1: Towards General Vision Language Reasoning with Multi-Domain Data Curation18 Aug 2025
- 2025Rewriting Pre-Training Data Boosts LLM Performance in Math and Code5 May 2025
- 2024Scattered Forest Search: Smarter Code Space Exploration with LLMs22 Oct 2024
- 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?10 Oct 2024
- 2024OpenMathInstruct-2: Accelerating AI for Math with Massive Open-Source Instruction Data2 Oct 2024
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar 2024
- 2024A Survey on Knowledge Distillation of Large Language Modelscited by 284
- 2024A Survey on Knowledge Distillation of Large Language Models20 Feb 2024
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Studycited by 53
- 2024The Limits of Inference Scaling Through Resamplingcited by 53
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2025Hard Negatives, Hard Lessons: Revisiting Training Data Quality for Robust Information Retrieval with LLMscited by 17
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 16
- 2024On Catastrophic Inheritance of Large Foundation Modelscited by 15
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Modelscited by 15
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2026VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generationcited by 1
- 2024Revisiting the Impact of Pursuing Modularity for Code Generationcited by 0
- 2026Instruction-Tuned LLMs for Parsing and Mining Unstructured Logs on Leadership HPC Systemscited by 0
12 most cited of 13 All 13 (JSON)
- 2026DecompRL: Solving Harder Problems by Learning Modular Code Generation2 Jul 2026
- 2026Instruction-Tuned LLMs for Parsing and Mining Unstructured Logs on Leadership HPC Systems6 Apr 2026
- 2026VeriInteresting: An Empirical Study of Model Prompt Interactions in Verilog Code Generation4 Feb 2026
- 2025Hard Negatives, Hard Lessons: Revisiting Training Data Quality for Robust Information Retrieval with LLMs22 May 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysis18 Dec 2024
- 2024The Limits of Inference Scaling Through Resampling26 Nov 2024
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging2 Oct 2024
- 2024Revisiting the Impact of Pursuing Modularity for Code Generation16 Jul 2024
- 2024What's Wrong with Your Code Generated by Large Language Models? An Extensive Study8 Jul 2024
- 2024Beyond Functional Correctness: Investigating Coding Style Inconsistencies in Large Language Models29 Jun 2024
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions22 Jun 2024
12 newest of 13 All 13 (JSON)