一句话:通过226名标注者实证发现,代码摘要自动指标的小幅提升不可靠,METEOR和chrF在特定区间更可信。
代码摘要研究常采用机器翻译中的 BLEU、METEOR、ROUGE 等自动指标,并常以微弱分数提升判断模型优劣,但这些指标与人类评价的一致性尚未在代码摘要任务中验证。本文批判性探讨自动指标在该任务中的适用性与解释,并开展涉及 226 名人类标注者的实证研究。结果表明:指标提升不足 2 分不保证摘要质量系统性改善,不能可靠代理人类评价;当方法间指标差距增大但仍不超过 5 分时,METEOR、chrF 等变得高度可靠,而语料级 BLEU 仍不可靠。作者据此给出使用自动指标区分模型性能的建议。
In recent years, research in the domain of source code summarization has adopted data-driven techniques pioneered in machine translation (MT). Automatic evaluation metrics such as BLEU, METEOR, and ROUGE, are fundamental to the evaluation of MT systems and have been adopted as proxies of human evaluation in the code summarization domain. However, the extent to which automatic metrics agree with the gold standard of human evaluation has not been evaluated on code summarization tasks. Despite this, marginal improvements in metric scores are often used to discriminate between the performance of competing summarization models. In this paper, we present a critical exploration of the applicability and interpretation of automatic metrics as evaluation techniques for code summarization tasks. We conduct an empirical study with 226 human annotators to assess the degree to which automatic metrics reflect human evaluation. Results indicate that metric improvements of less than 2 points do not guarantee systematic improvements in summarization quality, and are unreliable as proxies of human evaluation. When the difference between metric scores for two summarization approaches increases but remains within 5 points, some metrics such as METEOR and chrF become highly reliable proxies, whereas others, such as corpus BLEU, remain unreliable. Based on these findings, we make several recommendations for the use of automatic metrics to discriminate model performance in code summarization.