A two-stage symptom detection model was developed to more accurately identify depression signs in social media posts

17 Mar 2026

Depression is a health condition characterized by changes in mood, cognition, and behavior. According to the World Health Organization (WHO), the Philippines had one of the highest rates of depression in 2017, affecting 3.3 million Filipinos. WHO projects that by 2030, depression will become the leading contributor to the global burden of disease.

This study developed a depression detection tool through language and behavior in social media. Since language can reveal how a person feels, this research built a tool that looks at online posts, specifically Twitter (now called X), to identify signs of depression more accurately using machine learning methods. There are two stages of detection: the first stage checks if depression symptoms exist, and the second stage identifies the depression symptom category present for both the Filipino and English languages.

A data set composed of 86,163 tweets categorized according to depression symptoms was used to train the model. Use of words, how people behave on Twitter, and signs of psychological distress were also considered. The first stage classifies a tweet as showing “Depression Symptom” or “No Symptom.” If a symptom is present, it is further classified into any of these six categories in the second stage: “Mind and Sleep,” “Appetite,” “Substance use,” “Suicidal tendencies,” “Pain,” and “Emotion”. The output of the two-stage model resulted in accuracies of 91% for stage 1 and 83% for stage 2. The use behavior and linguistic features of the post, however, did not significantly improve the accuracy of the depression detection in tweets.

This tool can be used to complement mental health support provided by clinicians to screen for potential symptoms and can be useful for public health efforts to reach more people who may need help. While the system is not perfect and has limitations such as understanding sarcasm or less common patterns, it offers a promising way to enhance depression detection through technology.

With the increasing prevalence of depression worldwide, technology-based interventions can be leveraged to provide timely and scalable tools for depression detection. Early intervention and detection are important in depression cases (Halfin, 2007), and research focused on symptom detection can facilitate a proactive and personalized approach to care. This research can pave the way for clinical practice integration by enabling real-time monitoring and detection, or during clinical interviews, to provide a list of symptoms during consultations.

Use of an open-source framework will enable application of the algorithm to other data sets, and can be applied to develop detection algorithms for other languages. The detection model can be expanded in public health initiatives by deployment in web-based systems that will run the algorithm using a social media Application Programming Interface (API) or simple text input, making it widely available. This can provide a cost-efficient intervention to help public health institutions with a high-level assessment tool to gain insights into the mental status of the population during periods of high stress (e.g., calamities).

Authors: Faye Beatriz Tumaliuan, Lorelie Grepo and Eugene Rex Jalao (all from the Department of Industrial Engineering and Operations Research, College of Engineering, University of the Philippines Diliman)

Read the full paper: https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2024.1399395/full

Image by Lucas Pezeta from Pexels

A two-stage symptom detection model was developed to more accurately identify depression signs in social media posts

Depression is a health condition characterized by changes in mood, cognition, and behavior. According to the World Health Organization (WHO), the Philippines had one of the highest rates of depression in 2017, affecting 3.3 million Filipinos. WHO projects that by 2030, depression will become the leading contributor to the global burden of disease.

This study developed a depression detection tool through language and behavior in social media. Since language can reveal how a person feels, this research built a tool that looks at online posts, specifically Twitter (now called X), to identify signs of depression more accurately using machine learning methods. There are two stages of detection: the first stage checks if depression symptoms exist, and the second stage identifies the depression symptom category present for both the Filipino and English languages.

A data set composed of 86,163 tweets categorized according to depression symptoms was used to train the model. Use of words, how people behave on Twitter, and signs of psychological distress were also considered. The first stage classifies a tweet as showing “Depression Symptom” or “No Symptom.” If a symptom is present, it is further classified into any of these six categories in the second stage: “Mind and Sleep,” “Appetite,” “Substance use,” “Suicidal tendencies,” “Pain,” and “Emotion”. The output of the two-stage model resulted in accuracies of 91% for stage 1 and 83% for stage 2. The use behavior and linguistic features of the post, however, did not significantly improve the accuracy of the depression detection in tweets.

This tool can be used to complement mental health support provided by clinicians to screen for potential symptoms and can be useful for public health efforts to reach more people who may need help. While the system is not perfect and has limitations such as understanding sarcasm or less common patterns, it offers a promising way to enhance depression detection through technology.

With the increasing prevalence of depression worldwide, technology-based interventions can be leveraged to provide timely and scalable tools for depression detection. Early intervention and detection are important in depression cases (Halfin, 2007), and research focused on symptom detection can facilitate a proactive and personalized approach to care. This research can pave the way for clinical practice integration by enabling real-time monitoring and detection, or during clinical interviews, to provide a list of symptoms during consultations.

Use of an open-source framework will enable application of the algorithm to other data sets, and can be applied to develop detection algorithms for other languages. The detection model can be expanded in public health initiatives by deployment in web-based systems that will run the algorithm using a social media Application Programming Interface (API) or simple text input, making it widely available. This can provide a cost-efficient intervention to help public health institutions with a high-level assessment tool to gain insights into the mental status of the population during periods of high stress (e.g., calamities).

Authors: Faye Beatriz Tumaliuan, Lorelie Grepo and Eugene Rex Jalao (all from the Department of Industrial Engineering and Operations Research, College of Engineering, University of the Philippines Diliman)

Read the full paper: https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2024.1399395/full

Image by Lucas Pezeta from Pexels