Large language models (LLMs) can generate functionally correct programs that differ substantially in execution efficiency. Existing inference-time optimization methods typically refine each candidate using pointwise runtime or profiling feedback, which identifies how costly an implementation is or where the cost arises, but offers limited guidance on how the computation should change. We introduce DIFFERENTIAL EXECUTION FEEDBACK (DEF), which compares implementations that are nearby in structural program space but separated in performance, turning their execution and implementation differences into directional optimization evidence. We demonstrate DEF in EffiPair, a training-free, test-time framework that pairs structurally similar programs with different efficiencies, distills their relative execution behavior into compact feedback, and iteratively refines a candidate pool. Across EvalPerf, Mercury, and ENAMEL, using GPT-4o mini, DeepSeek-V4.1 Flash, and GPT-5 mini, EffiPair achieves the highest value on each benchmark's official efficiency metric in all nine model-benchmark settings under matched evaluation conditions. Moreover, two contrastive refinement rounds improve efficiency over the selected initial draft in every setting while preserving or improving Pass@1. These results demonstrate the effectiveness of relational execution feedback as a lightweight signal for test-time code optimization.
Making Language Models Better Tool Learners with Execution Feedback
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);ZJU-Ant Group Joint Research Center for Knowledge Graphs, Zhejiang University(浙江大学-蚂蚁集团知识图谱联合研究中心);ZJU-Hangzhou Global Scientific and Technological Innovation Center, Zhejiang University(浙江大学杭州国际科技创新中心);Alibaba Group(阿里巴巴集团)
SciWalker: Synthesizing Scientific Coding Problems with Operator Graphs and Execution Feedback
The Hong Kong University of Science and Technology(香港科技大学);Shanghai AI Laboratory(上海人工智能实验室);Tsinghua University(清华大学);Nanyang Technological University(南洋理工大学)
OpenCodeInterpreter: Integrating Code Generation with Execution and Refinement
Multimodal Art Projection Research Community(多模态艺术投影研究共同体);University of Waterloo(滑铁卢大学);Allen Institute for Artificial Intelligence(艾伦人工智能研究所);HKUST(香港科技大学);IN.AI Research(IN.AI研究机构)
A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
Griffith University (Australia)(格里菲斯大学);VinUniversity (Vietnam)(文大学);Humboldt-Universitat zu Berlin (Germany)(柏林洪堡大学);The University of Queensland, Australia (2025)(昆士兰大学)
ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL
Soochow University(苏州大学);Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ)(广东省人工智能与数字经济发展实验室);South China University of Technology(华南理工大学);University of Chinese Academy of Sciences(中国科学院大学);Alibaba DAMO Academy(阿里巴巴达摩院);International Digital Economy Academy (IDEA), China(国际数字经济学院(IDEA),中国)
Write, Execute, Refine: From Skill Follower to Skill Optimizer via Reinforcement Learning from Execution Feedback
Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));The Chinese University of Hong Kong(香港中文大学);Huawei Technologies Co., Ltd.(华为技术有限公司);Harbin Institute of Technology(哈尔滨工业大学)
ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback
National Engineering Research Center for Software Engineering, Peking University(软件工程国家工程研究中心,北京大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)
School of Artificial Intelligence, Jilin University(吉林大学人工智能学院);School of Artificial Intelligence, Shanghai Jiao Tong University(上海交通大学人工智能学院);King Abdullah University of Science and Technology(阿卜杜拉国王科技大学)
MemScope: Evolving Agent Memory Architectures through Localized Code Repair
State Key Laboratory of AI Safety(人工智能安全国家重点实验室);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Meituan(美团)