跳到正文
arXiv (AI + Vision + Imaging)· Zimu Wang, Yuling Shi, Mengfan Li, Zijun Liu, Jie M. Zhang, Chengcheng Wan, Xiaodong Gu·· 8 天前AI 评分18

EffiSkill:通过Agent技能挖掘实现代码效率自动优化

Automated Code Efficiency Optimization via Agent Skill Mining

AI 导读

EffiSkill是一个两阶段框架,将反复出现的慢速到快速代码变换建模为Operator Skills持久卡片,记录变换意图、适用性、步骤、预期效果与风险。Stage I从慢/快程序对中蒸馏冻结的语言专属技能库,Stage II诊断新程序并检索技能、组合方案,在无候选执行反馈下生成最多8个候选,经公开测试过滤排序、私有测试判定正确性与加速比。

正文 · 原文

arXiv:2603.27850v2 Announce Type: replace-cross Abstract: Code efficiency is a fundamental aspect of software quality, yet how to use large language models (LLMs) to optimize correct programs remains challenging. Prior approaches rely on one-shot rewriting, retrieved exemplars or instructions, fine-tuning, or candidate search. In this paper, we present EffiSkill, a two-stage framework that models recurring slow-to-fast transformations as Operator Skills: persistent cards that record a transformation's intent, applicability, procedure, expected effect, and risks. Stage I distills frozen, language-specific skill libraries from slow/fast program pairs. Stage II diagnoses a new program, retrieves relevant skills, composes alternative plans, and generates up to eight candidates. These steps finish without candidate-execution feedback; public tests then filter and rank candidates, and held-out private tests determine reported correctness and speedup. Across 623 EffiBench-X tasks per language, two backbones, and separate Python and C++ evaluations, EffiSkill achieves the highest observed OPT@1 and OPT@8 among the compared methods in all four settings. Its OPT@8 margins over the strongest baselines range from 4.98 to 12.52 percentage points. These results support broader successful optimization coverage for the complete skill-guided pipeline under a shared output budget.

来源:arXiv (AI + Vision + Imaging) · arxiv.org