Towards Preemptive Detection of Depression and Anxiety in T witter (2020)

Abstract: Depression and anxiety are psychiatric disorders that are observed in many areas of everyday life. For example, these disorders manifest themselves somewhat frequently in texts written by nondiagnosed users in social media. However, detecting users with these conditions is not a straightforward task as they may not explicitly talk about their mental state, and if they do, contextual cues such as immediacy must be taken into account. When available, linguistic flags pointing to probable anxiety or depression could be used by medical experts to write better guidelines and treatments. In this paper, we develop a dataset designed to foster research in depression and anxiety detection in Twitter, framing the detection task as a binary tweet classification problem. We then apply state-of-the-art classification models to this dataset, providing a competitive set of baselines alongside qualitative error analysis. Our results show that language models perform reasonably well, and better than more traditional baselines. Nonetheless, there is clear room for improvement, particularly with unbalanced training sets and in cases where seemingly obvious linguistic cues (keywords) are used counter-intuitively.

## introduction mental illnesses are psychiatric disorders that may cause sufferers significant distress and impair their ability to function in social and work activities @xcite . the most prevalent mental illnesses are depression and anxiety, which are estimated to affect nearly one in ten people worldwide (676 million) according to a recent study @xcite . while depression and anxiety are different disorders, they also share symptoms and, thus, clinicians often diagnose patients with both illnesses at consultation. 1 identifying these conditions at early stages is relevant not only because of their inherent importance, but also because they are precursors to major related concerns in public health including self-harm (centers for disease @xcite , making timely diagnosis and treatment even more essential. however, sufferers of depression and anxiety can find that it takes great courage and strength to seek professional treatment @xcite . they may also be afraid to confide in their peers due to the stigma of mental illness @xcite . with reluctance to seek professional treatment or rely on their peers, sufferers often turn to online resources for support. these include both specialised and general communities, with twitter and reddit @xcite being paramount examples of the latter. because of this, systems that can automatically detect and flag such cases at a large-scale are highly desirable @xcite . they may enable prompt analysis and treatment, which is crucial in the early development of such conditions. moreover, the interpersonal and economic effects of these illnesses may be mitigated with prompt intervention @xcite . in this paper, we build a classification dataset 2 to assist in the detection of depression and anxiety in twitter, and compare several text classification baselines. the results show that state-of-the-art language models (lms henceforth) like bert @xcite unsurprisingly outperform competing baselines. however, when the dataset shows an unbalanced distribution, linear models perform on par. finally, alongside quantitative results, we also provide a qualitative analysis through which we aim to better understand the strengths and limitations of the models under study. further, we identify the linguistic patterns alluding to the presence of depression and anxiety that elude all of the classifiers, and consider how we might improve performance against such patterns in the future. in terms of detecting depression and anxiety in social media, the work of @xcite is perhaps the most related to ours. they showed that depression among reddit participants can be detected by identifying certain lexical and psycholinguistic features in the contents of their reddit postings. these features include indications of negative psychological processes such as anger and sadness, which may be denoted by the words "hate" and "grief" respectively @xcite . the work of yates et al. is therefore highly relevant to ours since it concerns automated detection of mental illness in written social media discourse. however, there are three key aspects that set our paper apart, namely: (1) we identify users of social media platforms who appear to have not yet been diagnosed with mental illness. we do this in the spirit of providing the opportunity for early healthcare intervention in these cases; (2) we consider automated classification using feature rich representations of users' online postings using stateof-the-art nlp methods such as word embeddings and pre-trained lms; and (3) we consider concise written discourse in the form of tweets, rather than reddit postings, which are generally more verbose. ## dataset construction in this section, we describe our process for building a dataset for detecting depression and anxiety in twitter. we describe the tweet collection procedure (section 3.1), annotation (section 3.2), and provide information about the inter-annotator agreement (section 3.3). ## experimental evaluation in the following we detail the experimental setting (section 4.1) and then present the results (section 4.2) and an analysis (section 4.3). ## conclusion and future work in this paper, we have presented an experimental evaluation for detecting depression and anxiety in social media. we have developed a dataset, datd, for predicting depression and anxiety in twitter. using this dataset we have run a comparative analysis of pre-trained lms and traditional linear models. not surprisingly, lms performed relatively well on this task with a balanced set, but they do not outperform lighter-weight methods when the training data is unbalanced. given the relatively small size of the dataset, we have also performed a qualitative analysis to identify areas for improvement. since these automatic models are intended for use by medical experts future work could involve collaboration with them. moreover, classifier performance must be measured and certified versus large, heterogeneous datasets before adoption in healthcare is likely to be considered @xcite . collaboration may serve mental health experts to better understand social media at a large-scale, and to develop better guidelines and treatments. finally, we are also planning to extend this work to develop a dataset with finer grained distinctions, similar to @xcite for cognitive distortion schemas.