Analysis and Detection of Suicidal Ideation in Text Data Using Machine Learning
Authors
Student, Pillai College of Engineering, New Panvel (Autonomous), Mumbai University, Navi Mumbai, Maharashtra (India)
Professor, Department of Computer Engineering, Pillai College of Engineering, New Panvel (Autonomous), Navi Mumbai, Maharashtra, 410206 (India)
Article Information
DOI: 10.47772/IJRISS.2026.100600693
Subject Category: Linguistics
Volume/Issue: 10/6 | Page No: 9870-9889
Publication Timeline
Submitted: 2026-06-12
Accepted: 2026-06-18
Published: 2026-07-03
Abstract
Research Background: Suicidal ideation is a major public health concern that affects millions of individuals worldwide and can lead to severe psychological consequences if not identified at an early stage. The increasing availability of user-generated textual content on social media and online platforms provides an opportunity to develop automated systems for detecting suicide-related risk factors through natural language analysis.
Objective: This study aims to analyze and detect suicidal ideation in text data using machine learning techniques and to identify the most effective model for accurate, interpretable, and scalable mental health screening.
Methods: A balanced dataset consisting of approximately 232,000 text posts obtained from Kaggle was utilized for experimentation. The proposed framework employed a four-stage pipeline involving data preprocessing, feature extraction using Term Frequency–Inverse Document Frequency (TF-IDF), model training, and evaluation. Three machine learning algorithms—Logistic Regression (LR), Linear Support Vector Machine (SVM), and Naive Bayes (NB)—were implemented and optimized using Grid Search CV. Performance was assessed using accuracy, precision, recall, F1-score, confusion matrix analysis, and cross-validation techniques.
Results: The experimental results demonstrated that Logistic Regression achieved the best overall performance with an accuracy of 90.2% and an F1-score of 90.2%. Linear SVM achieved the highest recall of 92.1%, making it highly effective in identifying potential suicidal cases and reducing false negatives. Naive Bayes exhibited the fastest execution time while maintaining competitive classification performance. Feature importance analysis identified terms such as “hopeless” and “alone” as strong predictors of suicidal ideation.
Conclusion: The findings indicate that traditional machine learning models can provide accurate, interpretable, and computationally efficient solutions for suicidal ideation detection. The proposed framework demonstrates significant potential for real-time mental health monitoring and suicide prevention systems. Future work will focus on integrating real-time data sources and conducting clinical validation studies to enhance practical deployment.
Keywords
Suicidal Ideation Detection, Machine Learning, Natural Language Processing (NLP), Logistic Regression, Mental Health Analytics.
Downloads
References
1. Aziz, Mohammad Tarek, Tanjim Mahmud, Md Faisal Bin Abdul Aziz, Md Abu Bakar Siddick, Md Maskat Sharif, Mohammad Shahadat Hossain, and Karl Andersson. "Textual and numerical data fusion for depression detection: A machine learning framework." [Google Scholar] [Crossref]
2. Indonesian Journal of Electrical Engineering and Computer Science 38, no. 2 (2025): 1231- [Google Scholar] [Crossref]
3. Lho, Silvia Kyungjin, Sang-Cheol Park, Hahyun Lee, Da Young Oh, Hyeonjin Kim, Soomin Jang, Hee Yeon Jung, So Young Yoo, Su Mi Park, and Jun-Young Lee. "Large Language Models and Text Embeddings for Detecting Depression and Suicide in Patient Narratives." JAMA Network Open 8, no. 5 (2025): e2511922-e2511922. [Google Scholar] [Crossref]
4. Shuvo, Tonmoy Alam. "Machine learning-based prediction of suicidal ideation, plans, and attempts among school-going adolescents." Informatics and Health 2, no. 2 (2025): 143- [Google Scholar] [Crossref]
5. Prelog, Polona Rus, Teodora Matić, Peter Pregelj, and Aleksander Sadikov. "Validation of a machine learning model for indirect screening of suicidal ideation in the general population." Scientific Reports 15, no. 1 (2025): 6579. [Google Scholar] [Crossref]
6. Jacobs, Molly M., Anne V. Kirby, Jessica M. Kramer, and Nicole M. Marlow. "A machine learning analysis of suicidal ideation and suicide attempt among US youth and young adults from multilevel, longitudinal survey data." Frontiers in Psychiatry 16 (2025): 1511966. [Google Scholar] [Crossref]
7. Amirthayogam Gnanasekaran, Anbu Ananth Chinnasamy, Elango Parasuraman, Analyzing the QoS prediction for web service recommendation using time series forecasting with deep learning techniques. Concurrency Computat Pract Exper. 2022; e7356. doi: 10.1002/cpe.7356 [Google Scholar] [Crossref]
8. K.N. Asha and R. Rajkumar. Cross domain and adversarial learning based deep learning approach for web recommendation. International Journal of Critical Infrastructures. Vol. 20, No. 4 August 23, 2024, pp 341-355. https://doi.org/10.1504/IJCIS.2024.140556 [Google Scholar] [Crossref]
9. Asha K.N. and R. Rajkumar, 2023. DCF-MLSTM: a deep security content-based filtering scheme using multiplicative BiLSTM for movie recommendation system. International Journal of System of Systems Engineering 13(1), 66-82 [Google Scholar] [Crossref]
10. V. Rekha, L. V. Reddy, S. V. Chaudhari, A. Gopi, C. Nithiya and S. Khaleel Ahamed, "Automated Deep Learning with Wavelet Neural Network based Rice Plant Classification," 2023 International Conference on Intelligent Data Communication Technologies and Internet of Things (IDCIoT), Bengaluru, India, 2023, pp. 345-350, doi: 10.1109/IDCIoT56793.2023.10053487. [Google Scholar] [Crossref]
11. Mohana Priya. C, et al. (2023). Customized Semantic Segmentation for Enhanced Disease Detection of Maize Leaf Images. International Journal on Recent and Innovation Trends in Computing and Communication, 11(11), 31–37. https://doi.org/10.17762/ijritcc.v11i11.9074 [Google Scholar] [Crossref]
12. C. Radhiya Devi, S. K. Jayanthi 2023. DCNMAF: Dilated Convolution Neural Network Model with Mixed Activation Functions for Image De-Noising. International Journal of Intelligent Systems and Applications in Engineering. 11(4) 552–557. [Google Scholar] [Crossref]
13. Shiva Shankar Reddy, Vetukuri Venkata Siva Rama Raju, Chigurupati Ravi Swaroop, Neelima Pilli. Evaluation of deep learning models for melanoma image classification. International Journal of Public Health Science (IJPHS), 12(3), September 2023, pp. 1189- 1199. [Google Scholar] [Crossref]
14. Shiva Shankar, R., Priyadarshini, V., Neelima P. and Janaki Devi, M. Sentiment Analysis For Improving Quality Of Products And Services By Using Deep Learning. ARPN Journal of Engineering and Applied Sciences, 2022, 17(12). [Google Scholar] [Crossref]
15. Anvekar, P., Anand Gudnavar, K. Naregal and S. Nagarmunoli (2024) Detection of Manipulated Multimedia in Digital Forensics Using Machine Learning. 2024 2nd International Conference on Device Intelligence, Computing and Communication Technologies (DICCT), Dehradun, India, pp. 33-38, doi: 10.1109/DICCT61038.2024.10533016. [Google Scholar] [Crossref]
16. SA Vajiha Begum, M Pushpa Rani – “Recognition of neurodegenerative diseases with gait patterns using double feature extraction methods” - IEEE - 2020 4th International Conference on Intelligent Computing and Control Systems (ICICCS), Pg. No: 332-338, 2020/5/13. [Google Scholar] [Crossref]
17. Shingade SD, Mudhalwadkar RP. Sensor information-based crop recommendation system using machine learning for the fertile regions of Maharashtra. Concurrency Computat Pract Exper. 2023; 35(23): e7774. doi: 10.1002/cpe.7774 [Google Scholar] [Crossref]
18. Dr. Sarita V Balshetwar, Dr. Bharati P. Vasgi, Dr. Girija Gireesh Chiddarwar, “Customer recommendation and notification using artificial intelligence and machine learning” Neuroquantology, September 2022, Volume 20, Issue 11, Page 3840-3846, DOI: [Google Scholar] [Crossref]
19. 10.14704/nq.2022.20.11.NQ66385,link:http://neuroquantology.com/issue.php?volume=28&issue=133&page=39 [Google Scholar] [Crossref]
20. Dr. Girija Gireesh Chiddarwar, Dr. Sarita V Balshetwar, Dr. Bharati P. Vasgi, Blockchain based record date management system using artificial intelligence, Neuroquantology, September 2022, Volume 20, Issue 11 DOI: 10.14704/nq.2022.20.11. [Google Scholar] [Crossref]
21. NQ66386 link: http://neuroquantology.com/issue.php?volume=28&issue=133&page=39 [Google Scholar] [Crossref]
22. Harjasdeep Singh, Dr. Durgesh Srivastava, Sentiment Analysis: Quantitative Evaluation of Machine Learning Algorithms, Proceedings of the 5th International Conference on Smart Systems and Inventive Technology (ICSSIT 2023) DVD Part Number: CFP23P17-DVD; ISBN: 978-1-6654-7466-5 [Google Scholar] [Crossref]
23. Patitapaban Rath, “Noise removal from 3D Meshes: An efficient approach”, International Journal of Circuit, Computing and Networking 2020; 1(2): 19-21. [Google Scholar] [Crossref]
24. Qadir, Sarvech, Ashwaq Alsoubai, Jinkyung Katie Park, Naima Samreen Ali, Munmun De Choudhury, and Pamela Wisniewski. "Triaging Casual From Critical—Leveraging Machine Learning to Detect Self-Harm and Suicide Risks for Youth on Social Media: Algorithm Development and Validation Study." JMIR Mental Health 13, no. 1 (2026): e76051. [Google Scholar] [Crossref]
25. Allam, Hesham, Chris Davison, Faisal Kalota, Edward Lazaros, and David Hua. "AI-Driven Mental Health Surveillance: Identifying Suicidal Ideation Through Machine Learning Techniques." Big Data and Cognitive Computing 9, no. 1 (2025): 16. [Google Scholar] [Crossref]
26. Zuberi, Anas Habib, Ambreen Anees, Naziya Anjum, Ajaz Husain Warsi, Pervez Rauf Khan, [Google Scholar] [Crossref]
27. S. K. Singh, N. K. Singh, R. Singh, S. H. Abbas, and R. Ranjan. "Machine Learning- Based Sentiment Analysis for Suicide Prevention and Mental Health Monitoring in Educational Institutions." Journal of Neonatal Surgery 14, no. 5s (2025). [Google Scholar] [Crossref]
28. Baydili, İsmail, Burak Tasci, and Gülay Tasci. "Deep learning-based detection of depression and suicidal tendencies in social media data with feature selection." Behavioral Sciences 15, no. 3 (2025): 352. [Google Scholar] [Crossref]
29. Bouktif, Salah, Akib Mohi Ud Din Khanday, and Ali Ouni. "Explainable predictive model for suicidal ideation during COVID-19: Social media discourse study." Journal of Medical Internet Research 27 (2025): e65434. [Google Scholar] [Crossref]
30. Balakrishnan, Vimala, Deepiga Loganathamoorthy, Ramesh Kumar Ayyasamy, and Saadat M. Alhashmi. "Online suicide ideation detection (OnSIDe): a context-aware transfer learning approach using BERT-CNN." PeerJ Computer Science 11 (2025): e3239. [Google Scholar] [Crossref]
31. Darveshwala, Asfakahemad, Vidita Patel, Kaushal Sharma, and Ramizraja Shethwala. "Enhancing Suicide Detection via Chi-Square-Based Feature Selection and Machine Learning." Metallurgical and Materials Engineering 31, no. 4 (2025): 386-393. [Google Scholar] [Crossref]
32. Alghazzawi, Daniyal, Hayat Ullah, Naila Tabassum, Sahar K. Badri, and Muhammad Zubair Asghar. "Explainable AI-based suicidal and non-suicidal ideations detection from social media text with enhanced ensemble technique." Scientific Reports 15, no. 1 (2025): 1111. [Google Scholar] [Crossref]
33. Thomas, Julia, Antonia Lucht, Jacob Segler, Richard Wundrack, Marcel Miché, Roselind Lieb, Lars Kuchinke, and Gunther Meinlschmidt. "An Explainable Artificial Intelligence Text Classifier for Suicidality Prediction in Youth Crisis Text Line Users: Development and Validation Study." JMIR Public Health and Surveillance 11 (2025): e63809. [Google Scholar] [Crossref]
34. Ghanadian, Hamideh, Isar Nejadgholi, and Hussein Al Osman. "Improving Suicidal Ideation Detection in Social Media Posts: Topic Modeling and Synthetic Data Augmentation Approach." JMIR Formative Research 9 (2025): e63272. [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- Synonymy in the Songs of Ummaru Bagobiri: A Contextual Linguistics Analysis
- Aspect of Compounding and Affixation in Bassa-Nge
- Kinayah (Metonymy) in Malay: An Analysis Based on the Science of Balaghah
- Optimality Theory: Application of Dahl’s law in Kindia
- Selling Diversity: The Politics of Representation in Global Advertising