Lune

NeurIPS2024顶会

EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimization

Dong Huang, Jianbo Dai, Han Weng, Puzhen Wu, Yuhao Qing, Heming Cui, Zhijiang Guo, Jie Zhang

摘要

Large language models (LLMs) have shown remarkable progress in code generation, but their generated code often suffers from inefficiency, resulting in longer execution times and higher memory consumption. To address this issue, we propose EffiLearner, a self-optimization framework that utilizes execution overhead profiles to improve the efficiency of LLM-generated code. EffiLearner first generates code using an LLM, then executes it locally to capture execution time and memory usage profiles. These profiles are fed back to the LLM, which then revises the code to reduce overhead. To evaluate the effectiveness of EffiLearner, we conduct extensive experiments on the EffiBench, HumanEval, and MBPP with 16 open-source and 6 closed-source models. Our evaluation results demonstrate that through iterative self-optimization, EffiLearner significantly enhances the efficiency of LLM-generated code. For example, the execution time (ET) of StarCoder2-15B for the EffiBench decreases from 0.93 (s) to 0.12 (s) which reduces 87.1% the execution time requirement compared with the initial code. The total memory usage (TMU) of StarCoder2-15B also decreases from 22.02 (Mbs) to 2.03 (Mbs), which decreases 90.8% of total memory consumption during the execution process. The source code of EffiLearner was released in https://github.com/huangd1999/EffiLearner

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Chiseling Out Efficiency: Structured Skeleton Supervision for Efficient Code Generation 引用了 Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization
  • EcoAssist: Embedding Sustainability into AI-Assisted Frontend Development 引用了 Language Models are Few-Shot Learners
  • Self-Refine: Iterative Refinement with Self-Feedback 引用了 Training language models to follow instructions with human feedback
  • Reflexion: language agents with verbal reinforcement learning 引用了 Self-Refine: Iterative Refinement with Self-Feedback
  • Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization 引用了 Finetuned Language Models are Zero-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners 引用了 Language Models are Few-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners 引用了 Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback 引用了 Finetuned Language Models are Zero-Shot Learners
  • Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
  • More Than Just Functional: LLM-as-a-Critique for Efficient Code Generation 引用了 Self-Refine: Iterative Refinement with Self-Feedback
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency OptimizationMingzhe Du, Anh Tuan Luu, Yue Liu, Yuhao Qing 等NeurIPS 2025 · 18 次引用
  2. DSCodeBench: A Realistic Benchmark for Data Science Code GenerationShuyin Ouyang, Dong Huang, Jingwen Guo, Zeyu Sun 等AAAI 2026 · 10 次引用
  3. EcoAssist: Embedding Sustainability into AI-Assisted Frontend DevelopmentAndré Barrocas, Nuno Jardim Nunes, Valentina Nisi, Nikolas MartelaroCHI 2026 · 2 次引用
  4. More Than Just Functional: LLM-as-a-Critique for Efficient Code GenerationDerui Zhu, Dingfan Chen, Jinfu Chen, Jens Grossklags 等NeurIPS 2025 · 2 次引用
  5. Chiseling Out Efficiency: Structured Skeleton Supervision for Efficient Code GenerationYu Yu, Zhihong Sun, Jia Li, Yao Wan 等FSE 2026

它引用的 Paper25

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
  3. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用
  4. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用
  5. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用

相关 Paper

  1. EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuningDong Huang, Guangtao Zeng, Jianbo Dai, Meng Luo 等ICML 2025
  2. Search-Based LLMs for Code OptimizationShuzheng Gao, Cuiyun Gao, Wenchao Gu, Michael R. LyuICSE 2025 · 11 次引用
  3. Rethinking Code Refinement: Learning to Judge Code EfficiencyMinju Seo, Jinheon Baek, Sung Ju HwangEMNLP Findings 2024 · 1 次引用
  4. CYCLE: Learning to Self-Refine the Code GenerationYangruibo Ding, Marcus J. Min, Gail E. Kaiser, Baishakhi RayOOPSLA 2024 · 35 次引用
  5. How efficient is LLM-generated code? A rigorous & high-standard benchmarkRuizhong Qiu, Weiliang Will Zeng, James Ezick, Christopher Lott 等ICLR 2025
黄昏的海面,两侧是细线勾勒的悬崖