CoChat

Reassessing automatic evaluation metrics for code summarization tasks

Open access
Roy, Devjeet, Fakhoury, Sarah, Arnaoudova, Venera · 2021 · Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering

The DOI matches its Crossref record; 54 of the 54 references it cites were found in a registry or an index.

Abstract

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.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1145/3468264.3468588

Cites

54 of 54 references verified0 citation errors · 0 not checkable

Statistics

Figures

Figure 1 Demographics for Human Annotators.
Figure 1 Demographics for Human Annotators.CC-BY · From the PDF
Figure 2 Pairwise BLEU vs DA Scores.
Figure 2 Pairwise BLEU vs DA Scores.CC-BY · From the PDF
Figure 3 Pairwise METEOR vs DA Scores.
Figure 3 Pairwise METEOR vs DA Scores.CC-BY · From the PDF
Figure 4 Sentence-level comparisons: BERTScore vs DA.
Figure 4 Sentence-level comparisons: BERTScore vs DA.CC-BY · From the PDF

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 54 references

Research works printed but not linked: 13

  1. Miltiadis Allamanis , Hao Peng , and Charles Sutton . 2016 . A convolutional attention network for extreme summarization of source code . In International Conference on Machine Learning. 2091–2100 . Miltiadis Allamanis, Hao Peng, and Charles Sutton. 2016. A convolutional attention network for extreme summarization of source code. In International Conference on Machine Learning. 2091–2100.
  2. Uri Alon Shaked Brody Omer Levy and Eran Yahav. 2018. code2seq: Generating sequences from structured representations of code. arXiv preprint arXiv:1808.01400. Uri Alon Shaked Brody Omer Levy and Eran Yahav. 2018. code2seq: Generating sequences from structured representations of code. arXiv preprint arXiv:1808.01400. · arXiv
  3. Minghao Chen and Xiaojun Wan . 2019 . Neural Comment Generation for Source Code with Auxiliary Code Classification Task. In 2019 26th Asia-Pacific Software Engineering Conference (APSEC). 522–529 . Minghao Chen and Xiaojun Wan. 2019. Neural Comment Generation for Source Code with Auxiliary Code Classification Task. In 2019 26th Asia-Pacific Software Engineering Conference (APSEC). 522–529.
  4. Patrick Fernandes , Miltiadis Allamanis , and Marc Brockschmidt . 2018 . Structured Neural Summarization. In International Conference on Learning Representations. Patrick Fernandes, Miltiadis Allamanis, and Marc Brockschmidt. 2018. Structured Neural Summarization. In International Conference on Learning Representations.
  5. Tjalling Haije , Bachelor Opleiding Kunstmatige Intelligentie , E Gavves , and H Heuer . 2016 . Automatic comment generation using a neural translation model . Inf. Softw. Technol. , 55 , 3 (2016), 258 – 268 . Tjalling Haije, Bachelor Opleiding Kunstmatige Intelligentie, E Gavves, and H Heuer. 2016. Automatic comment generation using a neural translation model. Inf. Softw. Technol., 55, 3 (2016), 258–268.
  6. Yuding Liang and Kenny Zhu . 2018 . Automatic generation of text descriptive comments for code blocks . In Proceedings of the AAAI Conference on Artificial Intelligence. 32 . Yuding Liang and Kenny Zhu. 2018. Automatic generation of text descriptive comments for code blocks. In Proceedings of the AAAI Conference on Artificial Intelligence. 32.
  7. Chin-Yew Lin . 2004 . Rouge: A package for automatic evaluation of summaries. In Text summarization branches out. 74–81. Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out. 74–81.
  8. L. Moreno , A. Marcus , L. Pollock , and K. Vijay-Shanker . 2013. JSummarizer: An automatic generator of natural language summaries for Java classes . In International Conference on Program Comprehension (ICPC). 230–232 . L. Moreno, A. Marcus, L. Pollock, and K. Vijay-Shanker. 2013. JSummarizer: An automatic generator of natural language summaries for Java classes. In International Conference on Program Comprehension (ICPC). 230–232.
  9. Stefan Riezler and John T Maxwell III. 2005 . On some pitfalls in automatic evaluation and significance testing for MT . In Proceedings of the ACL workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization. 57–64 . Stefan Riezler and John T Maxwell III. 2005. On some pitfalls in automatic evaluation and significance testing for MT. In Proceedings of the ACL workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization. 57–64.
  10. Peter Stanchev , Weiyue Wang , and Hermann Ney . 2020 . Towards a Better Evaluation of Metrics for Machine Translation . In Proceedings of the Fifth Conference on Machine Translation. Association for Computational Linguistics, Online. 928–933 . Peter Stanchev, Weiyue Wang, and Hermann Ney. 2020. Towards a Better Evaluation of Metrics for Machine Translation. In Proceedings of the Fifth Conference on Machine Translation. Association for Computational Linguistics, Online. 928–933.
  11. Akiyoshi Takahashi , Hiromitsu Shiina , and Nobuyuki Kobayashi . 2019 . Automatic Generation of Program Comments Based on Problem Statements for Computational Thinking. In 2019 8th International Congress on Advanced Applied Informatics (IIAI-AAI). 629–634 . Akiyoshi Takahashi, Hiromitsu Shiina, and Nobuyuki Kobayashi. 2019. Automatic Generation of Program Comments Based on Problem Statements for Computational Thinking. In 2019 8th International Congress on Advanced Applied Informatics (IIAI-AAI). 629–634.
  12. Bolin Wei Ge Li Xin Xia Zhiyi Fu and Zhi Jin. 2019. Code generation as a dual task of code summarization. In Advances in Neural Information Processing Systems. 6563–6573. Bolin Wei Ge Li Xin Xia Zhiyi Fu and Zhi Jin. 2019. Code generation as a dual task of code summarization. In Advances in Neural Information Processing Systems. 6563–6573.
  13. 10.5555/271581.271584 · doi:10.5555/271581.271584

Cited by

See all 119

Metadata

Authors
Roy, D., Fakhoury, S., & Arnaoudova, V.
Affiliations
Washington State University (US)
Venue
Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
Publisher
ACM
Published
2021-08-18
Pages
1105-1116
OpenAlex
W3195727321
Cited by
106
References
52
Citations by year
2026: 18 · 2025: 28 · 2024: 31 · 2023: 19 · 2022: 10
FWCI
12.44
Type
conference paper
Language
en
Open access
Locations
ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) (publishedVersion, cc-by)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
source code summarization, automatic evaluation metrics, human evaluation, BLEU, meteors, ROUGE, chrF, measurement reliability

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Reassessing automatic evaluation metrics for code summarization tasks. https://app.cochat.ai/papers/10.1145/3468264.3468588
The paper
Roy, D., Fakhoury, S., & Arnaoudova, V. (2021). Reassessing automatic evaluation metrics for code summarization tasks. Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. https://doi.org/10.1145/3468264.3468588

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.