EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Can Large Language Models Serve as Evaluators for Code Summarization?

Yang Wu, Yao Wan, Zhaoyang Chu, Wenting Zhao, Ye Liu, Hongyu Zhang, Xuanhua Shi, Hai Jin, Philip S. Yu

IEEE Transactions on Software Engineering · 2025-12 · 51 (12) · 3205-3217

DOI: 10.1109/tse.2025.3595283 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IEEE Transactions on Software Engineering, 2025-12. Verfasst von Yang Wu und 8 weiteren Autor:innen. Die Arbeit wurde bisher 17-mal zitiert (Crossref) und nennt 72 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Major Program (JD) of Hubei Province.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Code summarization facilitates program comprehension and software maintenance by converting code snippets into natural-language descriptions. Over the years, numerous methods have been developed for this task, but a key challenge remains: effectively evaluating the quality of generated summaries. While human evaluation is effective for assessing code summary quality, it is labor-intensive and difficult to scale. Commonly used automatic metrics, such as BLEU, ROUGE-L, METEOR, and BERTScore, often fail to align closely with human judgments. In this paper, we explore the potential of Large Language Models (LLMs) for evaluating code summarization. We propose CodeRPE (Role-Player for Code Summarization Evaluation), a novel method that leverages role-player prompting to assess the quality of generated summaries. Specifically, we prompt LLM-based evaluators to take on diverse roles, such as code reviewer, code author, code editor, and system analyst. Each role evaluates the quality of code summaries across key dimensions, including coherence, consistency, fluency, and relevance. We further explore the robustness of LLMs as evaluators by employing various prompting strategies, including chain-of-thought reasoning, in-context learning, and tailored rating form designs. The results demonstrate that LLMs serve as effective evaluators for code summarization. Notably, our LLM-based evaluator, CodeRPE, achieves an 80.18% Spearman correlation with human evaluations, outperforming the existing BERTScore metric by 10.39%.

Förderung

  • Major Program (JD) of Hubei Province

Zitieren

APA

Wu, Y., Wan, Y., Chu, Z., Zhao, W., Liu, Y., Zhang, H., Shi, X., Jin, H., & Yu, P. S. (2025). Can Large Language Models Serve as Evaluators for Code Summarization?. IEEE Transactions on Software Engineering, 51(12), 3205-3217. https://doi.org/10.1109/tse.2025.3595283

Vancouver

Wu Y, Wan Y, Chu Z, Zhao W, Liu Y, Zhang H, et al. Can Large Language Models Serve as Evaluators for Code Summarization?. IEEE Transactions on Software Engineering. 2025;51(12):3205-3217. doi:10.1109/tse.2025.3595283

BibTeX
@article{Wu2025,
  author = {Wu, Yang and Wan, Yao and Chu, Zhaoyang and Zhao, Wenting and Liu, Ye and Zhang, Hongyu and Shi, Xuanhua and Jin, Hai and Yu, Philip S.},
  title = {Can Large Language Models Serve as Evaluators for Code Summarization?},
  journal = {IEEE Transactions on Software Engineering},
  year = {2025},
  volume = {51},
  number = {12},
  pages = {3205--3217},
  doi = {10.1109/tse.2025.3595283}
}
Kostenlos starten →