Enhanced Prompting Framework for Code Summarization with Large Language Models
Proceedings of the ACM on Software Engineering · 22.06.2025 · 2 (ISSTA) · 1630-1653
DOI: 10.1145/3728949 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 22.06.2025. Verfasst von Minying Fang und 5 weiteren Autor:innen. Die Arbeit wurde bisher 9-mal zitiert (Crossref) und nennt 68 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).
Abstract (Originalsprache)
Code summarization is essential for enhancing the efficiency of software development, enabling developers to swiftly comprehend and maintain software projects. Recent efforts utilizing large language models for generating precise code summaries have shown promising performance, primarily due to their advanced generative capabilities. LLMs that employ continuous prompting techniques can explore a broader problem space, potentially unlocking greater capabilities. However, they also present specific challenges, particularly in aligning with task-specific situations—a strength of discrete prompts. Additionally, the inherent differences between programming languages and natural languages can complicate comprehension for LLMs, impacting the accuracy and relevance of the summaries in complex programming scenarios. These challenges may result in outputs that do not align with actual task needs, underscoring the necessity for further research to enhance the effectiveness of LLMs in code summarization. To overcome these limitations, we combine the strengths of the two approaches described above and introduce EP4CS—an Enhanced Prompting framework for Code Summarization with Large Language Models. Firstly, we design Mapper, which undergoes pre-training on pairs and facilitates the optimization and updating of prompt vectors based on the outputs of LLMs. Additionally, we develop a Struct-Agent that enables LLMs to more accurately interpret the complex code by in-depth analysis of the programming language’s syntax and structure. Experimental results indicate that, compared to existing baseline methods, our enhanced prompting learning framework significantly improves performance while maintaining the same parameter scale. Specifically, when evaluated on Java using StarCoderBase 1 B , EP4CS achieved score improvements of 6.59% on BLEU, 7.06% on METEOR, and 4.43% on ROUGE-L, while also demonstrating strong robustness. And it’s closer to real-world scenarios in terms of semantic metrics SentenceBERT. The results from the human evaluation and case studies show that EP4CS surpasses the baseline methods, producing higher-quality and more relevant summaries.
Zitieren
APA
Fang, M., Yuan, X., Li, Y., Li, H., Fang, C., & Du, J. (2025). Enhanced Prompting Framework for Code Summarization with Large Language Models. Proceedings of the ACM on Software Engineering, 2(ISSTA), 1630-1653. https://doi.org/10.1145/3728949
Vancouver
Fang M, Yuan X, Li Y, Li H, Fang C, Du J. Enhanced Prompting Framework for Code Summarization with Large Language Models. Proceedings of the ACM on Software Engineering. 2025;2(ISSTA):1630-1653. doi:10.1145/3728949
BibTeX
@article{Fang2025,
author = {Fang, Minying and Yuan, Xing and Li, Yuying and Li, Haojie and Fang, Chunrong and Du, Junwei},
title = {Enhanced Prompting Framework for Code Summarization with Large Language Models},
journal = {Proceedings of the ACM on Software Engineering},
year = {2025},
volume = {2},
number = {ISSTA},
pages = {1630--1653},
doi = {10.1145/3728949}
}
EUVIMED