Assessing population-level symptoms of anxiety, depression, and suicide risk in real time using NLP applied to social media data (2020)

Abstract: Prevailing methods for assessing population-level mental health require costly collection of large samples of data through instruments such as surveys, and are thus slow to reflect current, rapidly changing social conditions. This constrains how easily population-level mental health data can be integrated into health and policy decision-making. Here, we demonstrate that natural language processing applied to publicly-available social media data can provide real-time estimates of psychological distress in the population (specifically, English-speaking Twitter users in the US). We examine population-level changes in linguistic correlates of mental health symptoms in response to the COVID-19 pandemic and to the killing of George Floyd. As a case study, we focus on social media data from healthcare providers, compared to a control sample. Our results provide a concrete demonstration of how the tools of computational social science can be applied to provide real-time or near-real-time insight into the impact of public events on mental health.

## introduction measurements of the mental health of large populations often become quickly outdated, given traditional techniques for data collection, analysis, and dissemination. for example, estimates of suicide rates in the united states are often delayed by two years @xcite . more up-to-date information about populationlevel mental health could provide clinicians and other decision-makers with crucial warning signals of shifts in mental health or burgeoning public health crises. continuous access to sound estimates of population-level mental health variables could also provide a mechanism for evaluating community-level interventions. the dramatic social upheavals of 2020 provide a visceral illustration of how specific communities are psychologically affected by specific events. for example, the covid-19 pandemic, which took root in the united states in february and march of 2020, in addition to threatening the health of a broad swath of the population, placed particularly heavy demands on healthcare providers charged with responding to a highly contagious and deadly novel virus, often under resource-constrained circumstances. anecdotal reports made it clear that the surge in cases-coupled with factors such as underfunded clinics and lack of a coordinated federal response-was leading to acute psychological distress and burnout among healthcare providers such as nurses and physicians. in addition, the killing of george floyd on may 25, 2020 elicited nationwide responses of grief and anger, and is widely believed to have surfaced latent psychological trauma in large swaths of the american and international population. in both instances, we saw that there was and is no scalable technique for collecting population-scale data to quantify changes in mental health over time, to ask which segments of the population are most severely affected by the situation, or to determine which psychological symptoms are changing in prevalence and therefore what interventions should be prioritized by the community. here, we focus on healthcare providers (hcps) as a case study, and present a framework for monitoring signs of psychological distress in a continuous, scalable, and ethical fashion @xcite using public social media data. we use models of anxiety, depression, and suicide risk, trained on a separate data source, to produce longitudinal es-timates of the prevalence of symptoms associated with these conditions among hcps and a comparison sample. the model-derived estimates of symptom prevalence show relative changes in mental health aligned with the timing of events related to covid-19 and the killing of george floyd among hcps in the us. for example, we were able to observe the particularly negative impact of the covid-19 pandemic across the population. furthermore, we find no evidence that rescinding stay-at-home orders reversed the deleterious effects of the pandemic on mental health, nor do we find evidence that either healthcare workers or the general population had returned to their respective pre-covid levels of anxiety, depression, and suicide risk at the time of writing. moreover, we find evidence that the killing of george floyd and subsequent civil unrest across the united states had a measurably deleterious effect on all aspects of mental health measured in both the hcp and control populations. these findings constitute, we believe, a persuasive proof of concept for the use of transparently and ethically collected social media data in providing aggregated, real-time, population-level estimates of emotional and psychological distress, extending the capabilities of what is commonly known as infoveillance @xcite @xcite . (for a review of different approaches to assessing population-level mental health, see @xcite ) we believe the data collection and modeling techniques reported here can inform and improve public and private efforts to promote population-level mental health. ## data all analyses were performed using public social media data collected from twitter between january 1 and june 1, 2020. analyses are based on two groups: healthcare professionals and a community sample group. healthcare professionals (hcps, @xmath0, 040) are comprised of providers working directly with patients (e.g., nurses, doctors) and those in adjacent roles (e.g., epidemiologists and hospital administrators). users were geo-located using self-stated location in the user profile, and only us-based users were included in the analysis. in order to determine which individuals in our sample were hcps, we used tech-niques modeled on those reported by @xcite , who automatically identify profession and other fine-grained social roles on the basis of selfdisclosure. here, we manually constructed a corpus of hcp professional labels (e.g., "physician", "doctor", "nurse", "rn") and searched for strings containing these labels in contexts demonstrated by @xcite to indicate that the author identifies with that role (e.g., "i'm a ", "as a i think"). this classification was then manually assessed by human annotators and found to have a 95% true positive rate. the control sample used in these analyses comprise a sample of the general population in the united states (henceforth community, @xmath1, 000) that did not self-identify as hcps, selected randomly from users for whom geographic data was available (either through a geotagging algorithm or disclosure of their location in their public profile). users with fewer than 100 posts between the start of the year until the end of may were excluded from the analysis. ## methods we estimate the impact of various national events in 2020 on population mental health. to do so, we compare measures of average anxiety, depression and suicide risk before and after each event. we will refer to the "pre-lockdown baseline" as the time period from january 1-february 29. the national emergency declaration from the white house came on march 13, 2020, and many stayat-home orders were put in place around that time. we define "early lockdown" as march 15 to march 31, as it signifies a time when people were adjusting to the changes induced by the lockdown including job loss, homeschooling, and working from home. we refer to the period of april 15 to april 30 as "mid lockdown". 1 states took a varied approach to lifting lockdown restrictions, and each followed their own timeline. we suspect the lifting of stay-at-home guidance may have impacted people's mental health, and obtained the state-specific dates on which those orders were lifted. on may 25, george floyd was killed in police custody, setting off protests and unrest across the united states. we examine one week prior to and after his death (may 18-25; may 26-june 2). we use classification models, trained on sepa-rate data sets from the one described above, to score each tweet in the sample with an estimate of the probability that tweet was authored by a person experiencing anxiety or depression or who had attempted suicide. the labels used in the training were derived via self-stated diagnosis: a user was considered to be living with anxiety, depression, or suicidality if they explicitly reported that they had received a diagnosis of an anxiety disorder or depression or had previously attempted suicide, respectively. examples of self-statements include disclosures such as, "as a person who has been diagnosed with general anxiety disorder, i can tell you...", "today marks one year since i tried to take my own life". self-statements were found using manually constructed search terms and regular expressions; we then confirmed their plausibility and validity using human annotators with clinical training. logistic regression with character n-gram features were trained on three separate samples (anxiety, depression, suicide) to distinguish users with a self-stated mental health diagnosis from control users reporting no such diagnoses. we employed the same models reported in our previous work, using the anxiety and depression models from @xcite and the suicide model from @xcite . auc scores for the anxiety, depression, and suicide models were .84, .72, and .73, respectively. for each measure (anxiety, depression, suicide), we computed the mean of all messages per user per day. each user is thus represented as the mean of their per-day estimates. this allows for matched-sample t-tests between time periods, and independent t-tests between groups within the same time period. user data was de-identified prior to being submitted to these models, and all statistical analysis was conducted over aggregated user data. ## results baseline scores for each mental health variable were higher (i.e., more severe) for hcps than the community population. this suggests that, prior to covid-19 lockdowns, hcps were experiencing anxiety, depression, and suicide risk at higher rates than the general population (@xmath2.001; note that the figure below, for the sake of comparison, shows by-group z-scores so that this pre-lockdown difference is not apparent). to get a sense of how each event affected each group relative to their pre-lockdown baseline, we calculated by-group z-scores from this baseline. this is illustrated in figure 1 , along with the time periods under consideration. first, note that every time period after lockdown exhibits higher scores for all mental health conditions we examined. furthermore, the killing of george floyd appears to have had a significant effect on mental health across all groups. longitudinal changes in depression for hcps and community do not differ reliably (@xmath3.1). hcps exhibit less change in their anxiety over time compared to community (though hcps are still at a higher base-rate of anxiety). interestingly, hcps show a larger change in suicide-related risk during early lockdown. this disappears in mid lockdown and gets closer to returning to baseline rates towards the end of may (note, again, that baseline rates for hcps remain higher than for community). ## discussion real-time information about the population's mental health is critically important, especially in times of crisis. our work is relevant to government agencies or other organizations with the resources to craft population-scale public health interventions or policy recommendations. the current study provides a proof of concept of how publicly available social media data might be used to assess population-level mental health in a way that could support these organizations. we hasten to emphasize that this work represents a proof of concept, and raises several questions for future research. first, the population of social media users does not perfectly mirror the general population, and it is plausible that those who do not engage in social media were affected differently by covid and the killing of george floyd. we can only speculate about how such a bias might influence our results. second, we did not correct for population demographic rates in the creation of the community group, but did take care to capture a geographically diverse population. finally, in future work we plan to explore how the outputs of the models reported here can be continuously calibrated and refined using psychometrically validated clinical scales of constructs such as anxiety and depression. we take it as uncontroversial that using methods of the general kind employed here to measure phenomena as complex as anxiety, depression, and suicide will demand extensive collaboration and iteration. ## conclusion we have demonstrated the ability to assess population-level mental health constructs in real time, based on publicly available social media data. quick access to this information could allow lawmakers, mental health practitioners, and others to determine what type of interventions are needed, and where, in the face of rapidly changing conditions. harnessing this kind of information may be critical to our recovery from covid-19, and in allowing skillful responses to future crises.