arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.21537cs.LG
收藏

切除分数:用外科精确度评估编辑

Excision Score: Evaluating Edits with Surgical Precision

JetBrains Research(JetBrains研究)

Nikolai Gruzinov, Ksenia Sycheva, Earl T. Barr, Alex Bezzubov

AI总结:

提出切除分数(ES)作为评估编辑的新型静态度量,通过移除共享内容以提高修订相似性评估的准确性。

摘要:

许多任务都围绕编辑文档展开,无论是代码还是文本。我们将修订相似性问题统一为一系列机器学习评估问题,其目标是评估对现有文档的修订。我们观察到修订通常只改变现有文档的一小部分,因此现有文档及其立即修订共享大部分内容。我们提出了五个适用于修订相似性度量的标准,旨在使这些度量与人类判断一致。我们证明了流行的成对度量,如BLEU,未能满足这些标准,因为它们的分数受共享内容主导。它们报告两个修订之间高度相似,而人类会将其视为非常不同。这是我们解决的根本性缺陷。我们提出了一种新的静态度量,切除分数(ES),它通过计算最长公共子序列(LCS)来移除现有文档与地面真实值和预测修订之间共享的内容,然后仅比较剩余的差异区域。这类似于外科医生创建无菌区域以专注于工作区域。我们使用近似方法将标准的三次方LCS计算加速到二次方。在代码编辑评估中,静态度量常被用作通过测试的廉价代理,我们证明ES超越了现有度量。当与HumanEvalFix上的测试执行对齐时,ES在与SARI的对比中,Pearson相关性提高了12%,并且在标准度量如BLEU上提高了超过21%。关键标准是共享上下文的不变性;当我们通过增加共享上下文扰动HumanEvalFix时,ES相对于SARI的改进增加到20%,并且在标准度量上超过21%。ES还处理了其他其他度量无法处理的边缘情况,例如正确对齐移动的代码块,并适当奖励匹配的插入或删除。

英文摘要:

Many tasks revolve around editing a document, whether code or text. We formulate the revision similarity problem to unify a wide range of machine learning evaluation problems whose goal is to assess a revision to an existing document. We observe that revisions usually change only a small portion of an existing document, so the existing document and its immediate revisions share a majority of their content. We formulate five adequacy criteria for revision similarity measures, designed to align them with human judgement. We show that popular pairwise measures, like BLEU, fail to meet these criteria, because their scores are dominated by the shared content. They report high similarity between two revisions when humans would assess them as quite different. This is a fundamental flaw we address. We propose a novel static measure, Excision Score (ES), which computes longest common subsequence (LCS) to remove content shared by an existing document with the ground truth and predicted revisions, before comparing only the remaining divergent regions. This is analogous to a surgeon creating a sterile field to focus on the work area. We use approximation to speed the standard cubic LCS computation to quadratic. In code-editing evaluation, where static measures are often used as a cheap proxy for passing tests, we demonstrate that ES surpasses existing measures. When aligned with test execution on HumanEvalFix, ES improves over its nearest competitor, SARI, by 12% Pearson correlation and by >21% over standard measures like BLEU. The key criterion is invariance to shared context; when we perturb HumanEvalFix with increased shared context, ES' improvement over SARI increases to 20% and >30% over standard measures. ES also handles other corner cases that other measures do not, such as correctly aligning moved code blocks, and appropriately rewarding matching insertions or deletions.

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

↑