Literature DB >> 26306253

Mining Twitter Data to Improve Detection of Schizophrenia.

Kimberly McManus1, Emily K Mallory1, Rachel L Goldfeder1, Winston A Haynes1, Jonathan D Tatum1.   

Abstract

Individuals who suffer from schizophrenia comprise I percent of the United States population and are four times more likely to die of suicide than the general US population. Identification of at-risk individuals with schizophrenia is challenging when they do not seek treatment. Microblogging platforms allow users to share their thoughts and emotions with the world in short snippets of text. In this work, we leveraged the large corpus of Twitter posts and machine-learning methodologies to detect individuals with schizophrenia. Using features from tweets such as emoticon use, posting time of day, and dictionary terms, we trained, built, and validated several machine learning models. Our support vector machine model achieved the best performance with 92% precision and 71% recall on the held-out test set. Additionally, we built a web application that dynamically displays summary statistics between cohorts. This enables outreach to undiagnosed individuals, improved physician diagnoses, and destigmatization of schizophrenia.

Entities:  

Year:  2015        PMID: 26306253      PMCID: PMC4525233     

Source DB:  PubMed          Journal:  AMIA Jt Summits Transl Sci Proc


Background

Individuals who suffer from schizophrenia comprise I percent of the United States population and are four times more likely to die of suicide than the general US population.1 Schizophrenia presents as a combination of positive and negative symptoms. Positive symptoms, including hallucinations, delusions, and thought disorders, generally develop between the ages of 16 and 30, with earlier onset in men than women.2 Negative symptoms, those that “disrupt normal emotions and behaviors”, include an inability to finish tasks and a lack of emotions and/or speech and may be misdiagnosed as depression or other disorders. Schizophrenia affects men and women equally and is found in several ethnicities at similar rates. Despite the high prevalence of schizophrenia, there is a lack of broad discussion about the disease, especially when compared to other, less prevalent disorders.3 Schizophrenia can have numerous debilitating consequences (e.g., individually, socially, economically) if left untreated. Individuals with schizophrenia are at an increased risk for suicide, homelessness, and incarceration, with 6% of individuals with schizophrenia are either homeless or live in a shelter and another 6% are incarcerated.3 This negatively impacts the afflicted individual and their family, and leads to an increased economic burden. In the US, the majority of individuals with schizophrenia in prison were found guilty of non-serious charges, most often caused by lack of treatment.4 Treatment for schizophrenia effectively reduces symptoms and improves quality of life; however, nearly 50% of afflicted individuals remain untreated, mostly due to a lack of awareness for their illness.5 This lack of awareness hinders individuals from seeking treatment, which in turn makes the identification of individuals with schizophrenia challenging. Microblogging is a general term for a form of social media where users share abbreviated messages. Prominent examples of microblogging include Twitter, Facebook, Sina Weibo, Google+, and Tumblr. An estimated 73% of adults use some form of social media.6 In our analysis, we focus on Twitter, which, as of January 2014, has 645 million active users generating 58 million tweets (Twitter posts) every day.7 Twitter posts are a maximum of 140 characters in length and can include photographs and/or links. Twitter use is particularly prevalent in individuals between the ages of 18 and 30 (31% usage), which overlaps with the standard onset age for schizophrenia.8 Sentiment analysis is the identification of mood characteristics from textual word usage.9–11 In particular, paranoia shows specific language patterns which can be detected using sentiment analysis.11 Several groups have developed straightforward and effective adaptations of existing sentiment analysis approaches for analyzing sentiment using tweets.13–15 Features of Twitter text, including the use of hashtags and emoticons, can also be mined for fine-tuned sentiment analysis.16 Table 1 summarizes existing approaches for identifying depression based on social media presence. Across these studies, the manual curation required for identifying a depressed cohort was a major challenge. Additionally, feature identification for input into the machine learning models required careful consideration. In particular, social interactions and micro-blog usage patterns were useful traits that are not included in traditional sentiment analysis. BlueFriends draws on the methodologies detailed above to visualize the percentage of a user’s Facebook friends that show signs of depression, with the goal of reducing the stigma of depression.17
Table 1.

Approaches for classifying depression using social media.

RefMediaCohort AcquisitionFeaturesApproachResults
18,19TwitterClinical depression surveysInteractions, emoticons, vocabulary, drugs, linguistic style, behaviorsSupport vector machine0.74 precision 0.63 recall
20Bulletin boardsProzac post, doctor curationVocabulary2-step support vector machine0.82 accuracy AUC 0.88
21SinaPsychologist curationPronoun use, emoticons. interactions, behaviorsWeka, BayesNet0.91 accuracy AUC 0.90
While applications of machine learning algorithms to microblog and other online posts have been successful for identifying depression, further work is needed to show applicability of microblog posts to other mental disorders. Schizophrenia provides a distinct challenge from depression due to its heterogeneous presentation. In this work, we built a framework to distinguish individuals with schizophrenia from control individuals using Twitter data. Furthermore, we provide a web application for interrogation of our results.

Methods

We identified a cohort of Twitter users who self-identify, as part of their user profile or Twitter posts, as having schizophrenia (cases) and another group of Twitter users who do not self-identify as having any mental disorder (controls). All data is from English-speaking users and was extracted in April 2014. We defined a user as self-identifying with schizophrenia if two or more of the following held: the user self-identifies in user description: the user self-identifies in status updates; the user follows @schizotribe, a known Twitter community of users with schizophrenia. We utilized the Twitter API to extract relevant English-speaking users and status updates. We utilized the Twitter API’s 1% random stream, a random 1% sample of statuses as they are posted, and manually curated Twitter posts to define the control set of Twitter users. To control for potential biases of users posting at particular times of day, we extracted users every two hours (from 9am–5pm PST) throughout one day. All potential control Twitter accounts were also manually curated. Spam accounts and accounts where a user self-identified with any mental disorder were excluded from the control group. From this initial set of control users, we developed a second, smaller control group [Table S2] by matching the age distribution of our cohort of users with schizophrenia. Twitter does not explicitly save the ages and genders of users, so user accounts were manually curated for this information. With this set of 96 cases and 200 controls, we used Twitter data, data processing techniques, and machine learning techniques to discover patterns of Twitter usage. We first extracted features from the Twitter text and usage patterns, selected a reduced set of these features, trained several machine learning models, and evaluated the performance of these models [Figure 1].
Figure 1.

Analysis workflow for feature extraction, model building, and evaluation.

In order to distinguish Twitter users with schizophrenia from controls, we extracted a set of features from each user’s profile and posting history. The feature set was largely derived from one shown to work well in the classification of users with depression [Figure 1, Left].18,19 Additionally, we added more refined features for describing emoticon use and the use of schizophrenia-related words [Supplementary Methods]. We used the Natural Language Toolkit (NLTK) for Python to perform tokenization and lemmatization, before extracting textual features and NumPy for generating the final numeric feature vectors.22,23 The final 28 numerical features included: number of Twitter followers and number of followed users, proportion of tweets using schizophrenia-related words, emoticon usage, posting time of day, and posting rate [Tables S1–S4]. To include information about posting time and posting rate, we chose to use quantiles of the users’ distributions of tweet time of day and the delay between tweets [Table S2]. We observed that these distributions were not Gaussian at the population level, so we suspected that using quantiles would provide a more stable signal. We chose the median, upper and lower quartiles, and the 10th and 90th percentile of each distribution to provide estimates of both central events and events in the tails of the distribution. In addition to the raw feature vectors, we tested two transformations of the feature vectors for each of the models: log scaling of the delay between tweets and Principal Components Analysis (PCA).24 We trained several classification models with complementary strengths and weaknesses [Figure 1, Middle, Supplementary Methods]. These models included Naive Bayes (NB), artificial neural networks (ANNs), and support vector machines (SVMs).25,26 The specific feature set used by the model and the hyperparameters of that model were tuned using 5-fold cross validation on the training data. We separated the data into an 80% training set and 20% held-out test set for model tuning and evaluation. To provide a less biased estimate, tuning was performed exclusively on the training set and final performance is reported on the test set. Performance of tuned models was evaluated by calculating accuracy, precision, recall, and the F1 score [Figure 1, Right] on the held-out set. Precision and recall represent the goals of maintaining a low false positive rate and a low false negative rate, respectively, whereas the F1 score gives a single metric for precision and recall that is high when both of these values are high.

Results

We identified 96 users who met the criteria to be included in the case cohort. We developed two cohorts of controls. Our initial control cohort had about five times the number of users as our case cohort. During the curation process, we noticed a large difference in the age distribution of our cases and initial control group. Therefore, we created a control group subset that more closely matched the age distribution of the cases. This age matched control group still lacks users older than 30 due to the low quantity of older users in the initial control group. Interestingly, this age distribution correction inadvertently also corrected for the increased proportion of females in the initial cohort. SVM using the PCA transformed data performed the best in terms of F1 score and precision, and ANN using the PCA transformed features performing similarly, scoring slightly higher in recall [Figure 2]. It is worth noting that reducing the number of principal components used did not improve performance of the models. Given the number of features relative to the size of our data set, the models were able to fit the training data adequately with 28 features.
Figure 2.

5-Fold cross validation results.

NB using the log transformed data had the third highest F1 score and provides intuition about relative feature importance. Under the assumptions of the NB model, the most important features of the model are: frequency of tweets with schizophrenia related words, time between tweets, happy emoticon usage, tweet time of day, and tweet frequency in the morning. Table 2 presents the performance of our trained models on unseen data. Since these data are unseen during the model building, these values are lower than observed on the cross-validation data in Figure 2. The precision of SVM is high compared to both other models and related works using similar methodologies. As seen in cross validation, ANN has better recall, but worse precision. NB again performs worse, but is still reasonably high performing.
Table 2.

Testing data results.

ModelPrecisionRecallAccuracyF1
SVM + PCA0.9230.7060.8930.800
ANN + PCA0.8130.7650.8750.788
NB + Log0.6880.6470.8030.667
We developed an intuitive web application, available at https://hayneswa.shinyapps.io/twitterCohort/, which enables public interactions with the data and analysis results [Figure S2, Supplementary Results]. The web application generates dynamic output that is immediately responsive to user input changes. The interface renders an assortment of plots, which illustrate properties such as vocabulary use, time of day usage patterns, summary statistics (tweet length, number of users followed, etc), and word clouds that show commonly used terms. Notably, our interface is generalizable to other Twitter cohort analyses.

Discussion

One of the most important features, according to the NB model, is the frequency of tweets with schizophrenia related words. We note this word set does not include any variant of “schizophrenia” and thus should not be confounded by our self-identification method of selecting schizophrenia cases. Interestingly, happy emoticon usage also appears more common in our schizophrenia cases. This is converse to what we originally expected, as individuals with schizophrenia are known to present decreased outward emotion. However, studies have shown that, though afflicted individuals lack outward emotion, they report feeling emotions at least as strongly as control individuals. Thus, social media may provide a unique outlet of emotion for individuals with schizophrenia and would be an interesting complement to current research.27,28 Other important features are temporal: lime between tweets, tweet time of day, and tweet frequency in the morning. We find that the frequency of tweets in the early morning hours is higher, indicating that Twitter users with schizophrenia tend to tweet earlier than the general Twitter population. Lastly, the 90th and 75th percentile of time between tweets is larger in our cases, indicating afflicted users generally exhibit larger gaps between tweets. Our best performing model was a SVM with PCA transformed features. Interestingly, this model also performed best in a similar study on depression and Twitter data.18,19 The two best performing models, based on the F1 score, both involve PCA transformed features. This makes sense as we have a feature set including highly correlated features (e.g. time percentiles), and PCA produces a representation with linearly uncorrelated features.29 This study has a few limitations. First of all, our case cohort contains individuals who identify as having schizophrenia on Twitter. By including users with self-identified schizophrenia, the study will be biased toward detecting diagnosed individuals. However, this is still an at-risk demographic as many people with schizophrenia do not continue medication use. Future work will include criteria to find undiagnosed individuals with a Twitter account that can be used for the undiagnosed classification task. Additionally, we eliminated variables that were explicitly used to identify individuals with schizophrenia on Twitter. There may be some bias in using only public profiles. If there is a meaningful difference between public and private users with schizophrenia, we will be unable to incorporate it into our models. As control users were identified via the Twitter API’s 1% random stream, they may also be biased toward users who are currently active. While our sample size of 296 Twitter users limits the applicability of our results to a broader population, we intend this as a pilot study for the application of social media platforms to the identification of at-risk individuals. In future work, this sample size should be increased in order to draw stronger conclusions. In future studies we will explore additional machine learning and topic modeling methods. We acknowledge the possibility that users in the control group self-identify with mental disorders that they do not discuss on Twitter. In the future and with IRB approval, we could increase the accuracy of these groups by connecting Twitter accounts with external validation of psychological status, such as through surveys or medical records. By discovering microblogging tendencies that distinguish individuals with schizophrenia from the general population, we were able to mine Twitter data to identify individuals with schizophrenia. This identification has the potential to enable outreach to untreated or undiagnosed individuals. Quick, automatic identification is a huge improvement on the current process for diagnoses where individuals are diagnosed on an individual basis during a clinic visit or led to treatment by a friend, colleague or loved one. Identifying users who have schizophrenic microblogging tendencies enables other groups to develop communities and provide outreach to affected individuals. Additionally, increasing awareness of the prevalence of schizophrenia can help destigmatize the disease. Finally, this work enables clinicians to incorporate Twitter posts into a diagnostic tool for diagnosing schizophrenia on an individual level. Together, this will lead to an increase in the number of individuals with schizophrenia receiving treatment, which will in turn improve their quality of life.

Conclusion

This novel synthesis of sentiment analysis techniques with large-scale Twitter data allowed us to identify previously undescribed schizophrenic microblogging tendencies and accurately classify Twitter users with schizophrenia and control users. Our analysis included a cohort of 96 twitter users with schizophrenia and 200 age-matched controls. We used an SVM to separate the cohorts based on their Twitter usage patterns with 92% precision. Finally, we created an interactive data visualization tool, which is generalizable to other projects, to look at the results. This work will have great impact on the identification of individuals with schizophrenia.
  5 in total

1.  Emotion in Schizophrenia: Where Feeling Meets Thinking.

Authors:  Ann M Kring; Janelle M Caponigro
Journal:  Curr Dir Psychol Sci       Date:  2010-08

2.  The prevalence and correlates of untreated serious mental illness.

Authors:  R C Kessler; P A Berglund; M L Bruce; J R Koch; E M Laska; P J Leaf; R W Manderscheid; R A Rosenheck; E E Walters; P S Wang
Journal:  Health Serv Res       Date:  2001-12       Impact factor: 3.402

Review 3.  Suicide and schizophrenia: a systematic review of rates and risk factors.

Authors:  Kahyee Hor; Mark Taylor
Journal:  J Psychopharmacol       Date:  2010-11       Impact factor: 4.153

4.  The language of paranoia.

Authors:  T E Oxman; S D Rosenberg; G J Tucker
Journal:  Am J Psychiatry       Date:  1982-03       Impact factor: 18.112

Review 5.  Emotional response deficits in schizophrenia: insights from affective science.

Authors:  Ann M Kring; Erin K Moran
Journal:  Schizophr Bull       Date:  2008-06-25       Impact factor: 9.306

  5 in total
  13 in total

1.  Online Communication about Depression and Anxiety among Twitter Users with Schizophrenia: Preliminary Findings to Inform a Digital Phenotype Using Social Media.

Authors:  Yulin Hswen; John A Naslund; John S Brownstein; Jared B Hawkins
Journal:  Psychiatr Q       Date:  2018-09

2.  Identifying personal health experience tweets with deep neural networks.

Authors:  Ravish Gupta; Matrika Gupta; Ricardo A Calix; Gordon R Bernard
Journal:  Conf Proc IEEE Eng Med Biol Soc       Date:  2017-07

3.  Better care through better use of data in GP-patient partnerships.

Authors:  Benjamin Brown; Liam Smeeth; Tjeerd van Staa; Iain Buchan
Journal:  Br J Gen Pract       Date:  2017-02       Impact factor: 5.386

Review 4.  An examination of the language construct in NIMH's research domain criteria: Time for reconceptualization!

Authors:  Brita Elvevåg; Alex S Cohen; Maria K Wolters; Heather C Whalley; Viktoria-Eleni Gountouna; Ksenia A Kuznetsova; Andrew R Watson; Kristin K Nicodemus
Journal:  Am J Med Genet B Neuropsychiatr Genet       Date:  2016-03-10       Impact factor: 3.568

5.  A Collaborative Approach to Identifying Social Media Markers of Schizophrenia by Employing Machine Learning and Clinical Appraisals.

Authors:  Michael L Birnbaum; Sindhu Kiranmai Ernala; Asra F Rizvi; Munmun De Choudhury; John M Kane
Journal:  J Med Internet Res       Date:  2017-08-14       Impact factor: 5.428

6.  Detecting relapse in youth with psychotic disorders utilizing patient-generated and patient-contributed digital data from Facebook.

Authors:  M L Birnbaum; S K Ernala; A F Rizvi; E Arenare; A R Van Meter; M De Choudhury; J M Kane
Journal:  NPJ Schizophr       Date:  2019-10-07

7.  A Psycholinguistic Analysis of Responses to Live-Stream Suicides on Social Media.

Authors:  Ang Li; Dongdong Jiao; Xingyun Liu; Jiumo Sun; Tingshao Zhu
Journal:  Int J Environ Res Public Health       Date:  2019-08-09       Impact factor: 3.390

Review 8.  Schizophrenia: A Survey of Artificial Intelligence Techniques Applied to Detection and Classification.

Authors:  Joel Weijia Lai; Candice Ke En Ang; U Rajendra Acharya; Kang Hao Cheong
Journal:  Int J Environ Res Public Health       Date:  2021-06-05       Impact factor: 3.390

9.  Psychopathology-a Precision Tool in Need of Re-sharpening.

Authors:  Frauke Schultze-Lutter; Stefanie J Schmidt; Anastasia Theodoridou
Journal:  Front Psychiatry       Date:  2018-09-19       Impact factor: 4.157

Review 10.  Methods in predictive techniques for mental health status on social media: a critical review.

Authors:  Stevie Chancellor; Munmun De Choudhury
Journal:  NPJ Digit Med       Date:  2020-03-24
View more

北京卡尤迪生物科技股份有限公司 © 2022-2023.