mlsanityData to 7 Oct 2026

A Prompt Learning Framework for Source Code Summarization

arXiv 2312.16066 ↗First posted 26 Dec 2023cs.SE cs.AIcited by 9

Not on the map. Why?

Abstract (arXiv)

(Source) code summarization is the task of automatically generating natural language summaries (also called comments) for given code snippets. Recently, with the successful application of large language models (LLMs) in numerous fields, software engineering researchers have also attempted to adapt LLMs to solve code summarization tasks. The main adaptation schemes include instruction prompting, task-oriented (full-parameter) fine-tuning, and parameter-efficient fine-tuning (PEFT). However, instruction prompting involves designing crafted prompts and requires users to have professional domain knowledge, while task-oriented fine-tuning requires high training costs, and effective, tailored PEFT methods for code summarization are still lacking. This paper proposes an effective prompt learning framework for code summarization called PromptCS. It no longer requires users to rack their brains to design effective prompts. Instead, PromptCS trains a prompt agent that can generate continuous prompts to unleash the potential for LLMs in code summarization. Compared to the human-written discrete prompt, the continuous prompts are produced under the guidance of LLMs and are therefore easier to understand by LLMs. PromptCS is non-invasive to LLMs and freezes the parameters of LLMs when training the prompt agent, which can greatly reduce the requirements for training resources. Our comprehensive experimental results show that PromptCS significantly outperforms instruction prompting schemes (including zero-shot learning and few-shot learning) on all four widely used metrics, and is comparable to the task-oriented fine-tuning scheme. In some base LLMs, e.g., StarCoderBase-1B and -3B, PromptCS even outperforms the task-oriented fine-tuning scheme. More importantly, the training efficiency of PromptCS is faster than the task-oriented fine-tuning scheme, with a more pronounced advantage on larger LLMs.

Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 38 of its 72 references that are in the map. First posted on arXiv 26 Dec 2023.

Builds on

38 of 72 references.

References · 38

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2020Scaling Laws for Neural Language Modelscited by 6,411
  7. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  8. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
  9. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  10. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  11. 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
  12. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
26 more
  1. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  2. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  3. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  4. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  5. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  6. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  7. 2023Is ChatGPT a General-Purpose Natural Language Processing Task Solver?cited by 486
  8. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  9. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  10. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  11. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  12. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  13. 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
  14. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
  15. 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
  16. 2021On the Evaluation of Neural Code Summarizationcited by 47
  17. 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
  18. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  19. 2020Code Summarization with Structure-induced Transformercited by 29
  20. 2020Code to Comment "Translation": Data, Metrics, Baselining & Evaluationcited by 28
  21. 2023One Adapter for All Programming Languages? Adapter Tuning for Code Search and Summarizationcited by 16
  22. 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
  23. 2022Semantic Similarity Metrics for Evaluating Source Code Summarizationcited by 14
  24. 2021NASOA: Towards Faster Task-oriented Online Fine-tuning with a Zoo of Modelscited by 6
  25. 2023Exploring Large Language Models for Code Explanationcited by 6
  26. 2019A Convolutional Neural Network for Language-Agnostic Source Code Summarizationcited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 1; 2026: 2.

9 papers.