arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.25834cs.AI
收藏

FrontierRefactor:面向多尺度性能导向的代码库重构基准

FrontierRefactor: Benchmarking Multi-Scale Performance-Oriented Codebase Refactoring

Evolvent AI;University of Southern California(南加州大学);Shanghai Jiaotong University(上海交通大学);National University of Singapore(新加坡国立大学);Hong Kong University of Science and Technology(香港科技大学)

Shijian Wang, Fanqing Meng, Jiajun Chen, Qiguang Chen, Linxin Song, Runhao Fu, Shuhang Zheng, Shuai Shao, Qizhe Xie, Jieyu Zhao, Mengkang Hu

AI总结:

该研究推出FrontierRefactor基准,针对代码库重构的多尺度性能问题,评估发现正确性与加速解耦,多轮执行-计时反馈可提升严格成功率。

摘要:

自主代码库重构要求编码智能体重构可运行软件,同时严格保留外部可观测行为,且优先考虑执行性能与计算效率,而非风格偏好。现有基准中,重构基准评估功能正确性却忽略运行时退化,而代码性能基准针对孤立的微内核,未考虑代码库规模的复杂性。我们发现,重构规模由可观测契约的范围决定,该契约是调用方可见的接口,用于固定行为不变量,同时释放私有实现以进行优化。基于这一见解,我们推出FrontierRefactor,这是一个包含60项合格工程任务的基准,涵盖从计算内核到完整代码库的四个尺度,涉及就地优化与跨语言重写。通过无参考级联协议对前沿编码智能体进行评估,共完成1080次执行运行,结果显示正确性与加速效果在很大程度上是解耦的:41.2%的提交满足功能等价性,但未能提供经验证的性能改进;19.3%出现性能退化;21.9%陷入测量噪声。重构范式揭示了正交的工程瓶颈:跨语言重写在通过功能检查后可从原生编译中获得加速,但智能体在契约保真度上存在困难,通过率从模块级的65.0%降至包级的32.6%;相反,就地优化以86.5%的比例可靠保留行为契约,但在未进行物理性能分析时很少能实现加速。轨迹分析显示,智能体会陷入未校准的微基准测试错觉,这一操作盲点可通过多轮执行-计时反馈直接解决,使严格成功率从16.0%提升至40.0%。

英文摘要:

Autonomous codebase refactoring requires coding agents to restructure working software while strictly preserving externally observable behavior and prioritizing execution performance and compute efficiency over stylistic preference. Existing benchmarks: refactoring benchmarks assess functional correctness while overlooking runtime regressions, whereas code performance benchmarks target isolated micro-kernels that ignore codebase-scale complexity. We observe that refactoring scale is governed by the scope of the observable contract, the caller-visible interface fixing behavioral invariants while freeing private implementations for optimization. Building on this insight, we introduce FrontierRefactor, a benchmark of 60 qualified engineering tasks spanning four scales, from computational kernels to full repositories, across in-place optimization and cross-language rewriting. Evaluating frontier coding agents through a reference-free cascaded protocol across 1,080 execution runs reveals that correctness and speedup are largely decoupled: 41.2% of submissions satisfy functional equivalence yet fail to deliver verified performance improvements, with 19.3% suffering performance regressions and 21.9% trapped in measurement noise. Refactoring paradigms reveal orthogonal engineering bottlenecks: while cross-language rewrites gain speedups from native compilation after passing functional checks, agents struggle with contract fidelity, with pass rates dropping from 65.0% on modules to 32.6% at package scale; conversely, in-place optimization reliably preserves behavioral contracts at 86.5% but rarely achieves acceleration without physical performance profiling. Trajectory analysis shows that agents fall victim to uncalibrated micro-benchmarking illusions, an operational blind spot that multi-turn execution-timing feedback directly resolves, raising strict success from 16.0% to 40.0%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑