Sketch-and-Verify: 通过程序草图实现推理时间扩展
Sketch-and-Verify: Structured Inference-Time Scaling via Program Sketching
AI总结:
本文提出SKETCHVERIFY方法,通过程序草图生成多样化候选方案,验证后选择最优,提升模型性能,同时探讨K与M的权衡关系。
摘要:
SKETCHVERIFY是一种在同一层级内的成本-性能策略,而非通用精度提升方法。问题:当从业者受限于小、廉价的代码模型(如Gemini 3.1 Flash Lite)时,如何利用少量额外测试时间计算?SKETCHVERIFY将搜索空间分解:LLM枚举K种不同的算法策略,为每个策略编写程序草图(部分程序含??空缺),并每次填充M次,生成K x M种结构多样化的候选方案,通过执行验证并利用指纹聚类选择。每个额外草图保证探索不同的算法;每个额外扁平样本可能重复现有样本。我们的核心证据是HumanEval+上三个Gemini层级(Lite、Flash、Pro)的成本-质量帕累托图,以及对19个Lite贪心失败问题的再分析。两个发现:(1)在同一层级内,草图生成在候选数量匹配时优于扁平采样。在困难子集上,Lite草图K=2,M=5恢复11/19(58%) vs. 扁平N=10恢复5/19(26%,+32pp);Lite草图K=10,M=10恢复15/19(79%) vs. 扁平N=100恢复10/19(53%,+26pp)。扁平无法在~3倍预算下缩小差距:扁平N=50仍输给草图K=2,M=5,差距+11pp。(2)跨层级,草图不替代升级。Pro贪心(89%)在通过率@1和美元成本上均优于Lite草图K=10,M=10(79%)。从业者规则:如果更强的层级可用,使用贪心;否则草图是经济有效的额外计算方式。我们通过Flash Lite扩展扫描表征K与M的权衡关系,报告HumanEval+在Flash和Pro上的饱和,展示该方法与语义投票线工作中的执行基于选择兼容。
英文摘要:
SKETCHVERIFY is a within-tier cost-performance policy, not a universal accuracy improvement. The operational question: a practitioner stuck with a small, cheap code model (here, Gemini 3.1 Flash Lite) for latency, deployment, or budget reasons -- how should they spend a small amount of extra test-time compute? SKETCHVERIFY factorizes the search space: the LLM enumerates K distinct algorithmic strategies, writes a program sketch for each (a partial program with ?? holes), and fills each sketch M times, producing K x M structurally diverse candidates that are verified by execution and selected by fingerprint clustering. Each extra sketch is guaranteed to explore a different algorithm; each extra flat sample likely duplicates an existing one. Our central evidence is a cost-quality Pareto plot on HumanEval+ across three Gemini tiers (Lite, Flash, Pro), and a reanalysis of the 19 problems where Lite greedy fails. Two findings: (1) Within-tier, sketching dominates flat sampling at matched candidate count. On the hard subset, Lite Sketch K=2, M=5 recovers 11/19 (58%) vs. flat N=10 at 5/19 (26%, +32pp); Lite Sketch K=10, M=10 recovers 15/19 (79%) vs. flat N=100 at 10/19 (53%, +26pp). Flat cannot close the gap even at ~3x the budget: flat N=50 still loses to Sketch K=2, M=5 by +11pp. (2) Cross-tier, sketching does not replace upgrading. Pro greedy (89%) dominates Lite Sketch K=10, M=10 (79%) on both pass@1 and dollar cost. Practitioner rule: if a stronger tier is available, use greedy on it; otherwise sketching is the cost-effective way to spend extra compute. We characterize the K-vs-M trade-off via a Flash Lite scaling sweep, report HumanEval+ saturation on Flash and Pro, and show the method composes cleanly with execution-based selection from the concurrent Semantic Voting line of work.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。