Incorporating Pre-trained Transformer Models into TextCNN for Sentiment Analysis on Software Engineering Texts

Kexin Sun,XiaoBo Shi,Hui Gao,Hongyu Kuang,Xiaoxing Ma,Guoping Rong,Dong Shao,Zheng Zhao,He Zhang
DOI: https://doi.org/10.1145/3545258.3545273
2022-01-01
Abstract:Software information sites (e.g., Jira, Stack Overflow) are now wide-ly used in software development. These online platforms for collaborative development preserve a large amount of Software Engineering (SE) texts. These texts enable researchers to detect developers’ attitudes toward their daily development by analyzing the sentiments expressed in the texts. Unfortunately, recent works reported that neither off-the-shelf tools nor SE-specified tools for sentiment analysis on SE texts can provide satisfying and reliable results. In this paper, we propose to incorporate pre-trained transformer models into the sentence-classification oriented deep learning framework named TextCNN to better capture the unique expression of sentiments in SE texts. Specifically, we introduce an optimized BERT model named RoBERTa as the word embedding layer of TextCNN, along with additional residual connections between RoBERTa and TextCNN for better cooperation in our training framework. An empirical evaluation based on four datasets from different software information sites shows that our training framework can achieve overall better accuracy and generalizability than the four baselines.
What problem does this paper attempt to address?