Submitted:
16 July 2024
Posted:
16 July 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
- We conduct an experimental comparison of several state-of-the-art (SOTA) ML algorithms for depression detection and discuss them from a scientific lens.
- We demonstrate the use of Sentence BERT-Ensemble model to achieve SOTA results.
- We demonstrate that sentiment analysis indicator is a useful external feature in depression detection.
2. Related Works
3. Methodology
- I.
- In the first experiment, we compared traditional ML algorithms using term frequency and inverse document frequency (TF-IDF) vectorizer.
- II.
- In the second attempt, we compared ML algorithms using contextual word embeddings such BERT and SBERT.
- III.
- Finally, we implemented sentiment analysis and used the polarity result as an explicit feature. Thus, compared ML algorithms using the contextual word embeddings.
3.1. Proposed Approach
3.1.1. BERT (Bidirectional Encoder Representations from Transformers)
3.1.2. Sentence-BERT
3.1.3. Stacking Ensemble Model
3.1.4. Gradient Boosting
3.1.5. Logistic Regression
3.1.6. Multi-Layer Perceptron
- is the index of the output layer.
- is the activation function for the output layer.
3.1.7. AdaBoost
- 1.
- Initialize the Weights:
- 2.
- For t=1 to T (number of iterations):
- 3.
- Final Strong Classifier:
3.1.8. Sentiment Analysis
3.2. Datasets
3.2.1. Dataset 1 (D1)
3.2.2. Datasets 2 (D2)
4. Results and Discussion
5. Conclusions
Implications, Limitations and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Figuerêdo, J.S.L., Maia, A.L.L. and Calumby, R.T., 2022. Early depression detection in social media based on deep learning and underlying emotions. Online Social Networks and Media, 31, p.100225.
- Thapar, A., Eyre, O., Patel, V. and Brent, D., 2022. Depression in young people. The Lancet, 400(10352), pp.617-631.
- World Health Organization., 2023. Depressive disorder (depression). https://www.who.int/en/news-room/fact-sheets/detail/depression (accessed 27th August, 2023).
- Cai, Y., Wang, H., Ye, H., Jin, Y. and Gao, W., 2023. Depression detection on online social network with multivariate time series feature of user depressive symptoms. Expert Systems with Applications, 217, p.119538.
- World health Organization, 2017. Depression and other common mental disorders: global health estimates. Technical Report. World Health Organization. (Accessed 19th September 2023) https://apps.who.int/iris/handle/10665/254610.
- Zhang, T., Yang, K., Alhuzali, H., Liu, B. and Ananiadou, S., 2023. PHQ-aware depressive symptoms identification with similarity contrastive learning on social media. Information Processing & Management, 60(5), p.103417.
- Liang, Y., Liu, L., Ji, Y., Huangfu, L. and Zeng, D.D., 2023. Identifying emotional causes of mental disorders from social media for effective intervention. Information Processing & Management, 60(4), p.103407.
- Beck, A.T., Ward, C.H., Mendelson, M., Mock, J. and Erbaugh, J., 1961. An inventory for measuring depression. Archives of general psychiatry, 4(6), pp.561-571.
- Radloff, L.S., 1991. The use of the Center for Epidemiologic Studies Depression Scale in adolescents and young adults. Journal of youth and adolescence, 20(2), pp.149-166.
- Kovacs, M., 1992. Children’s depression inventory. Toronto Ontario.
- Angold, A. and Costello, E.J., 1987. Mood and feelings questionnaire (MFQ). Durham: Developmental Epidemiology Program, Duke University. https://devepi.duhs.duke.edu/measures/the-mood-andfeelings-questionnaire-mfq/ (accessed October 28, 2023).
- Kroenke, K., Spitzer, R.L. and Williams, J.B., 2001. The PHQ-9: validity of a brief depression severity measure. Journal of general internal medicine, 16(9), pp.606-613.
- Chorpita, B.F., Moffitt, C.E. and Gray, J., 2005. Psychometric properties of the Revised Child Anxiety and Depression Scale in a clinical sample. Behaviour research and therapy, 43(3), pp.309-322.
- Epstein, R.M., Duberstein, P.R., Feldman, M.D., Rochlen, A.B., Bell, R.A., Kravitz, R.L., Cipri, C., Becker, J.D., Bamonti, P.M. and Paterniti, D.A., 2010. “I didn’t know what was wrong:” how people with undiagnosed depression recognize, name and explain their distress. Journal of general internal medicine, 25, pp.954-961.
- Boerema, A.M., Kleiboer, A., Beekman, A.T., van Zoonen, K., Dijkshoorn, H. and Cuijpers, P., 2016. Determinants of help-seeking behavior in depression: a cross-sectional study. BMC psychiatry, 16, pp.1-9.
- Ogunleye, B.O., 2021. Statistical learning approaches to sentiment analysis in the Nigerian banking context. Sheffield Hallam University (United Kingdom).
- Ogunleye, B., Brunsdon, T., Maswera, T., Hirsch, L. and Gaudoin, J., 2023, August. Using Opinionated-Objective Terms to Improve Lexicon-Based Sentiment Analysis. In International conference on soft computing for problem-solving (pp. 1-23). Singapore: Springer Nature Singapore. [CrossRef]
- Chancellor, S. and De Choudhury, M., 2020. Methods in predictive techniques for mental health status on social media: a critical review. NPJ digital medicine, 3(1), p.43.
- Pérez, A., Parapar, J., Barreiro, Á. and Lopez-Larrosa, S., 2023, July. Bdi-sen: A sentence dataset for clinical symptoms of depression. In Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval (pp. 2996-3006).
- Wang, Y., Wang, Z., Li, C., Zhang, Y. and Wang, H., 2022. Online social network individual depression detection using a multitask heterogenous modality fusion approach. Information Sciences, 609, pp.727-749.
- Islam, M.R., Kamal, A.R.M., Sultana, N., Islam, R. and Moni, M.A., 2018, February. Detecting depression using k-nearest neighbors (knn) classification technique. In 2018 International Conference on Computer, Communication, Chemical, Material and Electronic Engineering (IC4ME2) (pp. 1-4). IEEE.
- Cohan, A., Desmet, B., Yates, A., Soldaini, L., MacAvaney, S. and Goharian, N., 2018. SMHD: a large-scale resource for exploring online language usage for multiple mental health conditions. arXiv preprint arXiv:1806.05258.
- Bierbaum, J., Lynn, M. and Yu, L., 2022, April. Utilizing Pattern Mining and Classification Algorithms to Identify Risk for Anxiety and Depression in the LGBTQ+ Community During the COVID-19 Pandemic. In Companion Proceedings of the Web Conference 2022 (pp. 663-672).
- Skaik, R. and Inkpen, D., 2020, December. Using twitter social media for depression detection in the canadian population. In Proceedings of the 2020 3rd Artificial Intelligence and Cloud Computing Conference (pp. 109-114).
- Hosseini-Saravani, S.H., Besharati, S., Calvo, H. and Gelbukh, A., 2020, October. Depression detection in social media using a psychoanalytical technique for feature extraction and a cognitive based classifier. In Mexican International Conference on Artificial Intelligence (pp. 282-292). Cham: Springer International Publishing.
- He, L., Chan, J.C.W. and Wang, Z., 2021. Automatic depression recognition using CNN with attention mechanism from videos. Neurocomputing, 422, pp.165-175.
- Ive, J., Gkotsis, G., Dutta, R., Stewart, R. and Velupillai, S., 2018, June. Hierarchical neural model with attention mechanisms for the classification of social media text related to mental health. In Proceedings of the fifth workshop on computational linguistics and clinical psychology: from keyboard to clinic (pp. 69-77).
- Amanat, A., Rizwan, M., Javed, A.R., Abdelhaq, M., Alsaqour, R., Pandya, S. and Uddin, M., 2022. Deep learning for depression detection from textual data. Electronics, 11(5), p.676.
- Almars, A.M., 2022. Attention-Based Bi-LSTM Model for Arabic Depression Classification. Computers, Materials & Continua, 71(2).
- Liu, T., Jain, D., Rapole, S.R., Curtis, B., Eichstaedt, J.C., Ungar, L.H. and Guntuku, S.C., 2023, April. Detecting symptoms of depression on reddit. In Proceedings of the 15th ACM Web Science Conference 2023 (pp. 174-183).
- Harrigian, K., Aguirre, C. and Dredze, M., 2020, November. Do models of mental health based on social media data generalize?. In Findings of the association for computational linguistics: EMNLP 2020 (pp. 3774-3788).
- Ogunleye, B. and Dharmaraj, B., 2023. The use of a large language model for cyberbullying detection. Analytics, 2(3), pp.694-707.
- Cheng, Q., Li, T.M., Kwok, C.L., Zhu, T. and Yip, P.S., 2017. Assessing suicide risk and emotional distress in Chinese social media: a text mining and machine learning study. Journal of medical internet research, 19(7), p.e243.
- Shrestha, A., Tlachac, M.L., Flores, R. and Rundensteiner, E.A., 2022, September. Bert variants for depression screening with typed and transcribed responses. In Adjunct Proceedings of the 2022 ACM International Joint Conference on Pervasive and Ubiquitous Computing and the 2022 ACM International Symposium on Wearable Computers (pp. 211-215).
- Naseem, U., Dunn, A.G., Kim, J. and Khushi, M., 2022, April. Early identification of depression severity levels on reddit using ordinal classification. In Proceedings of the ACM Web Conference 2022 (pp. 2563-2572).
- Monreale, A., Iavarone, B., Rossetto, E. and Beretta, A., 2022, April. Detecting addiction, anxiety, and depression by users psychometric profiles. In Companion Proceedings of the Web Conference 2022 (pp. 1189-1197).
- Sen, I., Quercia, D., Constantinides, M., Montecchi, M., Capra, L., Scepanovic, S. and Bianchi, R., 2022. Depression at work: exploring depression in major US companies from online reviews. Proceedings of the ACM on Human-Computer Interaction, 6(CSCW2), pp.1-21.
- Wu, J., Wu, X., Hua, Y., Lin, S., Zheng, Y. and Yang, J., 2023, April. Exploring social media for early detection of depression in covid-19 patients. In Proceedings of the ACM Web Conference 2023 (pp. 3968-3977).
- Villatoro-Tello, E., Ramírez-de-la-Rosa, G., Gática-Pérez, D., Magimai.-Doss, M. and Jiménez-Salazar, H., 2021, October. Approximating the mental lexicon from clinical interviews as a support tool for depression detection. In Proceedings of the 2021 international conference on multimodal interaction (pp. 557-566).
- Liu, Y., Kang, K.D. and Doe, M.J., 2022. Hadd: High-accuracy detection of depressed mood. Technologies, 10(6), p.123.
- Malik, A., Shabaz, M. and Asenso, E., 2023. Machine learning based model for detecting depression during Covid-19 crisis. Scientific African, 20, p.e01716.
- Gallegos Salazar, L.M., Loyola-Gonzalez, O. and Medina-Perez, M.A., 2021. An explainable approach based on emotion and sentiment features for detecting people with mental disorders on social networks. Applied Sciences, 11(22), p.10932.
- Burdisso, S.G., Errecalde, M. and Montes-y-Gómez, M., 2019. A text classification framework for simple and effective early depression detection over social media streams. Expert Systems with Applications, 133, pp.182-197.
- Trotzek, M., Koitka, S. and Friedrich, C.M., 2018. Utilizing neural networks and linguistic metadata for early detection of depression indications in text sequences. IEEE Transactions on Knowledge and Data Engineering, 32(3), pp.588-601.
- Adarsh, V., Kumar, P.A., Lavanya, V. and Gangadharan, G.R., 2023. Fair and explainable depression detection in social media. Information Processing & Management, 60(1), p.103168.
- Guo, Z., Ding, N., Zhai, M., Zhang, Z. and Li, Z., 2023. Leveraging domain knowledge to improve depression detection on Chinese social media. IEEE Transactions on Computational Social Systems, 10(4), pp.1528-1536.
- Devlin, J., Chang, M.W., Lee, K. and Toutanova, K., 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
- Reimers, N. and Gurevych, I., 2019. Sentence-bert: Sentence embeddings using siamese bert-networks. arXiv preprint arXiv:1908.10084.
- Divina, F., Gilson, A., Goméz-Vela, F., García Torres, M. and Torres, J.F., 2018. Stacking ensemble learning for short-term electricity consumption forecasting. Energies, 11(4), p.949.
- Kwon, H., Park, J. and Lee, Y., 2019. Stacking ensemble technique for classifying breast cancer. Healthcare informatics research, 25(4), pp.283-288.
- Rajagopal, S., Kundapur, P.P. and Hareesha, K.S., 2020. A stacking ensemble for network intrusion detection using heterogeneous datasets. Security and Communication Networks, 2020(1), p.4586875.
- Charoenkwan, P., Chiangjong, W., Nantasenamat, C., Hasan, M.M., Manavalan, B. and Shoombuatong, W., 2021. StackIL6: a stacking ensemble model for improving the prediction of IL-6 inducing peptides. Briefings in bioinformatics, 22(6), p.bbab172.
- Akyol, K., 2020. Stacking ensemble based deep neural networks modeling for effective epileptic seizure detection. Expert Systems with Applications, 148, p.113239.
- Ribeiro, M.H.D.M. and dos Santos Coelho, L., 2020. Ensemble approach based on bagging, boosting and stacking for short-term prediction in agribusiness time series. Applied soft computing, 86, p.105837.
- Natekin, A. and Knoll, A., 2013. Gradient boosting machines, a tutorial. Frontiers in neurorobotics, 7, p.21.
- Saini, D., Chand, T., Chouhan, D.K. and Prakash, M., 2021. A comparative analysis of automatic classification and grading methods for knee osteoarthritis focussing on X-ray images. Biocybernetics and Biomedical Engineering, 41(2), pp.419-444. [CrossRef]
- Grosse, R., 2019. Lecture 5: Multilayer Perceptrons. inf. téc.
- Tsai, J.K. and Hung, C.H., 2021. Improving AdaBoost classifier to predict enterprise performance after COVID-19. Mathematics, 9(18), p.2215. [CrossRef]
- Nielsen, F.Å., 2011. A new ANEW: Evaluation of a word list for sentiment analysis in microblogs. arXiv preprint arXiv:1103.2903.
- Sampath, K. and Durairaj, T., 2022, March. Data set creation and empirical analysis for detecting signs of depression from social media postings. In International Conference on Computational Intelligence in Data Science (pp. 136-151). Cham: Springer International Publishing.
- Muñoz, S. and Iglesias, C.Á., 2023. Detection of the Severity Level of Depression Signs in Text Combining a Feature-Based Framework with Distributional Representations. Applied Sciences, 13(21), p.11695.
- Shi, Y., Tian, Y., Tong, C., Zhu, C., Li, Q., Zhang, M., Zhao, W., Liao, Y. and Zhou, P., 2023, November. Detect depression from social networks with sentiment knowledge sharing. In Chinese national conference on social media processing (pp. 133-146). Singapore: Springer Nature Singapore.
- Tavchioski, I., Robnik-Šikonja, M. and Pollak, S., 2023. Detection of depression on social networks using transformers and ensembles. arXiv preprint arXiv:2305.05325.
- Poświata, R. and Perełkiewicz, M., 2022, May. OPI@ LT-EDI-ACL2022: Detecting signs of depression from social media text using RoBERTa pre-trained language models. In Proceedings of the Second Workshop on Language Technology for Equality, Diversity and Inclusion (pp. 276-282).
- Turcan, E. and McKeown, K., 2019. Dreaddit: A reddit dataset for stress analysis in social media. arXiv preprint arXiv:1911.00133.
- Ilias, L., Mouzakitis, S. and Askounis, D., 2023. Calibration of transformer-based models for identifying stress and depression in social media. IEEE Transactions on Computational Social Systems, 11(2), pp.1979-1990. [CrossRef]
- Shobayo, O., Sasikumar, S., Makkar, S. and Okoyeigbo, O., 2024. Customer Sentiments in Product Reviews: A Comparative Study with GooglePaLM. Analytics, 3(2), pp.241-254. [CrossRef]



| Label | Count | Example |
| Positive | 878 | Good |
| Negative | 1598 | Cry |
| Label | Countraw | Countpreprocessed | Example |
| Not depressed | 4,649 | 3503 | Happy New Years Everyone: We made it another year |
| Moderate | 10,494 | 5780 | My life gets worse every year. That’s what it feels like anyway |
| Severe | 1,489 | 968 | Words can’t describe how bad I feel right now: I just want to fall asleep forever. |
| Label | Countraw | Example |
| Minimal | 2587 | I just got out of a four year, mostly on but sometimes off relationship. The last interaction we had; he was moving out. The night before, he had strangled me. We’ve had a toxic relationship, but mostly loving. He truly tried to love me as much as possible but would get drunk and be verbally abusive. |
| Mild | 290 | I just feel like the street life has fucked my head up. There’s so much I don’t even know how to talk about anymore, I just hold that shit. The only person I can really chat with is a pal I know at the bar. He has PTSD and shit from the military bad, hard-up alcoholic nowadays after killing people. We talk once every few weeks and we are open and it’s cool. But normal people? |
| Moderate | 394 | Sometimes, when I finally got out of bed and stood up, I felt like "Ugh, *finally*". Still, it did not happen every morning, and even when it did, I still felt rested from the long sleep, so I thought no more of it. Also, they were never nightmares. Sadly, my body got habituated to the sleep-component of Mirtazapine after about five months, and my old, warped sleep cycle slowly creeped back into my life. The only benefit left in the medicine was the mild mental cushioning it provided, but at the same time I started to suspect that what I needed wasn’t cushioning but to make new constructive life decisions, that only I could make. |
| Severe | 282 | I know that I can’t be unemployed forever but I’m just too anxious to really do anything. And everyone in my family keeps asking what my plan is and I keep lying because saying I’ve got nothing is just too humiliating. I’m just stuck. Have any of you have gone through something similar, and have any advice? I appreciate it. |
| D1 | D2 | |||||||
| Algorithms | A | P | R | F | A | P | R | F |
| LR (TF-IDF) | 0.37 | 0.42 | 0.36 | 0.38 | 0.74 | 0.69 | 0.73 | 0.67 |
| NB (TF-IDF) | 0.36 | 0.40 | 0.36 | 0.36 | 0.72 | 0.52 | 0.71 | 0.60 |
| SVM (TF-IDF) | 0.43 | 0.50 | 0.43 | 0.31 | 0.72 | 0.56 | 0.71 | 0.60 |
| GBM (TF-IDF) | 0.39 | 0.46 | 0.39 | 0.35 | 0.73 | 0.67 | 0.72 | 0.66 |
| D1 | D2 | |||||||
| Algorithms | A | P | R | F | A | P | R | F |
| BERT + LR | 0.63 | 0.63 | 0.61 | 0.62 | 0.72 | 0.67 | 0.72 | 0.69 |
| BERT + SVM | 0.65 | 0.66 | 0.64 | 0.63 | 0.72 | 0.59 | 0.72 | 0.61 |
| BERT + GBM | 0.65 | 0.67 | 0.65 | 0.63 | 0.72 | 0.64 | 0.72 | 0.67 |
| BERT + BiGRU | 0.61 | 0.67 | 0.61 | 0.58 | 0.69 | 0.68 | 0.69 | 0.68 |
| BERT + BiLSTM | 0.61 | 0.68 | 0.61 | 0.60 | 0.69 | 0.69 | 0.69 | 0.69 |
| BERT + Ensemble | 0.66 | 0.68 | 0.66 | 0.64 | 0.73 | 0.66 | 0.73 | 0.68 |
| SBERT + LR | 0.64 | 0.65 | 0.64 | 0.63 | 0.74 | 0.69 | 0.74 | 0.69 |
| SBERT + SVM | 0.65 | 0.66 | 0.65 | 0.63 | 0.74 | 0.68 | 0.74 | 0.66 |
| SBERT + GBM | 0.65 | 0.64 | 0.63 | 0.62 | 0.73 | 0.65 | 0.73 | 0.66 |
| SBERT + BiGRU | 0.61 | 0.63 | 0.61 | 0.62 | 0.71 | 0.69 | 0.72 | 0.70 |
| SBERT + BiLSTM | 0.61 | 0.62 | 0.61 | 0.61 | 0.73 | 0.69 | 0.74 | 0.70 |
| SBERT + Ensemble | 0.69 | 0.69 | 0.65 | 0.68 | 0.76 | 0.69 | 0.75 | 0.70 |
| D1 | D2 | |||||||
| Algorithms | A | P | R | F | A | P | R | F |
| BERT + LRAFINN | 0.63 | 0.64 | 0.63 | 0.63 | 0.66 | 0.71 | 0.68 | 0.70 |
| BERT + SVMAFINN | 0.66 | 0.72 | 0.66 | 0.62 | 0.73 | 0.67 | 0.72 | 0.66 |
| BERT + GBMAFINN | 0.65 | 0.67 | 0.66 | 0.63 | 0.72 | 0.66 | 0.72 | 0.67 |
| BERT + BiGRUAFINN | 0.65 | 0.68 | 0.64 | 0.61 | 0.69 | 0.66 | 0.67 | 0.68 |
| BERT + BiLSTMAFINN | 0.65 | 0.67 | 0.64 | 0.65 | 0.72 | 0.70 | 0.73 | 0.71 |
| BERT + EnsembleAFINN | 0.71 | 0.69 | 0.65 | 0.67 | 0.74 | 0.65 | 0.71 | 0.67 |
| SBERT + LRAFINN | 0.64 | 0.65 | 0.63 | 0.64 | 0.75 | 0.71 | 0.74 | 0.72 |
| SBERT + SVMAFINN | 0.65 | 0.65 | 0.65 | 0.63 | 0.74 | 0.72 | 0.70 | 0.66 |
| SBERT + GBMAFINN | 0.64 | 0.65 | 0.64 | 0.63 | 0.73 | 0.65 | 0.72 | 0.67 |
| SBERT + BiGRUAFINN | 0.60 | 0.61 | 0.58 | 0.60 | 0.71 | 0.66 | 0.70 | 0.68 |
| SBERT + BiLSTMAFINN | 0.60 | 0.61 | 0.58 | 0.59 | 0.73 | 0.70 | 0.72 | 0.71 |
| SBERT + EnsembleAFINN | 0.74 | 0.71 | 0.68 | 0.69 | 0.83 | 0.77 | 0.74 | 0.76 |
| XLNet + EnsembleAFINN | 0.67 | 0.70 | 0.68 | 0.66 | 0.75 | 0.67 | 0.72 | 0.71 |
| ALBERT + EnsembleAFINN | 0.67 | 0.68 | 0.66 | 0.64 | 0.72 | 0.64 | 0.71 | 0.70 |
| RoBERTa + EnsembleAFINN | 0.69 | 0.68 | 0.66 | 0.67 | 0.75 | 0.67 | 0.72 | 0.71 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
