Scientists build machine learning model for detecting early signs of depression in text

Computer algorithm that identifies linguistic clues could help health professionals diagnose and treat depression sooner.

200723-depression-ai-banner.jpg

A new machine learning model can detect signs of depression in written text, including on Twitter, according to a new study by U of A computing scientists. (Photo: Getty Images)

A new machine learning model can detect early signs of depression in written text like Twitter posts, according to a study by University of Alberta computing scientists.

"The outcome of our study is that we can build useful predictive models that can accurately identify depressive language," said graduate student Nawshad Farruque, who designed the model to identify linguistic clues in everyday communication. "While we are using the model to identify depressive language on Twitter, (it) can be easily applied to text from other domains for detecting depression."

The English-language model was developed using samples of writing by individuals who identify as depressed on online depression forums. The machine learning algorithm was then trained to identify depressive language in tweets.

"This is the first study to show that depressive language has a specific linguistic representation," said Farruque. "We demonstrate that it is possible to identify it, transfer it and further use it for depressive language detection tasks."

Farruque noted there are many potential applications, from detecting signs of depression earlier to helping clinicians monitor the effectiveness of treatment for their patients over time.

"Our algorithm could be integrated with a chatbot that talks with seniors and can flag signs of loneliness and depression," he added. "Another potential application could be to monitor the messages of high-school students to identify whether they are suffering from depression."

Farruque completed the research under the supervision of computing scientists Osmar Zaïane, who is the director of the Alberta Machine Intelligence Institute (AMII), and Randy Goebel, an AMII fellow.

Funding for the research was provided by AMII and the Natural Sciences and Engineering Research Council of Canada.

The study, "Augmenting Semantic Representation of Depressive Language: From Forums to Microblogs," was published at the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases.