EUVIMEDEUVIMED entdecken
Open Access · CC BY-NC 4.0

Effectiveness of Transformer-Based Models for Detecting Depression-Related Language in Social Media: A Comparative Analysis.

James Gitari Muriithi, Muo Charles

International Journal of Social Science and Humanities Research (IJSSHR) ISSN 2959-7056 (o); 2959-7048 (p) · 22.11.2026 · 4 (3)

DOI: 10.61108/ijsshr.v4i3.357 ↗

Kurz gefasst

Fachartikel in der Zeitschrift International Journal of Social Science and Humanities Research (IJSSHR) ISSN 2959-7056 (o); 2959-7048 (p), online erschienen am 22.11.2026. Verfasst von James Gitari Muriithi und 1 weiteren Autor:innen. Die Arbeit nennt 28 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY-NC 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Depression is one of the most common mental health conditions worldwide, yet many affected people remain undiagnosed and untreated. Social media posts provide observable language patterns associated with depression, creating an opportunity for scalable screening, but most automated approaches classify single posts in isolation and ignore the user's posting history. The purpose of this study was therefore to examine the effectiveness of a context-aware transformer-based model for detecting depression-related language in social media posts. Specifically, the study evaluated a weight-shared RoBERTa dual encoder that jointly processes the current tweet and up to five prior posts by the same user, compared it with classical classifiers using term frequency–inverse document frequency (TF-IDF) features, and analysed its errors and prediction confidence. The study was anchored on transformer self-attention and transfer learning theory and supported by Beck's cognitive theory of depression and the bias–variance trade-off. A quantitative comparative experimental design based on secondary data was adopted. The publicly available Twitter Depression Dataset was cleaned through language, length and duplicate filters, yielding 7,370 tweets from 12 accounts posted between October 2012 and August 2021, and was partitioned at the user level. On the validation set, the RoBERTa model achieved an F1-score of 0.9286, above the best classical validation F1-score of 0.9080. On a held-out test set of 1,098 tweets from two accounts, it achieved an accuracy of 0.9891, precision of 0.9528, recall of 0.9352, F1-score of 0.9439 and ROC-AUC of 0.9991, compared with an F1-score of 0.8123 for logistic regression. The model misclassified 12 tweets (5 false positives and 7 false negatives) and was markedly less certain on its errors than on its correct predictions. The study concludes that context-aware transformer representations detect dataset-defined depression-related language more effectively than classical bag-of-words approaches. However, because the labels are automatically assigned and the test set contains only two accounts, the results do not establish clinical diagnoses or generalization to new users. The study recommends that such models be used only as screening aids with human review of low-confidence predictions, and that future work use clinician-verified labels, more diverse users and statistical significance testing.

Zitieren

APA

Muriithi, J. G., & Charles, M. (2026). Effectiveness of Transformer-Based Models for Detecting Depression-Related Language in Social Media: A Comparative Analysis. International Journal of Social Science and Humanities Research (IJSSHR) ISSN 2959-7056 (o); 2959-7048 (p), 4(3). https://doi.org/10.61108/ijsshr.v4i3.357

Vancouver

Muriithi JG, Charles M. Effectiveness of Transformer-Based Models for Detecting Depression-Related Language in Social Media: A Comparative Analysis. International Journal of Social Science and Humanities Research (IJSSHR) ISSN 2959-7056 (o); 2959-7048 (p). 2026;4(3). doi:10.61108/ijsshr.v4i3.357

BibTeX
@article{Muriithi2026,
  author = {Muriithi, James Gitari and Charles, Muo},
  title = {Effectiveness of Transformer-Based Models for Detecting Depression-Related Language in Social Media: A Comparative Analysis},
  journal = {International Journal of Social Science and Humanities Research (IJSSHR) ISSN 2959-7056 (o); 2959-7048 (p)},
  year = {2026},
  volume = {4},
  number = {3},
  doi = {10.61108/ijsshr.v4i3.357}
}
Kostenlos starten →