arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.10845cs.SE
收藏

软件工程文本中的情感分类:预训练Transformer语言模型的比较分析

Emotion Classification In Software Engineering Texts: A Comparative Analysis of Pre-trained Transformers Language Models

Mia Mohammad Imran

AI总结:

本研究比较六种预训练Transformer模型在GitHub和Stack Overflow数据集上的情感分类性能,发现通用模型优于专用模型,并引入极性特征进一步提升F1分数。

摘要:

软件工程文本中的情感识别对于理解开发者的表达和改善协作至关重要。本文对两个来自GitHub和Stack Overflow的基准数据集上的细粒度情感分类任务,对最先进的预训练语言模型(PTMs)进行了比较分析。我们评估了六种Transformer模型——BERT、RoBERTa、ALBERT、DeBERTa、CodeBERT和GraphCodeBERT,并与当前性能最佳的工具SEntiMoji进行了对比。我们的分析显示,在宏平均和微平均F1分数上,模型表现持续提升了1.17%至16.79%,其中通用领域模型优于专用模型。为了进一步增强PTMs,我们在训练期间将极性特征融入注意力层,相较于基线PTM方法,额外平均提升了1.0%至10.23%。我们的工作为PTMs在软件工程环境中识别愤怒、爱、恐惧、喜悦、悲伤和惊讶等细微情感方面的进步提供了有力证据。通过全面的基准测试和错误分析,我们还指出了解决上下文差距的改进空间。

英文摘要:

Emotion recognition in software engineering texts is critical for understanding developer expressions and improving collaboration. This paper presents a comparative analysis of state-of-the-art Pre-trained Language Models (PTMs) for fine-grained emotion classification on two benchmark datasets from GitHub and Stack Overflow. We evaluate six transformer models - BERT, RoBERTa, ALBERT, DeBERTa, CodeBERT and GraphCodeBERT against the current best-performing tool SEntiMoji. Our analysis reveals consistent improvements ranging from 1.17% to 16.79% in terms of macro-averaged and micro-averaged F1 scores, with general domain models outperforming specialized ones. To further enhance PTMs, we incorporate polarity features in attention layer during training, demonstrating additional average gains of 1.0\% to 10.23\% over baseline PTMs approaches. Our work provides strong evidence for the advancements afforded by PTMs in recognizing nuanced emotions like Anger, Love, Fear, Joy, Sadness, and Surprise in software engineering contexts. Through comprehensive benchmarking and error analysis, we also outline scope for improvements to address contextual gaps.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑