Skip to content

Northeastern data scientist used social media and AI to detect PTSD symptoms in COVID-19 survivors

Anees Baqir, an assistant professor in data science, embarked on the project to help identify PTSD-like symptoms among those who tested positive for coronavirus during the pandemic.

A COVID test with a swab on top laying on a white surface.
Northeastern research used machine learning to pinpoint PTSD symptoms in tweets posted by COVID-sufferers. Photo by Matthew Modoono/Northeastern University

LONDON — A Northeastern University researcher is using social media and artificial intelligence to identify those experiencing trauma symptoms after contracting COVID-19.

Anees Baqir, an assistant professor in data science, used machine learning to analyze almost 4 million Twitter (now X) posts to identify users who said that they had coronavirus and later mentioned symptoms that indicate they could be suffering from post-traumatic stress disorder (PTSD).

Baqir and his team found that one of the machine learning models they trained was able to correctly classify whether a Twitter user’s post demonstrated signs of PTSD in more than 80% of cases.

The London-based data scientist said the results have the potential to help health practitioners to spot early warning signs of PTSD in patients.

PTSD is a type of anxiety disorder that can develop in individuals who have experienced a traumatic event or a life-altering experience. For Baqir, he saw that COVID-19 had the potential to trigger PTSD in sufferers but recognized that it is a condition that can go undiagnosed.

In the paper put together by him and six colleagues, “Identifying COVID-19 survivors living with post-traumatic stress disorder through machine learning on Twitter,” they state how “primary-care physicians frequently under-diagnose or undertreat PTSD, highlighting the potential benefits of computational approaches for early screening and diagnosis of depression and PTSD.”

“The idea behind this project,” Baqir told Northeastern Global News, “was to help provide early warning.

“Think of it in this way,” he continued. “If a patient might be coming to the NHS [the U.K.’s National Health Service] voluntarily at one point and you are asking them for some information about their past health, I think putting their responses through this machine learning model could help classify whether that patient is potentially high risk or not [of suffering from PTSD].

“And maybe that could mean speeding up your appointments for them or redirecting your resources to that person. The supervisory judgments will be made by the health professionals but the model can provide you with some judgments that can maybe help speed up the process.”

Northeastern Global News, in your inbox.

Sign up for NGN’s daily newsletter for news, discovery and analysis from around the world.

Baqir says it was his own experience during the pandemic that inspired him to embark on the project.

“When I started my Ph.D., it was during COVID and I was in isolation,” he says. “There was not a complete lockdown but I was still not seeing many people on the street or meeting anyone from university because there were restrictions in place. 

“And I wouldn’t say I was depressed or anything but I was not feeling comfortable at that point. So there was an article that I studied some time ago on identifying PTSD in cancer survivors. So that actually led me to start thinking about this and to work out if there is a way that we can say effectively that there might be some COVID survivors who might be going through PTSD.

“When you were diagnosed with the virus, you were in isolation for let’s say two weeks — completely isolated even from your family and often in just one room. So I thought there might well have been some effects on your mental health as well, apart from physical health, because at that point we didn’t know much. That’s why I started thinking that maybe this could be something to research.”

The research saw 3.96 million tweets collected from more than 90,000 anonymous users who mentioned on their Twitter timeline that they had tested positive for COVID between March 1, 2020, and Nov. 30, 2021.

Those users’ pandemic tweets were then analyzed to see whether they went on to mention feelings associated with a PTSD diagnosis, including reporting having nightmares, feeling irritable, engaging in avoidance behavior or experiencing anxiety, depression or even suicidal thoughts.

Tweets that mentioned having had COVID-19 as well as one of the PTSD keywords were considered to be “PTSD positive.” Posts that mentioned PTSD keywords but in relation to other events rather than COVID-19 were deemed “PTSD negative.”

After training different models to identify PTSD positive and PTSD negative tweets, one of the models used — the Support Vector Machine — was able to correctly classify PTSD positive and negative tweets in 83% of cases, according to their 14-page paper.