A Prompt Learning Framework for Source Code Summarization
College of Computing and Data Science, Nanyang Technological University(南洋理工大学计算与数据科学学院);State Key Laboratory for Novel Software Technology, Nanjing University(南京大学计算机软件新技术国家重点实验室);Faculty of Data Science, City University of Macau(澳门城市大学数据科学学院)
(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.
Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization
Nanyang Technological University(南洋理工大学);Yangzhou University(扬州大学);Nanjing University(南京大学);Chongqing University of Posts and Telecommunications(重庆邮电大学);Nanjing Tech University(南京工业大学);Wuhan University(武汉大学);Peking University(北京大学)
Prompt Chaining or Stepwise Prompt? Refinement in Text Summarization
The Hong Kong Polytechnic University(香港理工大学);Generative AI Research Lab (GAIR)(生成式人工智能研究实验室(GAIR));Soochow University(苏州大学);Shanghai Jiao Tong University(上海交通大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)
Source Code Summarization in the Era of Large Language Models
College of Computing and Data Science, Nanyang Technological University Singapore(计算与数据科学学院,新加坡南洋理工大学);State Key Laboratory for Novel Software Technology, Nanjing University(新型软件技术国家重点实验室,南京大学);School of Computer Science and Engineering, University of New South Wales(计算机科学与工程学院,新南威尔士大学);School of Big Data and Software Engineering, Chongqing University(大数据与软件工程学院,重庆大学)
Prompt-based Pseudo-labeling Strategy for Sample-Efficient Semi-Supervised Extractive Summarization
David R. Cheriton School of Computer Science(大卫·R·切里顿计算机科学学院);University of Waterloo(滑铁卢大学);ServiceNow Research(ServiceNow研究院);University of British Columbia(不列颠哥伦比亚大学)
An Evaluation of Large Language Models on Text Summarization Tasks Using Prompt Engineering Techniques
Information Systems Department, Faculty of Computers and Information, Assiut University(计算机与信息学院信息系统系,阿西乌特大学);Information Systems Department, Faculty of Computers and Artificial Intelligence, Beni-Suef University(计算机与人工智能学院信息系统系,班伊-苏夫大学)
Context-Aware Pseudo-Label Scoring for Zero-Shot Video Summarization
Nanyang Technological University(南洋理工大学);Guilin University of Electronic Technology(桂林电子科技大学);Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences(深圳先进技术研究院,中国科学院)
ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization
State Key Laboratory for Novel Software Technology, Nanjing University(南京大学现代软件技术国家重点实验室);Software Institute, Nanjing University(南京大学软件学院);College of Computing and Data Science, Nanyang Technological University(南洋理工大学计算与数据科学学院);Tencent Inc.(腾讯公司)