EUVIMEDEUVIMED entdecken
Crossref

Towards Better Correctness and Efficiency in Code Generation

Yunlong Feng, Yang Xu, Xiao Xu, Binyuan Hui, Junyang Lin

Proceedings of the AAAI Conference on Artificial Intelligence · 14.03.2026 · 40 (36) · 30708-30716

DOI: 10.1609/aaai.v40i36.40327 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the AAAI Conference on Artificial Intelligence, online erschienen am 14.03.2026. Verfasst von Yunlong Feng und 4 weiteren Autor:innen.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

While code large language models have demonstrated remarkable progress in code generation, the generated code often exhibits poor runtime efficiency, limiting its practical application in performance-sensitive scenarios. To address this limitation, we propose an efficiency-oriented reinforcement learning framework guided by a novel performance reward. Based on this framework, we take a deeper dive into the code efficiency problem, identifying then proposing methods to overcome key bottlenecks: (1) Dynamic exploration overcomes the static data constraints of offline fine-tuning, enabling the discovery of more efficient code implementations. (2) The error-insensitive reinforcement learning method and high-contrast efficiency signals are crucial for mitigating systematic errors and achieving effective optimization. (3) Online exploration is most effective when starting from a high-correctness baseline, as this allows for efficiency improvements without sacrificing accuracy. With these discoveries, we finally propose a two-stage tuning method, which achieves high and balanced performance across correctness and efficiency. The results of experiments show the effectiveness of the method, which improves code correctness by 10.18% and runtime efficiency by 7.75% on a 7B model, achieving performance comparable to much larger model.

Zitieren

APA

Feng, Y., Xu, Y., Xu, X., Hui, B., & Lin, J. (2026). Towards Better Correctness and Efficiency in Code Generation. Proceedings of the AAAI Conference on Artificial Intelligence, 40(36), 30708-30716. https://doi.org/10.1609/aaai.v40i36.40327

Vancouver

Feng Y, Xu Y, Xu X, Hui B, Lin J. Towards Better Correctness and Efficiency in Code Generation. Proceedings of the AAAI Conference on Artificial Intelligence. 2026;40(36):30708-30716. doi:10.1609/aaai.v40i36.40327

BibTeX
@article{Feng2026,
  author = {Feng, Yunlong and Xu, Yang and Xu, Xiao and Hui, Binyuan and Lin, Junyang},
  title = {Towards Better Correctness and Efficiency in Code Generation},
  journal = {Proceedings of the AAAI Conference on Artificial Intelligence},
  year = {2026},
  volume = {40},
  number = {36},
  pages = {30708--30716},
  doi = {10.1609/aaai.v40i36.40327}
}
Kostenlos starten →