Classification Between Suicidal Ideation and Depression Through Natural Language Processing Using Recurrent Neural Network

Rhenaldy Rhenaldy, Ladysa Stella Karenza, Hidayaturrahman Hidayaturrahman, Muhamad Keenan Ario


The use of machine learning has been implemented in various ways, including to detect depression in individuals. However, there is hardly any research done regarding classification between suicidal ideations and depression among individuals through text analysis. Differentiating between depression and suicidal ideation is crucial, considering the difference in treatment between the two mental illness. In this paper, we propose a detection model using Recurrent Neural Network (RNN) in the hopes to improve previous models made by other researchers. By comparing the proposed model with the previous works as the baseline model, we discovered that the proposed model (RNN) performed better than the baseline models, with the accuracy of 86.81%, precision of 97.13%, recall score of 94.69%, f1 score of 95.90%, and area under the curve (AUC) score of 92.84%.


Suicide; Text; NLP; Unsupervised Learning; Dimensionality Reduction; Clustering; RNN

Full Text:



World health Organization, "Preventing suicide - A global imperative," 2014. [Online]. Available:

H. Ritchie, M. Roser and E. Ortiz-Ospina, "Suicide," Our World in Data, 2015. [Online]. Available:

World Health Organization, "Depression," World Health Organization, 2021. [Online]. Available:

A. Amanat, M. Rizwan, R. A. Javed, M. Abdelhaq, R. Alsaqour, S. Pandya and M. Uddin, "Deep Learning for Depression Detection from Textual Data," Electronics, 2022.

A. Fatima, Y. Li, T. T. Hills and M. Stella, "DASentimental: Detecting Depression, Anxiety, and Stress in Texts via Emotional Recall, Cognitive Networks, and Machine Learning," Big Data and Cognitive Computing.

R. Sawhney, P. Manchanda, P. Mathur, R. Shah and R. Singh, "Exploring and Learning Suicidal Ideation Connotations on Social Media with Deep Learning," Proceedings of the 9th Workshop on Computational Approaches to Subjectivity, Sentiment and Social Media Analysis, p. 167–175, 2018.

R. Németh, D. Sik and F. Máté, "Machine Learning of Concepts Hard Even for Humans: The Case of Online Depression Forums," vol. 19, 2020.

S. Ryu, H. Lee, D.-K. Lee, S.-W. Kim and C.-E. Kim, "Detection of Suicide Attempters among Suicide Ideators Using Machine Learning," 2019.

D. Shin, W. I. Cho, C. H. K. Park, S. J. Rhee, M. J. Kim, H. Lee, N. S. Kim and Y. M. Ahn, "Detection of Minor and Major Depression through Voice as a Biomarker Using Machine Learning," Journal of Clinical Medicine, vol. 10, 2021.

J.-C. Weng, T.-Y. Lin, Y.-H. Tsai, M. T. Cheok, Y.-P. E. Chang and V. C.-H. Chen, "An Autoencoder and Machine Learning Model to Predict Suicidal Ideation with Brain Structural Imaging," Journal of Clinical Medicine, vol. 9, 2020.

C. Su, R. Aseltine, R. Doshi, K. Chen, S. C. Rogers and F. Wang, "Machine Learning for Suicide Risk Prediction in Children and Adolescents with Electronic Health Records," Translational Psychiatry, 2020.

I. A. N. Arachchige, P. Sandanapitchai and R. Weerasinghe, "Investigating Machine Learning & Natural Language Processing Techniques Applied for Predicting Depression Disorder from Online Support Forums: A Systematic Literature Review," Information, 2021.

M. J. Havigerova, J. Haviger, P. Hoffmannova and D. Kucera, "Text-Based Detection of the Risk of Depression," Front. Psychol., 2019.

M. Z. Uddin, K. K. Dysthe, A. Folstad and P. B. Brandtzaeg, "Deep Learning for Prediction of Depressive Symptoms in a Large Textual Dataset," Neural Computing and Applications.

R. A. Bernert, A. M. Hilberg, R. Melia, J. P. Kim, N. H. Shah and F. Abnousi, "Artificial Intelligence and Suicide Prevention: A Systematic Review of Machine Learning Investigations," International Journal of Environmental Research and Public Health, 2020.

M. Cukic, D. Pokrajac, M. Stokic, s. Simic, V. Radivojevic and M. Ljubisavljevic, "EEG machine learning with Higuchi fractal dimension and Sample Entropy as features for successful detection of depression," 2018.

N. J. Carson, B. Mullin, M. J. Sanchez, F. Lu, K. Yang, M. Menezes and B. L. Cook, "Identification of Suicidal Behavior Among Psychiatrically Hospitalized Adolescents Using Natural Language Processing and Machine Learning of Electronic Health Records," Plos One, 2019.

P. Jain, K. R. Srinivas and A. Vichare, "Depression and Suicide Analysis Using Machine Learning and NLP," Journal of Physics: Conference Series, 2022.

S. Chakraborty, H. F. Mahdi, H. A. M. Al-Abyadh, K. Pant, A. Sharma and F. Ahmadi, "Large-Scale Textual Datasets and Deep Learning for the Prediction of Depressed Symptoms," Computational Intelligence and Neuroscience, vol. 2022, 2022.

H. Dinkel, M. Wu and K. Yu, "Text-based depression detection on sparse data," arXiv, 2020.

S. G. Burdisso, M. Errecalde and M. Montes-y-Gómez, "A Text Classification Framework for Simple and Effective Early Depression," 2019.

F. Cacheda, D. Fernández, F. J. Novoa and V. Carneiro, "Analysis and Experiments on Early Detection of Depression," 2018.

V. K. Gunjan, Y. Vijayalata, S. Valli, S. Kumar, M. O. Mohamed and V. Saravanan, "Machine Learning and Cloud-Based Knowledge Graphs to Recognize Suicidal Mental Tendencies," 2022.

J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” 2019.

A. Haque, V. Reddi, and T. Giallanza, “Deep Learning for Suicide and Depression Identification with Unsupervised Label Correction,” 2021.

L. McInnes, J. Healy, N. Saul, and L. Großberger, “UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction,” 2018.



  • There are currently no refbacks.

Office and Secretariat:

Big Data Research Centre
Puzzle Research Data Technology (Predatech)
Laboratory Building 1st Floor of Faculty of Science and Technology
UIN Sultan Syarif Kasim Riau

Jl. HR. Soebrantas KM. 18.5 No. 155 Pekanbaru Riau – 28293
Phone: 085275359942

Click Here for Information

Journal Indexing:

Google Scholar | ROAD | PKP Index | BASE | ESJI | General Impact Factor | Garuda | Moraref | One Search | Cite Factor | Crossref | WorldCat | Neliti  | SINTA | Dimensions | ICI Index Copernicus