arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.15797cs.AIcs.SE
收藏

通过测试却缺失语义:基于规划的DataFrame代码生成中解释锁定的证据

Passing Tests, Missing Semantics: Evidence of Interpretive Lock-In in Plan-Based DataFrame Code Generation

University of California, Berkeley(加利福尼亚大学伯克利分校);Northeastern University(东北大学)

Jingjing Liu, Dishu Yang, Hongbo Qin, Hansong Zhang

AI总结:

该研究发现基于规划的DataFrame代码生成存在解释锁定问题,测试通过率提升但无方案匹配参考输出,PlanAudit引导修订效果有限,自生成测试成功未确立语义正确性。

摘要:

规划与修订旨在让生成的代码更贴合任务规范,但错误的解释可能会在规划、实现和测试中持续存在,我们将这种模式称为“解释锁定”。我们在源自TPC Benchmark DS的30个DataFrame任务上研究了这种风险,对比了Frozen One-Pass、测试引导修订和PlanAudit引导修订三种方法。测试通过率从22/30提升至29/30和30/30,但没有一个生成的解决方案匹配其存储的参考输出。评估器控制在57/57的案例中返回了预期结果,同引擎SQL重新执行复现了28/30的参考结果;这些任务中所有77次通过测试的运行仍未达成参考一致性。PlanAudit引导修订在3/30的任务上提升了代码分数,在11/30的任务上提升了测试覆盖率,但两项指标的中位数配对变化均为0。失败分析显示,测试存在遗漏需求、采用候选定义的模式、使用无区分性的夹具,或重复实现的错误逻辑等问题。对10个目标任务的新生成在测试通过的运行中产生了0/30的参考匹配和25/25的假阳性通过。这些发现属于诊断性而非因果性:各管道在反馈、基础、调用预算和编辑权限方面存在差异,且本研究使用了一个模型和每个合格任务的一次主要生成。由于未保留预裁决的人工标签,无法重建评分者间一致性,机制分析仍为探索性。总体而言,即使排除无法复现的参考结果,越来越成功的自生成测试也未确立语义正确性。

英文摘要:

Planning and revision are intended to bring generated code closer to the task specification. Yet a mistaken interpretation can persist across the plan, implementation, and tests - a pattern we call interpretive lock-in. We investigate this risk on 30 DataFrame tasks derived from TPC Benchmark DS, comparing Frozen One-Pass, Test-Guided Revision, and PlanAudit-Guided Revision. Test-pass counts rose from 22/30 to 29/30 and 30/30, yet no generated solution matched its stored reference output. Evaluator controls returned the expected outcome in 57/57 cases. Same-engine SQL re-execution reproduced 28/30 references; all 77 test-passing runs on these tasks still failed reference agreement. PlanAudit-Guided Revision improved code scores on 3/30 tasks and test coverage on 11/30, but the median paired change was zero for both measures. Failure analysis revealed tests that omitted requirements, adopted candidate-defined schemas, used nondiscriminating fixtures, or repeated the implementation's incorrect logic. Fresh generation on ten targeted tasks produced 0/30 reference matches and 25/25 false passes among test-passing runs. These findings are diagnostic rather than causal: the pipelines differ in feedback, grounding, call budgets, and editing permissions, and the study uses one model and one primary generation per eligible task. Because pre-adjudication human labels were not retained, inter-rater agreement cannot be reconstructed and the mechanism analyses remain exploratory. Overall, increasingly successful self-generated tests did not establish semantic correctness, even after excluding unreproduced references.

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

↑