Skip to main content
QUICK REVIEW

[论文解读] Towards Reliable Evaluation of Neural Program Repair with Natural Robustness Testing

Thanh Le-Cong, Dat Quoc Nguyen|arXiv (Cornell University)|Feb 19, 2024
Software Engineering ResearchComputer Science被引用 3
一句话总结

本文研究了用于评估神经程序修复(NPR)系统时所用的语义保持代码转换的自然性,发现19.3%的转换不自然,并在鲁棒性评估中引入了25.2%的误报率。本文提出一种基于交叉熵的自然性度量方法,可实现0.7的AUC,用于自动化评估;当在自然转换上评估时,NPR性能最高下降23.6%,凸显了对自然性感知的鲁棒性测试的必要性。

ABSTRACT

In this paper, we propose shifting the focus of robustness evaluation for Neural Program Repair (NPR) techniques toward naturally-occurring data transformations. To accomplish this, we first examine the naturalness of semantic-preserving transformations through a two-stage human study. This study includes (1) interviews with senior software developers to establish concrete criteria for evaluating the naturalness of these transformations, and (2) a survey involving 10 developers to assess the naturalness of 1,178 transformations, i.e., pairs of original and transformed programs, applied to 225 real-world bugs. Our findings show that only 60% of these transformations are deemed natural, while 20% are considered unnatural, with strong agreement among annotators. Moreover, the unnaturalness of these transformations significantly impacts both their applicability to benchmarks and the conclusions drawn from robustness testing. Next, we conduct natural robustness testing on NPR techniques to assess their true effectiveness against real-world data variations. Our experimental results reveal a substantial number of prediction changes in NPR techniques, leading to significant reductions in both plausible and correct patch rates when comparing performance on the original and transformed datasets. Additionally, we observe notable differences in performance improvements between NPR techniques, suggesting potential biases on NPR evaluation introduced by limited datasets. Finally, we propose an LLM-based metric to automate the assessment of transformation naturalness, ensuring the scalability of natural robustness testing.

研究动机与目标

  • 调查用于评估神经程序修复(NPR)系统的语义保持代码转换的自然性。
  • 评估不自然转换对NPR系统鲁棒性评估的影响,可能导致误报。
  • 通过专家开发人员的输入,建立代码转换自然性的具体标准。
  • 开发并验证一种用于代码转换的自动化自然性度量方法,以支持可靠的NPR评估。
  • 仅使用自然转换重新评估NPR系统的鲁棒性,揭示被低估的性能下降。

提出的方法

  • 开展两阶段人工研究:第一阶段,对资深开发人员进行访谈,以定义自然性标准;第二阶段,通过10名开发人员对1178对代码转换对的自然性进行评分。
  • 使用主题分析和开放式卡片分类法,从开发人员反馈中推导出结构化的自然性标准。
  • 提出一种新颖的自然性度量方法——相对自然性变化(RNC),通过计算原始代码与转换后代码之间交叉熵(CE)值的相对差异来实现。
  • 使用人工标注的自然性评分对RNC度量进行验证,在区分自然与不自然转换方面实现了0.7的AUC。
  • 仅使用自然转换对五个知名NPR系统进行重新评估,以测量其在现实世界中的鲁棒性。
  • 应用统计检验(如Mann-Whitney-Wilcoxon检验、Spearman等级相关系数)以评估显著性及评分者间的一致性(Cohen’s Kappa)。
Figure 1 . Overview of our study design
Figure 1 . Overview of our study design

实验结果

研究问题

  • RQ1在NPR评估中常用的语义保持代码转换有多自然?
  • RQ2不自然转换在NPR系统鲁棒性评估中导致误报的程度有多大?
  • RQ3当在自然转换与所有转换上评估时,NPR系统的性能下降程度如何?
  • RQ4能否从代码表示差异(如交叉熵)中有效提取可学习的自然性度量?
  • RQ5自然性感知评估对现有NPR工具感知鲁棒性的影响是什么?

主要发现

  • 近60%的语义保持转换被开发人员视为自然,且评分者间一致性较高,而约20%被视为不自然。
  • 不自然转换在五个知名NPR系统中导致鲁棒性评估的误报率高达25.2%。
  • 当仅在自然转换上评估时,NPR系统在正确补丁上的性能最高下降22.9%,在合理补丁上的性能最高下降23.6%。
  • 所提出的基于交叉熵差异的相对自然性变化(RNC)度量方法,在分类转换自然性方面实现了0.7的AUC。
  • 本研究发现,当前的鲁棒性评估方法可能因依赖不自然转换而高估了NPR的鲁棒性。
  • 研究结果表明,自然性感知评估对于准确评估NPR系统在现实世界中的有效性至关重要。
Figure 2 . An example of survey for user study
Figure 2 . An example of survey for user study

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。