Skip to main content
QUICK REVIEW

[论文解读] Generative Software Engineering

Yuan Huang, Yinan Chen|arXiv (Cornell University)|Mar 5, 2024
Advanced Software Engineering Methodologies被引用 4
一句话总结

本文针对由预训练模型和大型语言模型(LLMs)驱动的软件工程生成任务,开展了一项系统性文献综述,对软件开发生命周期中的各类任务进行了分类。文章分析了模型架构、数据集、评估指标,并识别出关键挑战与研究空白,为基于LLM的软件工程未来研究提供了全面路线图。

ABSTRACT

The rapid development of deep learning techniques, improved computational power, and the availability of vast training data have led to significant advancements in pre-trained models and large language models (LLMs). Pre-trained models based on architectures such as BERT and Transformer, as well as LLMs like ChatGPT, have demonstrated remarkable language capabilities and found applications in Software engineering. Software engineering tasks can be divided into many categories, among which generative tasks are the most concern by researchers, where pre-trained models and LLMs possess powerful language representation and contextual awareness capabilities, enabling them to leverage diverse training data and adapt to generative tasks through fine-tuning, transfer learning, and prompt engineering. These advantages make them effective tools in generative tasks and have demonstrated excellent performance. In this paper, we present a comprehensive literature review of generative tasks in SE using pre-trained models and LLMs. We accurately categorize SE generative tasks based on software engineering methodologies and summarize the advanced pre-trained models and LLMs involved, as well as the datasets and evaluation metrics used. Additionally, we identify key strengths, weaknesses, and gaps in existing approaches, and propose potential research directions. This review aims to provide researchers and practitioners with an in-depth analysis and guidance on the application of pre-trained models and LLMs in generative tasks within SE.

研究动机与目标

  • 为填补预训练模型与LLMs在软件工程中结合的系统性文献综述的空白。
  • 对软件开发生命周期中各类生成性软件工程任务进行分类。
  • 分析生成性SE任务中使用的代表性模型、数据集和评估指标。
  • 识别当前方法中的局限性、挑战与研究空白。
  • 为LLM在软件工程中的未来研究提出可操作的方向。

提出的方法

  • 开展了一项聚焦于软件工程中生成任务的系统性文献综述,研究对象为预训练模型与LLMs。
  • 将软件工程任务划分为七个子任务:需求生成、代码生成、代码摘要、测试生成、补丁生成、代码优化和代码翻译。
  • 对关键预训练模型(如BERT、GPT、XLNet)和LLMs(如ChatGPT、GPT-4)在这些任务中的表现进行了回顾与比较。
  • 分析现有研究中使用的数据集和评估指标,以评估模型性能。
  • 综合分析了在生成性SE应用中微调、提示工程和迁移学习策略的实践。
  • 识别出重复出现的挑战,如模型不稳定、缺乏针对代码的微调,以及对以代码为中心的LLMs评估不足。

实验结果

研究问题

  • RQ1在软件工程背景下,预训练模型如何演变为大型语言模型(LLMs)?
  • RQ2软件工程中的生成性任务有哪些不同类型,它们在软件开发生命周期中如何分布?
  • RQ3哪些预训练模型和LLMs在不同类型的生成性软件工程任务中表现最有效?
  • RQ4当前研究中常用的数据集和评估指标是什么,它们如何影响模型评估?
  • RQ5在将LLMs应用于生成性软件工程任务时,存在哪些关键局限性和开放性挑战?

主要发现

  • 当使用任务特定提示时,GPT-4等LLMs在代码摘要和从C#到Java的代码翻译任务中优于基线模型。
  • 基础提示在代码生成和跨语言翻译任务中(尤其是从Java到C#)常导致性能不佳。
  • 上下文学习和提示工程显著提升了LLM输出质量,用户研究显示迭代提示能增强响应的相关性。
  • 微调和提示工程对于将通用LLM适配到特定软件工程任务至关重要。
  • 目前对以代码为中心的LLMs(如Codex)缺乏详细评估,多数研究仍依赖通用模型(如ChatGPT)。
  • 当前研究显示LLMs在某些任务中存在一致性和可靠性不足的问题,表明亟需更完善的任务特定微调与评估框架。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。