ACECode: A Reinforcement Learning Framework for Aligning Code Efficiency and Correctness in Code Language Models
Not on the map. Why?
Abstract (arXiv)
CodeLLMs have demonstrated remarkable advancements in software engineering tasks. However, while these models can generate functionally correct code, they often produce code that is inefficient in terms of runtime. This inefficiency is particularly problematic in resource-constrained environments, impacting software performance and sustainability. Existing approaches for optimizing code efficiency for CodeLLMs like SOAP and PIE exhibit certain limitations. SOAP requires a compatible execution environment and predefined test cases for iterative code modification, while PIE focuses on instruction tuning, improving efficiency but compromising correctness. These shortcomings highlight the need for a fine-tuning framework that optimizes both efficiency and correctness without relying on predefined test cases or specific execution environments. To bridge this gap, we introduce ACECode, a reinforcement learning-based fine-tuning framework that aligns CodeLLMs with dual objectives of efficiency and correctness. ACECode combines three key steps: (1) generating code with an actor CodeLLM, (2) calculating a training-free reward signal derived from code execution feedback for each generated code, and (3) optimizing the CodeLLM via Proximal Policy Optimization (PPO) algorithm. This reward signal enables joint assessment of efficiency and correctness without manual labeling. We evaluate ACECode by fine-tuning four SOTA (state-of-the-art) CodeLLMs and comparing their code with three baselines: original, instruction-tuned, and PIE-tuned CodeLLMs. Extensive experiment results suggest that tool significantly improves the efficiency and correctness of generated code against all baselines for all CodeLLMs. Specifically, CodeLLMs fine-tuned with ACECode improve pass@1 by 1.84% to 14.51% and reduce runtime in 65% to 72% of cases compared to original CodeLLMs.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). First posted on arXiv 23 Dec 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 8; 2026: 2.
10 papers.
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Codecited by 24
- 2026RLAnything: Forge Environment, Policy, and Reward Model in Completely Dynamic RL Systemcited by 19
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025Towards Better Correctness and Efficiency in Code Generationcited by 8
- 2025LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languagescited by 5
- 2025Improving LLM-Generated Code Quality with GRPOcited by 5
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?cited by 1
- 2025Think Like Human Developers: Harnessing Community Knowledge for Structured Code Reasoningcited by 0
- 2025Are AI Coders Snitches? An Empirical Study of Pretraining Data Detection on Code Large Language Modelscited by 0
- 2025VERIRL: Boosting the LLM-based Verilog Code Generation via Reinforcement Learningcited by 0
- 2026Are Performance-Optimization Benchmarks Reliably Measuring Coding Agents?1 Jul 2026
- 2026RLAnything: Forge Environment, Policy, and Reward Model in Completely Dynamic RL System2 Feb 2026
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025VERIRL: Boosting the LLM-based Verilog Code Generation via Reinforcement Learning25 Aug 2025
- 2025Towards Better Correctness and Efficiency in Code Generation24 Aug 2025
- 2025Are AI Coders Snitches? An Empirical Study of Pretraining Data Detection on Code Large Language Models23 Jul 2025
- 2025Improving LLM-Generated Code Quality with GRPO2 Jun 2025
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code19 May 2025
- 2025LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languages24 Mar 2025
- 2025Think Like Human Developers: Harnessing Community Knowledge for Structured Code Reasoning19 Mar 2025