You are now in the main content area

INNOVATION
Issue 43: Fall 2025

Analyzing social media posts with AI can assist in diagnosing depression

360 Degrees

Analyzing social media posts with AI can assist in diagnosing depression

Multiple exposures of a young woman with a cell phone in each hand. Her shadow is depicted in different colours.

This article contains content about depression symptoms and self-harm.

What if it were possible to accurately detect, or even predict, the signs of depression sooner and more easily? As global rates of depression and mental illness continue to rise, early intervention could be crucial in controlling an individual’s symptoms or preventing instances of self-harm.

Recent estimates by the Institute for Health Metrics and Evaluation suggest some 332 million people worldwide suffer from depressive disorder, characterized by persistent sadness and a loss of interest in things they once enjoyed. Individual symptoms vary, but often affect our appetite, sleep and ability to concentrate, significantly impacting activities including work and school.

Identifying depression is typically done through personal interviews with clinicians. However, the traditional method presents several challenges, such as cost and accessibility, plus a time-consuming process that doesn’t always account for an individual’s short-term changes in mood.

In light of those barriers, there is a growing need for support tools to assist with timely diagnoses and referrals for those in need. 

New research from Toronto Metropolitan University (TMU) seeks to improve both the accuracy and efficiency of mental health decision-making by identifying relevant clues from our behaviour on social media networks. The project is co-authored by professor Nancy Yang, from the Department of Information Technology Management at TMU’s Ted Rogers School of Management.

As social media has permanently shifted our pattern of daily communication, the things people say on such platforms can offer new perspectives on mental health and well-being.

“Social media is where people talk about how they feel in real time,” professor Yang said. “They share what they're thinking with their family and friends, or their social network.”

The researchers developed a novel language framework that uses machine learning and natural language processing to analyze social media posts and interactions in search of patterns linked with depression. 

Professor Yang acknowledges her research must address and overcome privacy concerns in order to be effective. She also stresses that the framework isn’t intended to replace the conventional process of diagnosing depression, but could help complement and inform it.

“It would become a source of information, a knowledge base the clinician can refer to to better diagnose,” professor Yang said. 

The impact of that knowledge could result in several meaningful outcomes for patients, potentially increasing both the speed and accuracy of diagnoses while also facilitating timely referrals and early interventions.

Professor Yang and her colleague used their framework to analyze almost 200,000 Facebook status updates from 1,047 anonymous users. Their dataset also included each user’s replies to a common screening questionnaire used to diagnose depression, allowing the sample group to be split between those who showed signs of depression and those who didn’t.

Next, the two sets of Facebook posts were studied in search of different “emotion words,” such as “illness” or “love.” The researchers compiled the top 30 words for both positive and negative emotion, and compared the average intensity of the two groups. The word choices of users with depression (such as “hate,” “hurt,” “sad,” and “alone”) showed significant intensities in emotions from sadness and anger to fear and disgust.

“If we can have clear, comparable language patterns from these two groups, we can use that pattern to identify people who are at risk of getting depressed, but may not even realize it,” professor Yang said.

Besides studying the specific words used in social media posts, the framework also examines the influence of interactions within a user’s online community.

“I not only look at the language people use, but also how this language may impact others,” professor Yang explained. “These social interactions are a way to see whether your depressed and non-depressed friends have some positive or negative influence on you. That's something a lot of studies don’t consider.”

Read the paper, "Psychological and Behavioral Insights From Social Media Users: Natural Language Processing–Based Quantitative Study on Mental Well-Being (external link, opens in new window) ," in JMIR Formative Research.

Social media is where people talk about how they feel in real time. They share what they’re thinking with their family and friends.