Code-Optimise: Self-Generated Preference Data for Correctness and Efficiency
On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis
Abstract (arXiv)
Code Language Models have been trained to generate accurate solutions, typically with no regard for runtime. On the other hand, previous works that explored execution optimisation have observed corresponding drops in functional correctness. To that end, we introduce Code-Optimise, a framework that incorporates both correctness (passed, failed) and runtime (quick, slow) as learning signals via self-generated preference data. Our framework is both lightweight and robust as it dynamically selects solutions to reduce overfitting while avoiding a reliance on larger models for learning signals. Code-Optimise achieves significant improvements in pass@k while decreasing the competitive baseline runtimes by an additional 6% for in-domain data and up to 3% for out-of-domain data. As a by-product, the average length of the generated solutions is reduced by up to 48% on MBPP and 23% on HumanEval, resulting in faster and cheaper inference. The generated data and codebase is open-sourced at https://github.com/huawei-noah/HEBO/tree/Code_Optimise.
Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 19 of its 27 references that are in the map. First posted on arXiv 18 Jun 2024.
Builds on
19 of 27 references.
Closest ancestors · 1
Same direction, newest first
Other references · 18
- 2023GPT-4 Technical Reportcited by 18,396
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
- 2023A General Theoretical Paradigm to Understand Learning from Human Preferencescited by 912
- 2023StarCoder: may the source be with you!cited by 799
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 562
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2023RRHF: Rank Responses to Align Language Models with Human Feedback without tearscited by 463
6 more
- 2023UltraFeedback: Boosting Language Models with Scaled AI Feedbackcited by 406
- 2023SLiC-HF: Sequence Likelihood Calibration with Human Feedbackcited by 401
- 2022The Stack: 3 TB of permissively licensed source codecited by 359
- 2023Statistical Rejection Sampling Improves Preference Optimizationcited by 323
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
- 2023Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesiscited by 4
Built on by
Citing papers per year: 2024: 4; 2025: 6; 2026: 6.
16 papers.
Sort:
By area:
- 2025Can We Generate Images with CoT? Let's Verify and Reinforce Image Generation Step by Stepcited by 131
- 2025A Survey of Direct Preference Optimizationcited by 36
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 27
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applicationscited by 27
- 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
- 2025SEAlign: Alignment Training for Software Engineering Agentcited by 11
- 2025Teaching Your Models to Understand Code via Focal Preference Alignmentcited by 10
- 2024SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Maskscited by 9
- 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMscited by 9
- 2025Alignment with Fill-In-the-Middle for Enhancing Code Generationcited by 4
- 2025Learning to Align Human Code Preferencescited by 1
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensuscited by 1
4 more
- 2026CROP: Expert-Aligned Image Cropping via Compositional Reasoning and Optimizing Preferencecited by 1
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimizationcited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translationcited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimization13 May 2026
- 2026CROP: Expert-Aligned Image Cropping via Compositional Reasoning and Optimizing Preference9 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus31 Mar 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining1 Jan 2026
- 2025Alignment with Fill-In-the-Middle for Enhancing Code Generation27 Aug 2025
- 2025Learning to Align Human Code Preferences27 Jul 2025
- 2025SEAlign: Alignment Training for Software Engineering Agent24 Mar 2025
- 2025A Survey of Direct Preference Optimization12 Mar 2025
- 2025Teaching Your Models to Understand Code via Focal Preference Alignment4 Mar 2025
- 2025Can We Generate Images with CoT? Let's Verify and Reinforce Image Generation Step by Step23 Jan 2025
4 more
- 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMs20 Nov 2024
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applications21 Oct 2024
- 2024SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Masks7 Oct 2024
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?19 Jul 2024
- 2025A Survey of Direct Preference Optimizationcited by 36
- 2025Teaching Your Models to Understand Code via Focal Preference Alignmentcited by 10
- 2024SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Maskscited by 9
- 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMscited by 9
- 2025Alignment with Fill-In-the-Middle for Enhancing Code Generationcited by 4
- 2025Learning to Align Human Code Preferencescited by 1
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensuscited by 1
- 2026Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimizationcited by 0
- 2026Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimization13 May 2026
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus31 Mar 2026
- 2025Alignment with Fill-In-the-Middle for Enhancing Code Generation27 Aug 2025
- 2025Learning to Align Human Code Preferences27 Jul 2025
- 2025A Survey of Direct Preference Optimization12 Mar 2025
- 2025Teaching Your Models to Understand Code via Focal Preference Alignment4 Mar 2025
- 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMs20 Nov 2024
- 2024SparsePO: Controlling Preference Alignment of LLMs via Sparse Token Masks7 Oct 2024
- 2025SEAlign: Alignment Training for Software Engineering Agentcited by 11
- 2025SEAlign: Alignment Training for Software Engineering Agent24 Mar 2025
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 27
- 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
- 2026CROP: Expert-Aligned Image Cropping via Compositional Reasoning and Optimizing Preferencecited by 1
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedbackcited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translationcited by 0
- 2026Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code Translation16 Jun 2026
- 2026CROP: Expert-Aligned Image Cropping via Compositional Reasoning and Optimizing Preference9 May 2026
- 2026EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback6 Apr 2026
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining1 Jan 2026
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?19 Jul 2024
Similar, not cited
Close in wording, no citation either way
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Models
- 2024Learning Code Preference via Synthetic Evolution
- 2025Towards Better Correctness and Efficiency in Code Generation
- 2024Thinking Before Running! Efficient Code Generation with Thorough Exploration and Optimal Refinement
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization
- 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Cases
- 2025Focused-DPO: Enhancing Code Generation Through Focused Preference Optimization on Error-Prone Points
- 2026Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization