Research map / Large language models / Agents, code and math
More Than Just Functional: LLM-as-a-Critique for Efficient Code Generation
Derui Zhu, Dingfan Chen, jinfu chen, Jens Grossklags, Walter Pretschner, Weiyi Shang
Max Planck Institute for Intelligent Systems · Wuhan University · Technical University of Munich · University of Waterloo
Read the paperPlace an idea next to itCheck your own paper ↗
The paper uses LLM-as-a-critique to push LLM code generation toward efficiency as well as functional correctness, addressing the perplexity objective's bias toward functionality.
AI-extracted summary. Written by AI from the paper's abstract only. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Problem
LLM code generation is trained and decoded with perplexity objectives that emphasize functional correctness while neglecting code efficiency, which matters for real-world coding tasks.
Approach
Observes that well-trained LLMs can recognize efficiency differences in code they generate, and leverages the LLM itself as a critic to steer generation toward more efficient code. Based on the abstract only; method details are not available.
Surprising findings
- Well-trained LLMs can recognize efficiency differences in code they generate despite optimizing perplexity for functionality.
Open problems in execution-based code verification
Can execution-based code verification be trusted beyond Python, small benchmarks and the tests it relies on?
- Evaluated on Python or one other language only. · 17 papers state it
- Only a few models were tested, and larger ones were left out. · 16 papers state it
- Passing the tests does not show the code is correct. · 15 papers state it
Closest papers by meaning
- EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning (ICML 2025 · similarity 0.92)
- How efficient is LLM-generated code? A rigorous & high-standard benchmark (ICLR 2025 · similarity 0.92)
- EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code (NeurIPS 2025 · similarity 0.90)
- The Automated LLM Speedrunning Benchmark: Reproducing NanoGPT Improvements (NeurIPS 2025 · similarity 0.90)
- LLM-Assisted Code Cleaning For Training Accurate Code Generators (ICLR 2024 · similarity 0.90)
- Copilot Arena: A Platform for Code LLM Evaluation in the Wild (ICML 2025 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.