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

Pareto最优代码生成

Pareto Optimal Code Generation

University of Wisconsin-Madison(威斯康星大学麦迪逊分校)

Gabriel Orlanski, Nicholas Roberts, Aws Albarghouthi, Frederic Sala

AI总结:

通过分阶段验证,ORMs在代码生成中实现更高的吞吐量,但牺牲了部分准确性。

摘要:

生成后再排序是代码生成在测试时扩展(TTS)中占主导地位的范式,但通过采样和执行更多候选者来提高精度会使得全面验证成为主要的计算瓶颈。这导致了准确性和计算之间的内在权衡,尽管这对TTS很重要,但往往被忽视。具体来说,更快但更嘈杂的信号,如结果奖励模型(ORMs),通常被忽视为次优。我们将验证者选择框架为一个帕累托优化问题,并经验性地绘制了信号之间的准确性-吞吐量前沿,包括完整的测试套件、用于选择性执行的启发式方法和ORMs,在四个Python基准测试中。我们证明,当在生成后再排序流程中使用剪枝时,ORMs在优化帕累托曲线时最有效——这被称为分阶段验证,其中轻量级过滤器会移除明显错误的解决方案,包括具有小语法或字符级错误的候选者,然后进行昂贵的验证。我们的剪枝分析显示,消除错误但高排名的候选者(通常为字符级错误)可以防止在错误的token上浪费计算。我们发现,使用分阶段验证的ORMs将帕累托前沿向外移动,以11.64倍的吞吐量,相对于完整的测试套件验证,代价为8.26%的准确性损失。

英文摘要:

Generate-then-rank is the dominant test-time scaling (TTS) paradigm for code generation, but scaling accuracy by sampling and executing more candidates makes comprehensive verification a major computational bottleneck. This creates an inherent trade-off between accuracy and compute that, despite its importance to TTS, is often ignored. Specifically, faster but noisier signals, such as outcome reward models (ORMs), are dismissed as suboptimal. We frame verifier selection as a Pareto optimization problem and empirically map the accuracy-throughput frontier across signals, including the full test suite, heuristics for selective execution, and ORMs, across four Python benchmarks. We show that ORMs are most effective at optimizing the Pareto curve when pruning is used in the generate-then-rank pipeline--known as staged verification--where lightweight filters remove obviously incorrect solutions, including candidates with small syntactic or character-level bugs, before expensive verification. Our pruning analysis shows that eliminating incorrect yet highly ranked candidates (often character-level bugs) prevents wasted compute on incorrect tokens. We find that ORMs with staged verification shift the Pareto frontier outward, achieving 11.64x higher throughput at a cost of 8.26% accuracy relative to full test-suite verification.

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

↑