arXiv:2608.04611cs.SEcs.AI2026-08

用排序策略控制代码删除,让模型在有限验证能力下更安全地清理冗余代码。

The Order Is the Guarantee: Verifier-Budgeted Code Deletion with Static-First Learned Proposals

  • 按优先级排序删除候选,静态优先+学习补充,控制风险
  • 在九次实验中提升9.5%验证通过率,多删6.7个任务
  • 适合关注代码可维护性与验证成本的工程团队

当前前沿编程模型在编程基准上已达到或超越人类水平,但基准成功并不等同于可维护代码。提示驱动的“氛围编码”是累积式的:新分支、保护逻辑和备选路径的增长快于过时逻辑的清除。本文研究当执行-验证能力有限时,如何有效删除代码。将冗余代码精简建模为提案调度问题:一个排序器对单语句删除候选进行排序,执行套件接受首个通过验证的候选,预算限制测试次数。核心发现是:候选顺序而非模型置信度,才是部署系统可调控的界面。DELSCOUT 实现两种调度策略。在具备代表性目标域验证的前提下,五次预算中三次用于确定性最短优先候选,两次用于互补性学习候选;在九次 MBPP 复现中,使用 0.5B、0.6B、8B 排序器,使验证通过的删除覆盖率提升 9.5%(多成功 6.7 个任务),且验证调用略少于静态基线。若无此类验证,相同排序器可能在分布偏移下性能下降,因此我们先完全评估确定性前缀,再追加学习候选;对于确定性验证器,该方式保证覆盖范围与字符减少量非递减,验证调用增加 4.8%-62.5%。在 MBPP+ 上,领域内优势消失,表明调度决定搜索效率,而测试套件定义“保持行为”的含义。最终实现可审计的分工:模型拓展可删除代码的搜索空间,排序限制错误提案的破坏力,执行保留所有删除操作的最终决策权。

原文摘要 · Abstract (English)

Frontier coding models now match or exceed strong human reference points on programming benchmarks, yet benchmark success does not imply maintainable software. Prompt-driven "vibe coding" is additive: new branches, guards, and fallbacks accumulate faster than obsolete logic is removed. We study the inverse problem-how an Al system should remove code when execution-verification capacity is finite. We formulate redundant-code reduction as proposal scheduling: a ranker orders single-statement deletion candidates, an execution suite accepts the first candidate that passes, and a budget bounds how many candidates may be tested. Our central observation is that candidate order, not model confidence, is the control surface a deployment can reason about. DELSCOUT instantiates two schedules. Given representative target-domain validation, a five-slot budget spends three slots on deterministic shortest-first candidates and two on complementary learned candidates; across nine MBPP replications with 0.5B, 0.6B, and 8B rankers this raises verified-deletion coverage by 9.5% relative (+6.7 accepted tasks) while consuming slightly fewer verifier calls than the matched static baseline. Without such validation the same rankers can lose coverage under shift, so we instead evaluate the complete static prefix first and append learned candidates only afterwards; for a deterministic verifier this makes coverage and character reduction non-decreasing by construction, at a measured 4.8-62.5% increase in verifier calls. MBPP+ then erases the in-domain advantage, showing that scheduling governs search while the test suite alone governs what "preserving behavior" means. The result is an auditable division of labor: models widen the search for removable code, order bounds the damage a mis-ranked proposal can do, and execution retains authority over every committed deletion.

代码生成代码清理验证约束调度策略

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。