Social media platforms could play a significant role in the diagnosis and treatment of mental health issues. Qntfy, a company that researches the connection between technology, data analytics and mental health, has developed a method of interpreting social media activity through natural language processing and sentiment analysis. The data collected could provide clearer insights into the mental health of individuals and help doctors to more accurately treat them.
Currently, mental health assessments are limited to infrequent, formal interactions with the healthcare system. Patients are asked to describe interactions and situations of relevance to their treatment, which can often be difficult for them to recall. Similar to a wearable tracking steps, using social media to track a patient’s in-the-moment interactions (social media posts, events they did/did not attend, language choices etc.), eliminates the significant gaps between patient-doctor visits.
Figure 1: Example of an individual’s interactions with the health care system (red hashes) and Facebook social media posts (blue hashes)
“With this system, healthcare providers can assess data from the patient’s daily life in the real world to help identify challenges and patterns that may only be revealed via social media posts and actions,” said Glen Coppersmith, founder and CEO at Qntfy. “This may also help determine whether current mental health interventions are proving effective.”
By implementing a branch of natural language processing into the model – sentiment analysis – the research team was able to establish methods that can determine, at scale, whether components of an analyzed social media post are more positive or negative in tone.
The sentiment analysis models used are adapted from an industry-standard model called VADER sentiment analysis (Valence Aware Dictionary and sEntiment Reasoner).1
“Put simply, the model contains dictionary words with positive and negative weights; a word like “terrible” is more negative, and “wonderful” is more positive,” said Patrick Crutchley, data scientist at Qntfy. “It also takes into account negation – so “not good” is negative – and intensity – “kinda bad” isn’t as negative as “really bad”. From this, we get normalized scores for a social media post, such as a tweet, being overall positive, neutral or negative.”
In order to create key performance indicators for mental health, the team will soon implement Qntfy’s emotion classifiers to produce fine-grained classifications such as anger, joy and fear. Currently, they are developing methods based on deep learning and large-scale reviews to train sentiment and emotion models to understand much larger vocabularies than those used in normal lexicon methods like VADER sentiment analysis.2
In a test study, Qntfy recruited a technology company to assess the model. By applying the model to the company’s internal communication channels – internal chat, file-sharing, etc. – they produced a probability distribution of the three labels for each message (positive, neutral, negative). This allowed the team to aggregate all messages sent on a given day by summing the probabilities associated with each outcome, creating a barometer for the mix of emotions expressed by individuals in the company.
The results were as expected, confirming the accuracy of the new and improved VADER model. A generated report (figure 2) shows increased positive sentiment around the holidays and after a major software release, while they expressed negative sentiment leading up to major deadlines.
Figure 2: Example of company results. Positive sentiment is on top, with negative sentiment on the bottom. Major deadlines are dotted lines, and major holidays are dashed lines.
“Because the models used in this research are the base technology for a wide range of applications, access to additional data will enable us to test the applicability of these models in other related mental health areas such as anxiety and eating disorders,” said Coppersmith.
Going forward, Qntfy hopes to use individuals’ donated data to build datasets that enable scientific research across larger populations. For instance, with enough data from individuals suffering from a mental illness, researchers could uncover subtle patterns in language and activity that could be used to compare against those currently being tested.
“There is a larger role for technology and data analytics to play in our mental health interventions and awareness,” said Coppersmith. “We are technologists and data scientists, most of whom have had their lives touched in some way by mental health matters.”
For more information on sentiment analysis, visit IEEE Xplore.
- VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text (by C.J. Hutto and Eric Gilbert). Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014.
- Coppersmith, G., Ngo, K., Leary, R., & Wood, A. (2016). Exploratory Analysis of Social Media Prior to a Suicide Attempt. In CLPsych @ HLT-NAACL (pp. 106-117).