Depression Detection Using Deep Learning and Natural Language Processing Techniques: A Comparative Study

  • Conference paper
  • First Online:
Progress in Pattern Recognition, Image Analysis, Computer Vision, and Applications (CIARP 2023)

Abstract

Depression is a frequently underestimated illness that significantly impacts a substantial number of individuals worldwide, making it a significant mental disorder. The world today lives fully connected, where more than half of the world’s population uses social networks in their daily lives. If we interpret and understand the feelings associated with a social media post, we can detect potential depression cases before they reach a major state associated with consequences for the patient. This paper proposes the use of natural language processing (NLP) techniques to classify the sentiment associated with a post made on the Twitter social network. This sentiment can be non-depressive, neutral, or depressive. The authors collected and validated the data, and performed pre-processing and feature generation using TF-IDF and Word2Vec techniques. Various DL and ML models were evaluated on these features. The Extra Trees classifier combined with the TF-IDF technique emerged as the most successful combination for classifying potential depression sentiment in tweets, achieving an accuracy of 84.83%.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
EUR 29.95
Price includes VAT (Germany)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
EUR 82.38
Price includes VAT (Germany)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
EUR 104.85
Price includes VAT (Germany)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Depression. https://www.who.int/news-room/fact-sheets/detail/depression. Accessed 26 Oct 2022

  2. TF-IDF for Document Ranking from scratch in python on real world dataset. https://towardsdatascience.com/tf-idf-for-document-ranking-from-scratch-in-python-on-real-world-dataset-796d339a4089. Accessed 09 Jan 2023

  3. Al-Garaady, J., Mahyoob, M.: Public sentiment analysis in social media on the SARS-CoV-2 vaccination using VADER lexicon polarity (2022)

    Google Scholar 

  4. Almeida, F., Xexéo, G.: Word embeddings: a survey (2019). https://doi.org/10.48550/ar**v.1901.09069

  5. Alsagri, H.S., Ykhlef, M.: Machine learning-based approach for depression detection in twitter using content and activity features. IEICE Trans. Inf. Syst. E103.D(8), 1825–1832 (2020). https://doi.org/10.1587/transinf.2020EDP7023

  6. Babu, N.V., Kanaga, E.G.M.: Sentiment analysis in social media data for depression detection using artificial intelligence: a review. SN Comput. Sci. 3(1), 74 (2021). https://doi.org/10.1007/s42979-021-00958-1

    Article  Google Scholar 

  7. Bhargava, C., Al, E.: Depression detection using sentiment analysis of tweets. Turk. J. Comput. Math. Educ. (TURCOMAT) 12(11), 5411–5418 (2021)

    Google Scholar 

  8. Biswas, S., Ghosh, S.: Drug usage analysis by VADER sentiment analysis on leading countries. Mapana J. Sci. 21(3) (2022)

    Google Scholar 

  9. Dessai, S., Usgaonkar, S.S.: Depression detection on social media using text mining. In: 2022 3rd International Conference for Emerging Technology (INCET), pp. 1–4 (2022). https://doi.org/10.1109/INCET54531.2022.9824931

  10. Elbagir, S., Yang, J.: Sentiment analysis on twitter with Python’s natural language toolkit and VADER sentiment analyzer. In: IAENG Transactions on Engineering Sciences, pp. 63–80. WORLD SCIENTIFIC (2019). https://doi.org/10.1142/9789811215094_0005

  11. Gupta, B., Negi, M., Vishwakarma, K., Rawat, G., Badhani, P.: Study of twitter sentiment analysis using machine learning algorithms on Python. Int. J. Comput. Appl. 165, 29–34 (2017). https://doi.org/10.5120/ijca2017914022

    Article  Google Scholar 

  12. Hossain, M.S., Rahman, M.F.: Customer sentiment analysis and prediction of insurance products’ reviews using machine learning approaches. FIIB Bus. Rev. (2022). https://doi.org/10.1177/23197145221115793

  13. Hutto, C., Gilbert, E.: VADER: a parsimonious rule-based model for sentiment analysis of social media text. In: Proceedings of the International AAAI Conference on Web and Social Media, vol. 8, no. 1, pp. 216–225 (2014). https://doi.org/10.1609/icwsm.v8i1.14550

  14. Kabir, M., et al.: DEPTWEET: a typology for social media texts to detect depression severities. Comput. Hum. Behav. 139, 107503 (2023). https://doi.org/10.1016/j.chb.2022.107503

    Article  Google Scholar 

  15. Kolchyna, O., Souza, T.T.P., Treleaven, P., Aste, T.: Twitter sentiment analysis: lexicon method, machine learning method and their combination (2015). https://doi.org/10.48550/ar**v.1507.00955

  16. Arias-de La Torre, J., et al.: Prevalence and variability of current depressive disorder in 27 European countries: a population-based study. Lancet Publ. Health 6(10), e729–e738 (2021). https://doi.org/10.1016/S2468-2667(21)00047-5

  17. Macrohon, J.J.E., Villavicencio, C.N., Inbaraj, X.A., Jeng, J.H.: A semi-supervised approach to sentiment analysis of tweets during the 2022 Philippine presidential election. Information 13(10), 484 (2022). https://doi.org/10.3390/info13100484

    Article  Google Scholar 

  18. Mendon, S., Dutta, P., Behl, A., Lessmann, S.: A hybrid approach of machine learning and lexicons to sentiment analysis: enhanced insights from twitter data of natural disasters. Inf. Syst. Front. 23(5), 1145–1168 (2021). https://doi.org/10.1007/s10796-021-10107-x

    Article  Google Scholar 

  19. Najafabadi, M.M., Villanustre, F., Khoshgoftaar, T.M., Seliya, N., Wald, R., Muharemagic, E.: Deep learning applications and challenges in big data analytics. J. Big Data 2(1), 1 (2015). https://doi.org/10.1186/s40537-014-0007-7

    Article  Google Scholar 

  20. Newman, H., Joyner, D.: Sentiment analysis of student evaluations of teaching. In: Penstein Rosé, C., Martínez-Maldonado, R., Hoppe, H.U., Luckin, R., Mavrikis, M., Porayska-Pomsta, K., McLaren, B., du Boulay, B. (eds.) AIED 2018. LNCS (LNAI), vol. 10948, pp. 246–250. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93846-2_45

    Chapter  Google Scholar 

  21. Prakash, T.N., Aloysius, A.: Data preprocessing in sentiment analysis using twitter data. Int. Educ. Appl. Res. J. 3, 89–92 (2019)

    Google Scholar 

  22. Ramadhani, A.M., Goo, H.S.: Twitter sentiment analysis using deep learning methods. In: 2017 7th International Annual Engineering Seminar (InAES), pp. 1–4 (2017). https://doi.org/10.1109/INAES.2017.8068556

  23. Ricard, B.J., Marsch, L.A., Crosier, B., Hassanpour, S.: Exploring the utility of community-generated social media content for detecting depression: an analytical study on Instagram. J. Med. Internet Res. 20(12), e11817 (2018). https://doi.org/10.2196/11817

    Article  Google Scholar 

  24. Shailaja, K., Seetharamulu, B., Jabbar, M.A.: Machine learning in healthcare: a review. In: 2018 Second International Conference on Electronics, Communication and Aerospace Technology (ICECA), pp. 910–914. IEEE (2018). https://doi.org/10.1109/ICECA.2018.8474918

  25. Sidey-Gibbons, J.A.M., Sidey-Gibbons, C.J.: Machine learning in medicine: a practical introduction. BMC Med. Res. Methodol. 19(1), 64 (2019). https://doi.org/10.1186/s12874-019-0681-4

    Article  Google Scholar 

  26. Tiller, J.W.G.: Depression and anxiety. Med. J. Aust. 199(S6), S28–S31 (2013). https://doi.org/10.5694/mja12.10628

    Article  Google Scholar 

  27. tweets, Hemanthkumar, Latha: Depression detection with sentiment analysis of tweets. Turk. J. Comput. Math. Educ. (2019)

    Google Scholar 

  28. Wani, M.A., ELAffendi, M.A., Shakil, K.A., Imran, A.S., El-Latif, A.A.A.: Depression screening in humans with AI and deep learning techniques. IEEE Trans. Comput. Soc. Syst. (2022). https://doi.org/10.1109/TCSS.2022.3200213

  29. Woods, C., Adedeji, M.: Classification of depression through social media posts using machine learning techniques. Univ. Ibadan J. Sci. Logics ICT Res. 7(1), 19–28 (2021)

    Google Scholar 

  30. Yadav, N., Kudale, O., Rao, A., Gupta, S., Shitole, A.: Twitter sentiment analysis using supervised machine learning. In: Hemanth, J., Bestak, R., Chen, J.I.Z. (eds.) Intelligent Data Communication Technologies and Internet of Things. Lecture Notes on Data Engineering and Communications Technologies, pp. 631–642. Springer, Cham (2021). https://doi.org/10.1007/978-981-15-9509-7_51

  31. Yoon, S., Kleinman, M., Mertz, J., Brannick, M.: Is social network site usage related to depression? A meta-analysis of Facebook-depression relations. J. Affect. Disord. 248, 65–72 (2019). https://doi.org/10.1016/j.jad.2019.01.026

    Article  Google Scholar 

  32. Zhou, B., Yang, G., Shi, Z., Ma, S.: Natural language processing for smart healthcare. IEEE Rev. Biomed. Eng., 1–17 (2022). https://doi.org/10.1109/RBME.2022.3210270

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Francisco Mesquita .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mesquita, F., Maurício, J., Marques, G. (2024). Depression Detection Using Deep Learning and Natural Language Processing Techniques: A Comparative Study. In: Vasconcelos, V., Domingues, I., Paredes, S. (eds) Progress in Pattern Recognition, Image Analysis, Computer Vision, and Applications. CIARP 2023. Lecture Notes in Computer Science, vol 14469. Springer, Cham. https://doi.org/10.1007/978-3-031-49018-7_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-49018-7_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-49017-0

  • Online ISBN: 978-3-031-49018-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation