Information Technology for Suicidal and Depressive Intentions Detection in social Networks Based on Logistic Regression, Multinomial Naive Bayes, Linear SVM and CNN
Keywords
Abstract
The article considers the current problem of developing and implementing automated systems for monitoring users' mental health in the digital environment. Given the rapid increase in cases of depressive disorders and suicidal intentions, which is recorded by the World Health Organization, there is an urgent need to create tools for early detection of psychological risks based on the analysis of text content of social networks and messengers. Special attention is paid to the specifics of the Ukrainian context in conditions of social instability, where the resources of medical institutions are limited. The purpose of the study is to develop an intelligent information and analytical platform MindGuard, which allows for deep analysis of texts to identify signs of depression, anxiety and suicidal behavior. To achieve this goal, a large-scale training corpus was formed and labeled, including over 340,000 examples of messages from the Reddit platform, distributed by categories: “non-psycho” (texts without signs of disorders), “depression” (depressive states), and “suicide” (suicidal intentions). Within the framework of the study, several approaches to text classification were implemented and compared: classical machine learning algorithms (Logistic Regression, Multinomial Naive Bayes, Linear SVM) using TF-IDF statistical weighting, as well as deep learning methods, in particular the TextCNN architecture using pre-trained GloVe embeddings. The results of the experimental evaluation showed that the CNN model provides the best balance between accuracy and computational efficiency. The achieved F1-scores are 0.92 for the class “non-psycho”, 0.74 for “depression” and 0.76 for “suicide”. High values of the ROC AUC metric (0.910–0.990) confirm the system’s ability to effectively rank texts by risk level. A detailed analysis of the inaccuracies matrices was conducted, which revealed lexical proximity between the categories of depression and suicidal thoughts, which causes the main difficulties in differentiating intermediate states. The practical implementation of the platform includes the development of a REST API based on FastAPI and a client part based on React. Performance testing confirmed the high speed of the system: the average latency is about 15 ms per request, which allows processing up to 66 texts per second on one CPU thread. This opens up opportunities for integrating MindGuard into the work of social media moderation teams, psychological services, and educational institutions to automate initial screening and timely adoption of preventive measures. The scientific novelty of the work lies in the creation of a hybrid architecture adapted to the local context, which ensures high accuracy in detecting psychologically risky messages in real time.
