Transformer-Based Stress Detection in Developer Discussions Using Stack Overflow Data

Loading...
Thumbnail Image

Date

Journal Title

Journal ISSN

Volume Title

Publisher

University of Colombo

Abstract

Developer stress can affect productivity, software quality, and developer well-being. Although stress detection has been explored on general social media platforms, identifying stress-related linguistic signals in technical discussions remains relatively underexplored. This study investigates transformer-based classification of stress-related content in Stack Overflow posts. A dataset of 6,992 manually annotated posts was developed through an annotation process involving three independent annotators. Inter-annotator agreement was assessed using a pilot sample of 300 posts, yielding a Krippendorff’s alpha of 0.86. The annotation scheme categorizes posts into three groups: stress-related posts, neutral posts containing stress-related keywords, and neutral posts without stress-related keywords. For model training, the two neutral categories were merged into a single class, resulting in a binary classification task. To examine the influence of training data scale, experiments used training subsets of 1,500, 2,500, and 3,500 samples. BERT-base, RoBERTa-base, and DistilBERT-base were fine-tuned and evaluated using accuracy, precision, recall, and F1-score. RoBERTa-base achieved 87.65% accuracy, an F1-score of 82.87% for the stress class, and a stress-class recall of 89.50% using 3,500 training samples. A TF-IDF-based Logistic Regression baseline achieved 74.83% accuracy and 65.26% macro-F1. The findings highlight the potential of contextual language representations for identifying stress-related linguistic signals in developer discussions and underscore the importance of annotation reliability, training data scale, and linguistic ambiguity in text classification for developer well-being research.

Description

Keywords

Developer stress, Stack Overflow, Transformer models, Text classification, Developer well-being

Citation

Hashara, P. D. G., Vasanthapriyan, S., & Rubasinghe, T. D. (2026). Transformer-Based Stress Detection in Developer Discussions Using Stack Overflow Data. Proceedings of the University of Colombo International Conference (UCIC) 2026, University of Colombo, Sri Lanka, p.41.

Endorsement

Review

Supplemented By

Referenced By