Automatic detection of suicidal ideation on social media using a hybrid CNN–BiLSTM architecture
Keywords:
Natural Language Processing, Suicidal Ideation, BiLSTM, Social Media, Data MiningAbstract
Suicide is a serious public health problem, responsible for more than 700,000 deaths annually worldwide, according to the World Health Organization. Early identification of signs of suicidal ideation can support prevention initiatives and reduce fatal outcomes. This study investigated the application of Natural Language Processing (NLP) and deep learning techniques for the automatic detection of suicidal ideation in social media posts. A hybrid architecture based on Bidirectional Long Short-Term Memory (BiLSTM), combined with convolutional layers and regularization strategies, was proposed. The evaluation was conducted on a Reddit dataset processed in two versions: with and without stopword removal. The results showed that the proposed architecture achieved high performance in both versions, reaching an accuracy of 95.77% and an F1-score of 95.79% on the test set without stopword removal. Despite the higher computational cost, this approach outperformed previous studies reported in the literature. In summary, the proposed model demonstrates potential to support early monitoring strategies for suicidal ideation in digital environments, offering a relevant contribution to public health and suicide prevention.
Downloads
References
World Health Organization, Suicide worldwide in 2021: global health estimates. World Health Organization, 2025, p. iv, 56. [Online]. Available: https://www.who.int/publications/i/item/9789240110069
C. Stavizki Junior, “Sofrimento Social e Racionalidade Neoliberal: Contextos, Instituições e Atores das Políticas de Prevenção do Suicídio no Estado do Rio Grande do Sul – Brasil”, Ph.D. dissertation, 2025. doi: 10.13140/RG.2.2.31160.46087.
H. Allam et al., “AI-Driven Mental Health Surveillance: Identifying Suicidal Ideation Through Machine Learning Techniques”, Big Data and Cognitive Computing, vol. 9, no. 1, p. 16, 2025. doi: 10.3390/bdcc9010016.
L. Silva, S. Peres, and C. Boscarioli, "Introdução a Mineração de Dados com aplicações em R.", Rio de Janeiro: Elsevier, 2016. 296 p. ISBN: 978-85-352-8446-1.
F. T. Fernandes and A. D. P. Chiavegatto Filho, “Perspectivas do uso de mineração de dados e aprendizado de máquina em saúde e segurança no trabalho”, Revista Brasileira de Saúde Ocupacional, vol. 44, p. e13, 2019. doi: 10.1590/2317-6369000019418.
M. A. Gualhano and A. P. V. Vasconcelos, “Análise dos cursos de licenciatura da Rede Federal utilizando mineração de dados”, Educação e Pesquisa, vol. 46, p. e219576, 2020. doi: 10.1590/S1678-4634202046219576.
M. Conway and D. O’Connor, “Social media, big data, and mental health: current advances and ethical implications”, Current Opinion in Psychology, vol. 9, pp. 77–82, 2016. doi: 10.1016/j.copsyc.2016.01.004.
L. Oliveira, C. Oliveira, L. Oliveira, and A. Pimentel. "Desafios no Ensino a Distância: Soluções Computacionais para a Aprendizagem Colaborativa com Computação Afetiva", in Anais do VIII Workshop de Desafios da Computação aplicada à Educação, Brasília, 2019, pp. 22-24, doi: https://doi.org/10.5753/desafie.2019.12185.
M. Bercht, “Computação Afetiva: vínculos com a psicologia e aplicações na educação”, Produções do III PSICOINFO e II JORNADA do NPPI, p. 106, 2006.
J. G. Brandão, “Mineração de opinião em mídias sociais com aprendizado de máquina”, M.S. thesis, Universidade Federal de Goiás, Goiânia, 2020. [Online]. Available: http://repositorio.bc.ufg.br/tede/handle/tede/11185
C. V. Sundermann, “Extração de contexto de reviews para sistemas de recomendação utilizando mineração de textos e opiniões”, Ph.D. dissertation, Universidade de São Paulo, São Carlos, 2019. doi: 10.11606/T.55.2020.tde-18032020-094344.
M. Gaur et al., “Characterization of time-variant and time-invariant assessment of suicidality on Reddit using C-SSRS”, PLOS ONE, vol. 16, no. 5, pp. 1-21, 2021. doi: 10.1371/journal.pone.0250448.
C. Spörl, E. Castro, and A. Luchiari, “APLICAÇÃO DE REDES NEURAIS ARTIFICIAIS NA CONSTRUÇÃO DE MODELOS DE FRAGILIDADE AMBIENTAL”, Revista do Departamento de Geografia, vol. 21, pp. 113–135, 2011. doi: 10.7154/RDG.2011.0021.0006.
L. Fleck et al., “Redes neurais artificiais: princípios básicos”, Revista Eletrônica Científica Inovação e Tecnologia, vol. 7, p. 47, 2016. doi: 10.3895/recit.v7.n15.4330.
D. K. F. Matsumoto et al., “Estudo em séries temporais financeiras utilizando redes neurais recorrentes”, 2019. [Online]. Available: http://www.repositorio.ufal.br/jspui/handle/riufal/6813
E. Figueiredo, “Classificação de sentimentos em textos de e-commerce utilizando redes neurais artificiais,” M.S. thesis, Universidade Estadual do Oeste do Paraná, Cascavel, PR, 2022. [Online]. Available: https://tede.unioeste.br/handle/tede/5924
S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory”, Neural Computation, vol. 9, no. 8, pp. 1735–1780, Nov. 1997. doi: 10.1162/neco.1997.9.8.1735.
K. Smagulova and A. P. James, “A survey on LSTM memristive neural network architectures and applications”, Eur. Phys. J. Spec. Top., vol. 228, pp. 2313–2324, 2019. doi: 10.1140/epjst/e2019-900046-x
J. Du, Q. Liu, K. Chen, and J. Wang, “Forecasting stock prices in two ways based on LSTM neural network”, in 2019 IEEE 3rd Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), 2019, pp. 1083–1086. doi: 10.1109/ITNEC.2019.8729026.
G. Santos, “Uma aplicação de redes neurais recorrentes do tipo LSTM à previsão dos preços de curto prazo do mercado de energia elétrica brasileiro”, M.S. thesis, Escola de Economia de São Paulo, 2019. [Online]. Available: https://hdl.handle.net/10438/28069
F. A. Gers, J. Schmidhuber, and F. Cummins, “Learning to Forget: Continual Prediction with LSTM”, Neural Computation, vol. 12, no. 10, pp. 2451–2471, 2000. doi: 10.1162/089976600300015015.
K. Greff, R. K. Srivastava, J. Koutník, B. R. Steunebrink, and J. Schmidhuber, “LSTM: A Search Space Odyssey”, IEEE Transactions on Neural Networks and Learning Systems, vol. 28, no. 10, pp. 2222–2232, 2017. doi: 10.1109/TNNLS.2016.2582924.
A. Graves and J. Schmidhuber, “Framewise phoneme classification with bidirectional LSTM and other neural network architectures”, Neural Networks, vol. 18, no. 5, pp. 602–610, 2005. doi: 10.1016/j.neunet.2005.06.042.
M. Birjali, A. Beni-Hssane, and M. Erritali, “Machine Learning and Semantic Sentiment Analysis based Algorithms for Suicide Sentiment Prediction in Social Networks”, Procedia Computer Science, vol. 113, pp. 65–72, 2017. doi: 10.1016/j.procs.2017.08.290.
Y. Lim and Y. Loo, “Characteristics of Multi-Class Suicide Risks Tweets Through Feature Extraction and Machine Learning Techniques”, JOIV : International Journal on Informatics Visualization, vol. 7, pp. 2297, 2023. doi: 10.62527/joiv.7.4.2284.
L. Cao, H. Zhang, X. Wang, and L. Feng, “Learning Users Inner Thoughts and Emotion Changes for Social Media Based Suicide Risk Detection”, IEEE Transactions on Affective Computing, vol. 14, no. 2, pp. 1280–1296, 2023. doi: 10.1109/TAFFC.2021.3116026.
K. Nikhileswar, D. Vishal, L. Sphoorthi, and S. Fathimabi, “Suicide Ideation Detection in Social Media Forums”, in 2021 2nd International Conference on Smart Electronics and Communication (ICOSEC), 2021, pp. 1741–1747. doi: 10.1109/ICOSEC51865.2021.9591887.
J. Li, S. Zhang, Y. Zhang, H. Lin, and J. Wang, “Multifeature Fusion Attention Network for Suicide Risk Assessment Based on Social Media: Algorithm Development and Validation”, JMIR Med Inform, vol. 9, no. 7, p. e28227, Jul. 2021. doi: 10.2196/28227.
H. Ghanadian, I. Nejadgholi, and H. Al Osman, “Improving Suicidal Ideation Detection in Social Media Posts: Topic Modeling and Synthetic Data Augmentation Approach”, JMIR Form Res, vol. 9, p. e63272, Jun. 2025. doi: 10.2196/63272.
U. Naseem, M. Khushi, J. Kim, and A. G. Dunn, “Hybrid Text Representation for Explainable Suicide Risk Identification on Social Media”, IEEE Transactions on Computational Social Systems, vol. 11, no. 4, pp. 4663–4672, 2024. doi: 10.1109/TCSS.2022.3184984.
R. Haque, N. Islam, M. Islam, and M. M. Ahsan, “A Comparative Analysis on Suicidal Ideation Detection Using NLP, Machine, and Deep Learning”, Technologies, vol. 10, no. 3, p. 57, 2022. doi: 10.3390/technologies10030057.
S. Ryu et al., “Detection of Suicide Attempters among Suicide Ideators Using Machine Learning”, Psychiatry Investig., vol. 16, no. 8, pp. 588–593, Aug. 2019. doi: 10.30773/pi.2019.06.19
M. M. Tadesse, H. Lin, B. Xu, and L. Yang, “Detection of Suicide Ideation in Social Media Forums Using Deep Learning”, Algorithms, vol. 13, no. 1, p. 7, 2020. doi: 10.3390/a13010007.
T. S. Gunawan et al., “Development of video-based emotion recognition using deep learning with google colab”, TELKOMNIKA (Telecommunication Computing Electronics and Control), vol. 18, no. 5, pp. 2463–2471, 2020. doi: 10.12928/telkomnika.v18i5.16717.
L. Cardozo and L. Freitas, “Análise de Sentimentos: Avaliando o Desempenho de Pré-Processamento e de Algoritmos de Aprendizagem de Máquina sobre o Dataset TweetSentBR”, in Anais do X Brazilian Workshop on Social Network Analysis and Mining, Evento Online, 2021, pp. 169–174. doi: 10.5753/brasnam.2021.16135.
W. S. Oliveira Júnior et al., “O uso de data augmentation como técnica para o aprimoramento de redes neurais a fim de detectar notícias falsas sobre a covid-19”, 2021. [Online]. Available: https://ri.ucsal.br/handle/prefix/4508.
V. R. Ferraz, “Análise de sentimentos e classificação multiclasse de textos aplicadas ao customer success”, 2020. [Online]. Available: https://dco-unesp-bauru.github.io/tcc-bcc-2020-1/ViniciusRF/thesis-ViniciusRF.pdf.
L. H. Aros et al., “Financial fraud detection through the application of machine learning techniques: a literature review”, Humanit Soc Sci Commun, vol. 11, p. 1130, 2024. doi: 10.1057/s41599-024-03606-0.
M. Rodríguez e B. Dantas Bezerra, “Processamento de Linguagem Natural para Reconhecimento de Entidades Nomeadas em Textos Jurídicos de Atos Administrativos (Portarias)”, REPA, vol. 5, no. 1, pp. 67-77, abr. 2020. doi: https://doi.org/10.25286/repa.v5i1.1204.
Y. Peng and M. H. Nagata, “An empirical overview of nonlinearity and overfitting in machine learning using COVID-19 data”, Chaos Solitons Fractals, vol. 139, p. 110055, Oct. 2020. doi: 10.1016/j.chaos.2020.110055.
J. M. Kernbach e V. E. Staartjes, "Foundations of Machine Learning-Based Clinical Prediction Modeling: Part II-Generalization and Overfitting", Acta Neurochir Suppl., vol. 134, pp. 15-21, 2022, doi: 10.1007/978-3-030-85292-4_3.