{"title":"Enhancing emotion detection in software engineering using a residual multi-embedding fusion network","authors":"Rim Mahouachi","doi":"10.1016/j.jss.2025.112651","DOIUrl":null,"url":null,"abstract":"<div><div>Emotions play a crucial role in the development of software, particularly in team dynamics, productivity, and decision making. Developer communications — such as bug reports, code reviews, and online discussions — often include emotional signals. But part of the difficulty in identifying these feelings lies in the technicality and informality of the words, and in the utter scarcity of even critical but rare emotions like fear and surprise. This study aims to improve the detection of both common and minority emotions in software engineering texts, with a focus on better identifying underrepresented classes. We introduce R-MEFN, Residual Multi-Embedding Fusion Network, a network model that employs multiple types of contextual word embeddings to represent the text. Residual connections serve to keep signals of subtle emotionality, especially ones associated with emotions that are infrequent. Cross-validation is performed to choose the best combination of embeddings to be fused. We evaluate R-MEFN on two real-world datasets (StackOverflow and Jira), comparing it to other prior approaches on these benchmarks, as well as to single-embedding and combined-embedding baselines. R-MEFN outperforms other methods that have been evaluated in the same benchmarks for multilabel emotion detection, showing particular improvements on rare classes while keeping a good performance on frequent emotions. Also, it outperforms all single-embedding baselines, as well as all combined-embedding baselines, where embeddings from multiple sources are simply concatenated, showing the strength of the fusion approach. The cross-validated integration of contextual embeddings allows R-MEFN to produce more balanced and expressive representations across all emotion categories. These findings show the effectiveness of using multiple contextual embeddings and residual learning for addressing class imbalance in emotion detection. We see R-MEFN as a useful starting point towards creating emotion aware tools that can allow software teams to track emotional dynamics in a project, and identify hidden risks.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"231 ","pages":"Article 112651"},"PeriodicalIF":4.1000,"publicationDate":"2025-10-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0164121225003206","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Emotions play a crucial role in the development of software, particularly in team dynamics, productivity, and decision making. Developer communications — such as bug reports, code reviews, and online discussions — often include emotional signals. But part of the difficulty in identifying these feelings lies in the technicality and informality of the words, and in the utter scarcity of even critical but rare emotions like fear and surprise. This study aims to improve the detection of both common and minority emotions in software engineering texts, with a focus on better identifying underrepresented classes. We introduce R-MEFN, Residual Multi-Embedding Fusion Network, a network model that employs multiple types of contextual word embeddings to represent the text. Residual connections serve to keep signals of subtle emotionality, especially ones associated with emotions that are infrequent. Cross-validation is performed to choose the best combination of embeddings to be fused. We evaluate R-MEFN on two real-world datasets (StackOverflow and Jira), comparing it to other prior approaches on these benchmarks, as well as to single-embedding and combined-embedding baselines. R-MEFN outperforms other methods that have been evaluated in the same benchmarks for multilabel emotion detection, showing particular improvements on rare classes while keeping a good performance on frequent emotions. Also, it outperforms all single-embedding baselines, as well as all combined-embedding baselines, where embeddings from multiple sources are simply concatenated, showing the strength of the fusion approach. The cross-validated integration of contextual embeddings allows R-MEFN to produce more balanced and expressive representations across all emotion categories. These findings show the effectiveness of using multiple contextual embeddings and residual learning for addressing class imbalance in emotion detection. We see R-MEFN as a useful starting point towards creating emotion aware tools that can allow software teams to track emotional dynamics in a project, and identify hidden risks.
期刊介绍:
The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to:
•Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution
•Agile, model-driven, service-oriented, open source and global software development
•Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems
•Human factors and management concerns of software development
•Data management and big data issues of software systems
•Metrics and evaluation, data mining of software development resources
•Business and economic aspects of software development processes
The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.