FRCS-LLM: A Framework for Refining Code Summarization in Large Language Models via Pre-trained Models

Yuqi Wang, Chunli Xie, Wenbin Zhang, Xin Qiu · 2025

To enhance software development and maintenance efficiency, code summarization has become a research hotspot. In recent years, due to the generation capabilities of Large Language Models (LLMs), researchers have begun to propose LLMs into code-related tasks. Existing code summarization techniques are insufficient due to their limited ability to deeply comprehend code structure and semantics, frequently yielding verbose or imprecise summaries. To address these challenges, we present FRCS-LLM, a novel code summarization framework that integrates LLMs with pre-trained models to enhance performance and accuracy. Our framework first leverages simulated expert prompts to direct LLMs in generating initial code descriptions, thereby maximizing their linguistic capabilities while minimizing redundancy. We then employ pre-trained models to perform deep fusion of code snippets and functionality descriptions through multimodal joint modeling, extracting both syntactic and semantic information to generate precise, natural, and concise summaries. We evaluate FRCS-LLM on public Java and Python datasets, compared to the strongest baseline, achieving improvements of 2.4%, 3.5%, and 2.0% in BLEU, METEOR, and ROUGE_L metrics on the Java dataset, and improvements of 4.1%, 6.8%, and 3.6% on the Python dataset. Our framework also achieves superior performance in relevance, conciseness, and naturalness, producing summaries that effectively capture code semantics while maintaining completeness, fluency, and grammatical accuracy.

Read the paper · More papers on PaperTik