Skip to main content
QUICK REVIEW

[论文解读] Revisiting Sentiment Analysis for Software Engineering in the Era of Large Language Models

Ting Zhang, Ivana Clairine Irsan|arXiv (Cornell University)|Oct 17, 2023
Topic ModelingComputer Science被引用 3
一句话总结

本文研究了在软件工程情感分析(SA4SE)中使用大语言模型(bLLMs)进行少样本和零样本提示工程的有效性,结果表明在低资源、类别不平衡的数据集上,bLLMs优于微调后的小型语言模型(sLLMs),而当训练数据充足且平衡时,sLLMs仍表现更优。本研究在五个基准数据集上评估了三种开源bLLMs,证实bLLMs在低数据SA4SE场景下是一种可行的替代方案。

ABSTRACT

Software development involves collaborative interactions where stakeholders express opinions across various platforms. Recognizing the sentiments conveyed in these interactions is crucial for the effective development and ongoing maintenance of software systems. For software products, analyzing the sentiment of user feedback, e.g., reviews, comments, and forum posts can provide valuable insights into user satisfaction and areas for improvement. This can guide the development of future updates and features. However, accurately identifying sentiments in software engineering datasets remains challenging. This study investigates bigger large language models (bLLMs) in addressing the labeled data shortage that hampers fine-tuned smaller large language models (sLLMs) in software engineering tasks. We conduct a comprehensive empirical study using five established datasets to assess three open-source bLLMs in zero-shot and few-shot scenarios. Additionally, we compare them with fine-tuned sLLMs, using sLLMs to learn contextual embeddings of text from software platforms. Our experimental findings demonstrate that bLLMs exhibit state-of-the-art performance on datasets marked by limited training data and imbalanced distributions. bLLMs can also achieve excellent performance under a zero-shot setting. However, when ample training data is available or the dataset exhibits a more balanced distribution, fine-tuned sLLMs can still achieve superior results.

研究动机与目标

  • 评估在低资源和类别不平衡数据条件下,大语言模型(bLLMs)在软件工程情感分析(SA4SE)中的有效性。
  • 比较在SA4SE任务中,bLLMs的少样本和零样本提示工程与微调后的sLLMs的性能表现。
  • 探究bLLMs在不同SE数据集上的泛化能力,尤其是在跨平台设置下的表现。
  • 确定在何种数据条件下(如数据稀缺性、类别分布)bLLMs在SA4SE中优于sLLMs。
  • 为bLLMs的上下文学习提供实证证据,证明其作为sLLMs微调的可行替代方案,尤其在数据稀缺场景下。

提出的方法

  • 本研究在五个基准SE数据集上,采用三种开源bLLMs,分别以零样本和少样本提示配置进行情感分类。
  • 在零样本设置中,模型通过自然语言指令提示,描述情感分类任务,不提供任何标注示例。
  • 在少样本设置中,提示中包含少量标注示例(即少样本示范),以引导分类任务。
  • bLLMs的性能与在相同训练数据上通过标准微调流程微调的sLLMs进行对比。
  • 评估采用标准指标,如宏F1和微F1,在不同数据稀缺性和类别不平衡程度的数据集上进行。
  • 本研究开展消融实验,分析提示设计、少样本示例选择以及数据集特征对模型性能的影响。

实验结果

研究问题

  • RQ1在无微调的情况下,大语言模型(bLLMs)是否能在低资源设置下实现软件工程情感分析(SA4SE)的最先进性能?
  • RQ2当训练数据有限或类别不平衡时,bLLMs与微调后的sLLMs相比,性能表现如何?
  • RQ3通过提示工程实现的上下文学习在不同SE数据集和平台之间是否具有良好的泛化能力?
  • RQ4在何种数据条件下(如数据稀缺性、类别不平衡)bLLMs在SA4SE任务中优于sLLMs?
  • RQ5在标注数据稀缺的情况下,bLLMs的零样本提示能否作为sLLMs微调的可行替代方案?

主要发现

  • 在训练数据有限且类别分布不平衡的数据集上,bLLMs实现了最先进性能,优于微调后的sLLMs。
  • 在零样本场景下,bLLMs展现出强大的泛化能力,无需任何标注示例即可达到高性能,表明上下文学习的有效性。
  • 当存在充足且平衡的训练数据时,微调后的sLLMs仍优于提示工程的bLLMs。
  • bLLMs的性能对提示设计和少样本示例选择敏感,最优示例可显著提升结果。
  • bLLMs在跨平台泛化方面优于sLLMs,表明其在多样化SE文本来源中的鲁棒性。
  • 本研究证实,bLLMs的上下文学习是一种可行且数据高效的替代方案,尤其在低数据场景下可替代sLLMs的微调。

更好的研究,从现在开始

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

无需绑定信用卡

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