Detection of the Prodromal Phase of Bipolar Disorder from Psychological and Phonological Aspects in Social Media
Yen-Hao Huang Lin-Hung Wei Yi-Shin Chen
cs.IR













  National Tsing Hua University

  Hsinchu 
  Taiwan 
  30013

yenhao0218@gmail.com



  National Tsing Hua University
  Hsinchu 
  Taiwan 
  30013

adeline80916@gmail.com



  National Tsing Hua University
  Hsinchu 
  Taiwan 
  30013

yishin@gmail.com

































































Seven out of ten people with bipolar disorder are initially misdiagnosed and thirty percent of individuals with bipolar disorder will commit suicide. Identifying the early phases of the disorder is one of the key components for reducing the full development of the disorder.
In this study, we aim at leveraging the data from social media to design predictive models, which utilize the psychological and phonological features, to determine the onset period of bipolar disorder and provide insights on its prodrome.
This study makes these discoveries possible by employing a novel data collection process, coined as Time-specific Subconscious Crowdsourcing, which helps collect a reliable dataset that supplements diagnosis information from people suffering from bipolar disorder.
Our experimental results demonstrate that the proposed models could greatly contribute to the regular assessments of people with bipolar disorder, which is important in the primary care setting.











<ccs2012>
 <concept>
  <concept_id>10010520.10010553.10010562</concept_id>
  <concept_desc>Computer systems organization Embedded systems</concept_desc>
  <concept_significance>500</concept_significance>
 </concept>
 <concept>
  <concept_id>10010520.10010575.10010755</concept_id>
  <concept_desc>Computer systems organization Redundancy</concept_desc>
  <concept_significance>300</concept_significance>
 </concept>
 <concept>
  <concept_id>10010520.10010553.10010554</concept_id>
  <concept_desc>Computer systems organization Robotics</concept_desc>
  <concept_significance>100</concept_significance>
 </concept>
 <concept>
  <concept_id>10003033.10003083.10003095</concept_id>
  <concept_desc>Networks Network reliability</concept_desc>
  <concept_significance>100</concept_significance>
 </concept>
</ccs2012>  











Detection of the Prodromal Phase of Bipolar Disorder from Psychological and Phonological Aspects in Social Media
    Yi-Shin Chen
    
================================================================================================================





§ INTRODUCTION


Bipolar disorder (BD) is a common mental illness characterized by recurrent episodes of mania/hypomania and depression, which is found among all ages, races, ethnic groups and social classes. 
The regular assessment of people with BD is an important part of its treatment, though it may be very time-consuming <cit.>.
There are many beneficial treatments for the patients, particularly for delaying relapses.
The identification of early symptoms is significant for allowing early intervention and reducing the multiple adverse consequences of a full-blown episode.
Despite the importance of the detection of prodromal symptoms, there are very few studies that have actually examined the ability of relatives to detect these symptoms in BD patients. <cit.> 
For the purpose of early treatment, the challenge leads to: how to identify the prodrome period of BD.
Current studies are thus aimed at detecting prodromes and analyzing the prodromal symptoms of manic recurrence in clinics.

With regards to the symptom of social isolation, people are increasingly turning to popular social media, such as Facebook and Twitter, to share their illness experiences or seek advice from others with similar mental health conditions.
As the information is being shared in public, people are subconsciously providing rich contents about their states of mind.
In this paper, we refer to this sharing and data collection as time-specific subconscious crowdsourcing.

In this study, we carefully look at patients who have been diagnosed with BD and who explicitly indicate the diagnosis and time of diagnosis on Twitter.
Our goal is to both predict whether BD rises on a given period of time, and to discover the prodromal period for BD. 
It's important to clarify that our goal doesn't seek to offer a diagnosis but rather to make a prediction of which users are likely to be suffering
from the BD. The main contributions of our work are:

  
  * Introducing the concept of time-specific subconscious crowdsourcing, which can aid in locating the social network behavior data of BD patients with the corresponding time of diagnosis.
  
  * A BD assessment mechanism that differentiates between prodromal symptoms and acute symptoms.
  
  * Introducing the phonological features into the assessment mechanism, which allows for the possibility to assess patients through text only.
  
  * An automatic recognition approach that detects the possible prodromal period for BD.





§ RELATED WORK


Social media resources have been widely utilized by researchers to study mental health issues.
The following literature emphasizes on data collection and feature engineering, including subject recruitment, manual data collection, data collection applications, keyword matching, and combined approaches. 
The clinical approach for mental disorders and prodrome studies are also discussed in this section.

Subject recruitment: Based on customized questionnaires and contact with subjects, Park et al. <cit.> recruited participants for the Center for Epidemiologic Studies Depression scale(CES-D) <cit.> and provided their Twitter data.
By analyzing the information contained in tweets, participants were divided into normal and depressive groups based on their scores on CES-D.
An approach like this one requires expensive costs to acquire data and conduct the questionnaire.

Manual and automatic data collecting: Moreno 
et al. <cit.> collected data via the Facebook profiles of college students reviewed by two investigators. They aimed at revealing the relationship between demographic factors and depression.
Similarly, in our work, we invest on manual efforts to collect and properly annotate our dataset.
In addition, there are many applications built on top of social networks that provide free services where users may need to input their credentials and profile information in exchange for interesting analytics or insights.
These applications need to be well-designed to attract users, otherwise it is difficult to focus on a specific type of user. 

Keywords matching: Coppersmith et al. <cit.> made use of regular expressions in social media posts.
For instance, a user who states “I was diagnosed with X” is identified as a patient who has mental illness X. 
With this approach, people diagnosed with different illnesses are collected separately.
Although this keyword matching provides a higher precision with regards to detecting true positives, the strict filter makes the number of matched users very small.
In our approach, we also employ keyword matching, but the keywords are more flexible.
Additionally, Coppersmith et al. <cit.> focused on linguistic features and patterns of life features (specific for social network behaviors) to build a predictive model for mental disorders.

Combined approach: Some previous studies have combined the above approaches to accumulate desirable data. De Choudhury <cit.> used a two-stage approach to collect Twitter data from mothers of newborns. 
First, the mothers were selected by matching keywords related to birth announcements in tweets.
Second, the manual verification task was delegated to Amazon's Mechanical Turk to improve the reliability of data.
For postpartum depression, a statistical model was built by using linguistic features, a social graph, and engagement in social networking websites. 

Subconscious crowdsourcing: Chang et al. <cit.> focused on collecting high-quantity data. 
Their approach combines manual and automatic efforts by manually filtering possible mentally ill users from patient participation groups and user profiles on Twitter.
With this approach, highly self-aware users are selected, which is not one of our objectives.
Inspired by Chang et al.s' approach, however, we take the advantage of keyword matching to maximize the resources found on Twitter.

Clinical approach: For the study of prodromal features there have been several retrospective works <cit.> that have found that the majority of BD patients experience symptoms such as episodic mood changes, irritability, or impulsivity before the onset of the first episode of BD. 
Sahoo et al. <cit.> tracked the recurrence of patients, proceeded with the self-diagnosis of DSM-IV (The Diagnostic and Statistical Manual of Mental Disorders, Fourth Edition), and pointed out the difficulty of patients' self-awareness.
Meter et al. <cit.> also surveyed prodromes and underlined the importance of a sleeping monitor, physical activity, and family attention.

The previously mentioned findings certainly support the existence of a prodromal phase.
Nevertheless, these studies may have been influenced by a recall bias. 
Furthermore, most clinical studies mainly focus on patients found in hospitals, which cost substantially and leave the problem of late diagnosis unsolved.

Among the aforementioned researches on social media, none focus on the detection of the acute and prodromal phases of a mental disorder. 
Clinical researchers have dived into the details of prodromes, providing many traceable features. 
However, for some recurrent mental disorders, it is difficult to closely monitor the mental status of a patient in person after they leave the clinic, even though regular assessment is important in a primary care setting. 
In our work, we commit to seeking resources on social media platforms and propose an approach using linguistics, behavioral, and clinical features.




























§ METHODOLOGY










 §.§ Overviews




The objective of this paper is to recognize the prodromal phases of bipolar disorder by linguistic and phonological features.
Given a user at a specific time as the input, the recognition system can perform a regular assessment of BD.
The problem is formally defined as follows:


Given a specific time s, a time frame α, and a user k, we can collect a set of tweets Γ^(k)_s,α = {ω^(k)_t | t ∈  [s- α, s]} and derive the model f with the objective to map the set Γ^(k)_s,α to a BD onset probability l^(k)_s,α = f(Γ^(k)_s,α), which is a number in [0,1], where 0 denotes no onset of BD and 1 denotes a full onset.













Since BD is a recurrent mental illness and the onset symptoms are intermittent on a monthly basis, identifying its possible prodromal phases from social media data becomes a challenging task. 
Our solution introduces the time of diagnosis of the illness to our recognition model.
The time of diagnosis specifies the exact date when the person was diagnosed as a patient with BD by a certified psychiatrist.
Based on the discussion above, assumption  <ref> is made.


When people are diagnosed with BD, the signs and symptoms are observable.



Our proposed prodromal recognition method is called Illness Behavior Inference.
Its core contribution is the BD onset predictive model(BDOPM), a supervised learning process that predicts the BD onset probability given the following information: time s, user k, tweets Γ^(k)_s,α, time frame α, and is optimized by the time of diagnosis τ^(k).  



















Not only is this predictive model able to capture the acute phases of bipolar disorder, but can also recognize the different behaviors for a BD patient over time given a time of diagnosis indicator τ.
The construction of the BD onset predictive model is divided into five stages:


  * Time-specific Subconscious Crowdsourcing


  * Time-domain Modeling


  * Psychological Feature Extraction

  * Phonological Feature Extraction

  * Model Construction and Evaluation





 §.§ Time-specific Subconscious Crowdsourcing



As social media reflect a mirror aspect of real life, people widely share their feelings, moods, and opinions on them.
The subconscious crowdsourcing <cit.>, as implied by the term subconscious, indicates that people are unaware and subconsciously providing information, including their mental status.
Users with mental illnesses share their common experiences, such as mania behavior or relapses of an illness.
This behavior represents the concept of the term crowdsourcing.
We can reduce the cost of data collection by accessing information that is richly stored in social media platforms.

Since our task is to cope with the recurrent characteristic of BD, every user cannot be regarded as an onset patient with BD the whole time.
In this stage, we provide four steps for retrieving and collecting a list of BD patients and their time of diagnosis τ by combining automatic matching with manual efforts.




  §.§.§ Target Seeking
 
To efficiently retrieve the targeting dataset without losing too much information, we perform an automatic process—a minimum keyword search—on the platform to obtain related information, followed by labeling with the search keys.
The minimum keyword search procedure is formally defined below and utilized to collect the BD user data.


Let Twitter be composed of a set of tweets Γ = {ω} and tweet ω be composed of a set of n-grams 𝕍^n=1_ω = {v_ω| v_ω∈ω}. 
We then select a set of unigrams Φ as filter keys.
Given the search function g(Γ, Φ), it returns a set of candidate tweets Γ_Φ = {ω|Φ ⊆𝕍^n=1_ω}.

To search for users with BD, the keywords diagnosed and bipolar are utilized to perform the minimum search on Twitter.
Twitter users who have mentioned these keywords in at least one tweet will be selected as users with BD and the corresponding tweet(s) will be collected as diagnosis tweet statements.
Different to Coppersmith et al.'s keyword approach <cit.>, our minimum search provides more flexible filtering, which leads to more tweet matches and more BD candidates on Twitter.



  §.§.§ Time of Diagnosis Identification
 After the previous step is completed, we have collected many possible BD users.
This dataset of users and tweets, however, may contain a lot of noise. 
An additional filtering step is thus required. 
In our case, which is to target the onset periods, we further modify the minimum keyword search in order to retrieve every time-related diagnosis tweet Γ_Φ = {ω| (Φ ∩𝕍_ω) ≠∅} with time-related keywords, such as today, last, months, etc.

A manual step is required here to estimate the time of diagnosis τ more precisely.
For example, with the keywords “diagnosed” and “bipolar”, we may get a tweet like “I was diagnosed Bipolar Disorder last year this month”. In this example, we are able to obtain not only the BD user but also their time of diagnosis.
The time of diagnosis confirms that the user is a real BD user, indicates a more precise onset period, and reduces the chance to extract wrong features by processing the tweets in the non-onset period.

To make the diagnosis more precisely, the diagnosis tweets are filtered manually by the criteria that if it is able to recognize that the twitter user are diagnosed on which year and month. In this case, the unclear diagnosis tweets such as “I was diagnosed Bipolar Disorder last year” or “I was diagnosed Bipolar Disorder few months ago” are deleted, because their diagnosed time are not clear enough.

The tweet author k of a qualified tweet is following extracted, in which the τ of the tweet can be estimated.
The output of this step is a set of qualified BD users 𝕂^(b) associated with their time of diagnosis τ^(k).



  §.§.§ Tweet Re-collection
 We download all tweets Γ^(k), k ∈𝕂^b from Twitter. 
In our case, we also retrieve each user's timezone and location information if available.



  §.§.§ Language Filter and Active User Filter

Our method focuses on English content, for which reason any user who has more than 50 percent of their posts containing hyperlinks or other languages are removed.
Additionally, only users with more than 100 tweets are included, as they are assumed to be more active users.


In order to optimize the BDOPM stage, the complement dataset (non-BD users) needs to be collected.
The user IDs of Twitter are randomly sampled using the Twitter Streaming API for several months of data.
These randomly-sampled users are labled as regular users 𝕂^(r) (non-BD) and their corresponding time of diagnosis is set to τ^(k) = 0, k ∈𝕂^(r).
Subsequently, the tweets of each selected ID are downloaded, and denoted as Γ^(k) = 0, k ∈𝕂^(r).



 §.§ Illness Period Modeling

For the purpose of onset detection, and owing to the recurrent nature of BD, we aim to find the most likely periods where BD is onset by partitioning the tweets into time periods. 

Based on Assumption <ref>, the τ and the length of time α are applied to identify the possible acute phase.
The illness's acute phase is formally defined as:

The acute phase is given as 𝕊^τ_α = {t | t ∈ [τ-α, τ ]}.


 For demonstration purposes, the concept is illustrated in Figure <ref>, assuming a BD onset period of two months, (i.e., α = 2).
 After the possible onset period α is defined, the user's tweets are extracted as Γ^(k)_τ, α = {ω_t | t ∈𝕊^τ_α} and are considered as the BD onset training data.
 For non-BD users, the tweets during period α are treated as the training data for regular users.
 That is, the specific time s in Definition <ref> is set to be the τ for the model-training step for the best approximation to the BD onset behavior.














 §.§ Psychological Feature Extraction

In order to recognize a case of BD, the BDOPM is customized to detect the following clinical exhibitions:


    
  * Rapid cycling between moods.
    
  * High energy, over talking, and tendency towards anger.
    
  * Lessened need for sleep.
    
  * Cyclical depression or mania.


As discussed in the related work, there are various types of linguistic and behavioral features that are important for BD onset detection.
In this step, two main types of psychological features are introduced: 

    
  * Word-level features and BD Pattern of Life features.





  §.§.§ Word-level Features

With respect to the linguistic features for BD, the Character n-gram language features(CLF) and LIWC metrics are designed to capture it.
The CLF utilizes n-grams to measure the comment words or phrases used by users. 
The tf-idf is utilized in our score-calculating method, the tf is the frequency of an n-gram and the document d of df is defined as each particular twitter user k. 
The formula for the tf-idf is thus given as:


    tfidf^(k,τ,α)_v^n = freq^(k,τ,α)_v^n×logK/1 + freq^(K,τ,α)_v^n

The freq^(k)_v^n is the frequency of n-gram v^n, which is n ∈{1,2} for a specific user k.
The K denotes the total number of users in the dataset, and freq^(K,α)_v^n denotes the number of user whose tweets contain the terms of v^n. 
The resulting tf-idf vectors are then normalized by the Euclidean norm:

    tfidf^(k,τ,α)_v^n_norm = tfidf^(k,τ,α)_v^n/√((tfidf^(1,τ,α)_v^n)^2, …, (tfidf^(K,τ,α)_v^n)^2)


The LIWC features are designed to capture the psychological terms frequently used by a BD user.
The words that are related to psychological terms (e.g., emotion, affection, and depression) are selected to represent the features.
Based on the dictionary obtained from the Linguistic Inquiry and Word Count (LIWC) <cit.> lexicon, we then calculated the ratio of each category (64 in total) for each user.
The LIWC score of category c_i for a given user k is defined as follows:

    LIWC^(k,τ,α)_c_i = freq_c_i, Γ^(k)_τ,α/freq_Γ^(k)_τ,α

The LIWC scores are finally normalized by the total number of user tweets |Γ^(k)_τ,α|.



  §.§.§ Bipolar Disorder Pattern of Life Features (BDPLF)

To capture the features of the BD onset period in the psychological aspect, we propose customized BD pattern of life features (BDPLF), inferred from <cit.>.
The PLF is designed to represent psychological features, such as emotional patterns and the behavioral tendency of users by measuring polarity, emotion, and social interactions.
To construct the full BDPLF, there are five categories:


  
  * Age and Gender:
  Sit et al. <cit.> studied the gender effects on BD, indicating that women with BD are more likely to have Bipolar Disorder(Type II) symptoms than men.
  We make use of the age and gender predictor proposed by Sap et al. <cit.>, which is based on lexica in social media.


  * Mood Polarity Features:
 Owing to the fact that BD patients experience rapid mood changes, sentiment analysis is firstly adapted to obtain the sentiment polarity portrayed by each user's tweets Γ^(k).
 To obtain the sentiment of tweets, the online tool Sentiment140 is used, based on Go et al.'s work <cit.>.
 The tool classifies the contents of tweets into three polarity categories: positive, negative, and neutral.
 We further partition those three categories into five different sub-features: positive ratio, negative ratio, positive combo, negative combo, and flips ratio.
  
  * Emotional Scores:
  Beyond the sentiments, an emotion detection tool proposed by Argueta et al. <cit.> is employed to classify the tweets into eight emotion categories: joy,
  surprise, anticipation, trust, sadness, disgust, anger, and fear.
  The emotion classification results are further transformed into emotion scores as follows:
  
    es_e_i,Γ^(k)_τ,α = e_i,Γ^(k)_τ,α/e_count

  where e_i is the ith emotion and e_count is the total number of emotions. 
  
  
  * Social Features:
  Social features are designed to capture a user's interaction with other users on the social media platform and how frequently they engage on Twitter.
  There are five designed social features, of which the basic four are tweeting frequency, mention ratio, frequent mentions, and unique mentions.

  
  * Insomnia and Over-Talking Features:
   Our approach considers two additional social features to capture the sleep disturbance and over-talking symptoms: 
  
     
  * Late Tweet Frequency
     The less-sleep symptom is a prominent characteristic of BD.
     In order to capture this feature, our approach performs a timezone conversion step to convert UTC time to each user's local time based on their timezone and location to make sure the user's tweeting time is recorded correctly.
     This feature is determined by the daily frequency of posts that a user posts between midnight and 6:00 am in their local time.
     
  * Tweet Rate Difference
     For the over-talking feature, this feature is designed to capture the difference in tweeting behavior from individuals.
     First, we segment each user's tweets based on a slide window approach.
     Next, for each segmentation period, we calculate the average tweet frequency per day.
     The maximum tweeting rate difference is the max difference of the tweet frequency for each given user.
    
    
    
  

From the features listed above, the bipolar disorder pattern of life feature scores BDPLFs are formally illustrated as follows:

    BDPLFs^(k,τ,α)_ξ_m = BDPLF_ξ_m(Γ^(k)_τ,α)

where ξ_m denotes each sub-feature in BDPLF, and BDPLF_ξ_m denotes the sub-functions for the sub-features, which return the corresponding feature scores.



 §.§ Phonological Feature Extraction

For phonological features, we consider that words have their own energy.
People in different states have distinct tendencies to use words.
Generally, people who use more high-energy words are usually in states of excitement or anger. 
Contrastingly, people who are in states of powerlessness or helplessness use more low-energy words.
People who suffer from depression show powerlessness more often than ordinary people do.

As a BD patient is encountered with mania or hypermania symptoms, they will tend to reveal high energy, talk more, and have a tendency for anger.
When the illness is onset, the expressions of a BD patient will be especially influenced by these symptoms and leave emotions in the expression interface, such as in tweets.
The Energy of Words feature is thus designed to capture the mania expression based on  Assumption <ref>. 


Writing is accompanied by reading in the brain.
Words carry their own energy, that is, when people try to write a word, people simultaneously read that word in their brains.
The energy of a person can therefore be inferred by the statement at the moment they were writing.



Formally, we define the key concept of how the energy of words are measured as follows:
 
The Energy Score es_v is the energy of a word.
It can be expressed as es_v = ES(v), where v denotes a specific word and ES denotes the Energy Score Function.



 
The Energy Score Function ES(v) = PF(IPA(v)), where IPA(v) represents the function that converts a word v to its IPA form.
PF denotes the function that returns phonological feature scores in the IPA form.
    







In the following sections, we give details to clarify the entire process of how to quantify the Energy Score step by step in Definition <ref>.



  §.§.§ Pronunciation Standardization

To standardize the pronunciation of each alphabet a_i, a standardization method denoted IPA Standardization Function IPA(v), shown in Definition <ref>, is performed to transfer English words into their IPA (International Phonetic Alphabet) form<cit.>.
The table of IPA phonetic transcriptions of consonants and vowels is shown in Figures <ref> and <ref>.
Each IPA symbol is a phoneme, which is one of the units of sound that distinguish one word from another.
Hence, the IPA standardization function is defined below to transfer a word to its transcription.

Let ℙ be a set of phonemes and p_j be a phoneme, where p_j ∈ℙ.
The IPA of a word v is denoted as ℙ_v = IPA(v), where ℙ_v = {p_1, ..., p_J}.
    





A word goes through the IPA Transcription Function, which outputs its transcription consisting of a sequence of phonemes.
For instance, given the word v = “folder”, it is able to retrieve the output ℙ_v = through IPA(v), where ℙ_v = {f, oU, l, d, @, r}.



  §.§.§ Phonological Feature Score (PF Score)

In this subsection, the phonological features of phonemes are utilized to define how much energy a word carried.
There are two steps for the Phonological Feature Score Function to be completed:
    


First, let's define the energy score of each phoneme p_j.
From the existing phonological feature systems, the eSPE (extended Sound Pattern of English) <cit.> is introduced to describe the phonological features of phonemes.
The eSPE consists of 21 binary features.
It describes what kinds of articulators and which part of positions are used during speaking.

In our work, 19 features from the eSPE are chosen, with the exception of “voiced” and “silence”.
The eSPE shows that each phoneme corresponds to some phonological feature, such as vowel, fricative, nasal and so on.
The notations of positive and negative represent independently if a phoneme has the corresponding feature or not.
For instance, the phoneme “oU” has phonological features vowel, high, mid, back, continuant, round, and tense.

Instead of using binary features directly, these relative phonological features are grouped into the following 8 categories based on characteristics of phonology.
Additionally, the corresponding scores are assigned according to their difficulty of pronunciation:

    
  * Oral Cavity (OC): the phonological features of anterior, back and approxim., with scores ds_OC1, ds_OC2, ds_OC3. 
    
  * Mouth Openness (MO): the phonological features of high, mid and low, with scores ds_MO1, ds_MO2, ds_MO3.
    
  * Obstruent (Obs): the phonological features of continuant, labial, fricative and stop, with scores ds_Obs1, ds_Obs2, ds_Obs3.
    
  * Tongue Position (TP): the phonological features of coronal, dental and retroflex, with scores ds_TP1, ds_TP2, ds_TP3.
    
  * Resonance (Res): the phonological features of nasal, glottal and velar, with scores ds_Res1, ds_Res2, ds_Res3.
    
  * Vowel (Vow): the phonological feature of vowel itself with the score ds_Vow1.
    
  * Round (Rou): the phonological feature of round itself with the score ds_Rou1.
    
  * Tense (Ten): the phonological feature of tense itself with the score ds_Ten1.

The total scores of each category are denoted as ds_OC,  ds_MO, ds_Obs, ds_TP, ds_Res, ds_Vow, ds_Rou and ds_Ten, by summing up the scores of their sub-features. 
Based on these categories, the phonological score for each phoneme is vectorized as :

    pf_p_j = |  ds_1     ds_2    …    ds_8  |

where each element corresponds to the scores of each category. 
To calculate word energy, the Phonological Feature Score Function is formulated as follows:


    PF(ℙ_v) = ∑_j=1^Jpf_p_j

where each element of PF(P_v) denotes the corresponding scores of each category. 
The energy of a user is finally represented as:

    eu^(k)_τ,α = ∑ es^(k,τ,α)_v/v_count = ES( v | v ∈𝕍^n=1_τ,α)/|𝕍^n=1_τ,α|

where 𝕍^n=1_τ,α denotes a set of single words decomposed from all the tweets in Γ^(k)_τ, α. 
The energy eu of a user is final normalized using the total frequency of words v_count.




 §.§ Model Training and Evaluation

In this work, an ensemble supervised machine learning approach, Random Forest Classifier, has been empirically chosen to be our training model f̂, as it is resistant to overfitting and is able to perform both classification and regression tasks.

With the feature extraction steps described previously, the BD onset probability can be represented as:

    l^(k)_τ,α = f(Γ^(k)_τ,α) = f̂(h(Γ^(k)_τ,α)),

where h denotes the feature extraction functions, which are word-level (CLF and LIWC), pattern of life, and phonological feature functions.
In order to compare feature performance, the BDOPM is trained for each of the five types using different features, which are word-level(character n-gram language model(CLM) and LIWC model), bipolar disorder pattern of life model and phonological model:


    l^(k)_τ,α = 
    f̂_tfidf(tfidf^(k,τ,α)_v^n)
    f̂_liwc(LIWC^(k,τ,α)_c_i)
    f̂_BDPLF(BDPLFs^(k,τ,α)_ξ_m)
    f̂_eu(eu^(k)_τ,α)
    f̂_BDPLF&eu(BDPLFs^(k,τ,α)_ξ_m∪ eu^(k)_τ,α)









To measure the performance of our approach, we emphasize on whether the predictive model is able to distinguish a given user is in a BD onset period or not.
To evaluate our model, we use 10-fold cross validation, and measure the model's overall precision and recall.
Additionally, a psychiatrist evaluation is conducted in our work for qualitative analysis.



§ PRODROME RECOGNITION


The definition of the prodrome stage is made below and a prodrome recognition approach is proposed to locate the possible prodromal period for BD.
The prodromal period generally refers to the time interval between the onset of the first prodromal symptom and the onset of the characteristic signs/symptoms of the fully developed illness.

In order to capture the prodromal period, our approach is able to reveal the onset probability for each user through BDOPM. 
In this step, a week by week sliding window approach is adopted to construct a bipolar disorder onset timeline, which presents onset probabilities along time.

Let a time segmentation sequence ψ^(k,α)_q = {t | t ∈ [s^(k)_q-α,s^(k)_q]} be in ascending order, where s^(k)_q is the given time for user k.
The objective of the segmentation algorithm is to iterate over ψ^(k,α)_q with s^(k)_q minus 1 week for each iteration s^(k)_Q, s^(k)_Q-1, …, s^(k)_q, …, s^(k)_1 and output the user's time segmentation sequence Ψ^(k,α) = {ψ^(k,α)_1, …, ψ^(k,α)_Q },

With a user's time segmentation set Ψ^(k,α), the onset probability l^(k)_s,α for each time segmentation ψ^(k,α)_q can be represented as l^(k,α)_ψ_q.

The Bipolar Disorder Onset Timeline consists of a sequence of BD onset probabilities 𝕃^(k,α)_Ψ = {l^(k,α)_ψ_q}.


The prodromal periods of a user are 𝕊^(k) = { t | t ∈ψ^(k,α)_q ∪ψ^(k,α)_q+1∪ ,…}, l^(k,α)_ψ_q∈ [l_lower, l_upper], where l_lower and l_upper are the lower and upper bounds, respectively, for no onset and onset probabilities.



Given the bipolar disorder onset timeline and  Definition <ref> above, our model then infers the prodromal period through Algorithm <ref>.
























§ EXPERIMENTS



 §.§ Onset Prediction Performance



  §.§.§ Experimental Setup


Time-specific subconscious crowdsourcing is applied to collect the dataset.
About 10,000 tweet statements were collected from Twitter and then filtered by the keywords “diagnosed” and “bipolar” from Oct., 2006 to Dec., 2016. 
Owing to the fact that the time of diagnosis could be expressed in various ways besides natural language processing approaches, it was manually labeled when mentioned in tweets.
Moreover, self-diagnosed users were removed to ensure reliability.
After applying the previous filter, 406 users remained.
In order to calibrate the tweet time to the user's local time, the users' timezones and locations, which are public on Twitter, were also collected.
Based on the time of diagnosis, we collected user tweets between the time of diagnosis and one year before.
These tweets became our positive class in the training process. 
Random samples of users were obtained using the Twitter Streaming API and REST API, which then became our negative class in the final training dataset.

For illness period modeling, the time frame is set to be α∈{2,3,6,9,12} months.
A dataset is modeled for each α, and active user filtering is applied in this step.
The dataset for model evaluation is summarized in Table <ref>.




The data collection approach, time-specific subconscious crowdsourcing(TSC), is first compared with the subconscious crowdsourcing(SC) (Chang et al.  <cit.> 2016).
For model performance evaluation, we compare BDOPM with 3 baselines :

    
  * PLF approach (Chang et al. <cit.> 2016) which consisted of Age and Gender(AG), Social(Soc),  Emotion(Emot), and Polarity(Pol) features
    
  * CLM approach(Coppersmith et al.<cit.> 2014, Chang et al. <cit.> 2016)
    
  * LIWC approach (Coppersmith et al.<cit.> 2014).





  §.§.§ Dataset Collection Approach Comparison

The difference between the datasets collected by subconscious crowdsourcing (SC) and our approach - Time-specific subconscious crowdsourcing (TSC) is first compared in the experiment.
Two random forest classifiers were built, corresponding to the CLF for both datasets.
With this tree based classifier, the most frequent words for each dataset were further extracted and plotted on a word cloud as shown in Fig. <ref>.




It can be appreciated in Fig. <ref> that many frequent words in SC are part of the terminology of BD symptoms, such as mania, psych, PTSD, BPD, etc.



On the contrary, in Fig. <ref>, the most frequent words from TSC are closer to daily conversation phrases. 

The data collection for SC is done from users who follow BD-related fan pages.
Consequently, among all users, those followers are more aware to their mental illness states; hence, they have higher tendency to share knowledge of BD.
It is worth pointing out that most users were not aware of their mental status before being diagnosed with BD.
The words or phrases they used were consequently less related to BD symptoms. 

As compared to SC, our approach collected user data based on whether they mentioned being diagnosed with BD or not.
The coverage of our approach is more balanced than that of TSC, which collects more ordinary people. 



  §.§.§ Single Category Features Performance for Psychological and Phonological Features


Each single category in our proposed features, BDPLF and Phonological features, are evaluated separately.
Among the features, social(Soc) and mood polarity(Pol) features performed much better at α = {2, 3} months than during other periods.
This implies that when BD is onset, the mood polarity and social behaviors become much more significant.

For emotion(Emot) and phonological(Phon) features, they also perform well at α = {9, 12}. 


To further experiment on pure text features, we not only eliminated the social features, as they fundamentally required  social interaction, but also removed the mood polarity(Pol) category,  since it requires time interval information. 

For the age and gender(AG) and insomnia(LT) and over-talking(TRD) features, the major reason for having a lower performance is that there are less then 3 sub-features in this category, while the other categories have more. 
In the next section, we present further feature ensemble experiments to examine these features.






  §.§.§ Bipolar Disorder Onset Prediction Model Performance


To compare the performance of the models proposed, we used 10-fold cross validation to measure the overall precision and recall.
To assess and interpret the performance of each classification model and each selected time period, the overall performance is summarized in Table <ref>.
In general, all of the ensemble features performed well in the onset detection task.
The ensemble of Phonological features and BPLF, which is the integration of our proposed features with BD-customized features from original Pattern of Life(PLF), performed the best. 
This ensemble successfully captured the BD features in phonological patterns and user engagement (Soc) metrics, besides the sentiment and emotions portrayed in user tweets.
The CLM had a lower performance based on what was discussed in the previous section.
That is, when dealing with unaware patients, the classifier is not able to recognize BD. 
Similarly, the LIWC model only depends on psychological words and does not offer enough information in order to detect BD.

As can be seen in Table <ref>, the models  trained on three months of user data performed the best, which also indicates that BD features are more obvious when the time period is 2 to 3 months before diagnosis.
Rapid cycling bipolar disorder, from DSM-IV, is defined as a pattern of presentation accompanied by 4 or more mood episodes in a 12-month period, with a typical course of mania or hypomania followed by depression or vice versa.
These episodes must be demarcated by a full or partial remission lasting at least 2 months or by a switch to a mood state of opposite polarity<cit.>.
These 2 to 3 month periods also match clinical observations, which indicates that our model and dataset have a high reliability.

Without taking all of the user data into consideration, the model was able to perform well even when dealing with short-time data. 
Furthermore, this 2–3 month time period is considered to be the best size for a time-frame of BD prodrome detection.
We thus set the time frame to α = 2 months.




The pure text model is further evaluated in this step.
The goal of this experiment is to provide foresight for the potential patterns in human natural expressions. 
In this experiment, age and gender(AG), emotion(Emot), and phonological(Phon) features are treated in ensemble as pure text features and we construct a predictive model through them.
The LIWC features and CLF are not considered as pure text features, because they already have a high dimension of features, which are 64 and over 1000 dimensions.

The performance of the pure text ensemble model is shown in the bottom of Table <ref>.
It can be observed in the table that the model reaches an average precision near to 0.9 without phonological features.
With the involvement of phonological features, the performance of the model improved by 7% and reached around 
0.96 when the time frame was α = {2,3}, which is almost competitive with the social involved model.

Moreover, the pure text model is also valuable because of the efforts reduced in processing steps and data collection with little performance loss for the BD onset detection task. 























Generally, each classifier for each time period performed better as the dataset segmentation was closer to the time of diagnosis, especially for the CLM.
For this classifier, Figure <ref> shows that the average precision moved from 0.809 to 0.934 as the time frame α moved from 12 months to 2 months. 



The improved performance from time to time indicates that for the same group of regular and BD users, the word expression feature changes differently.
Words and phrases in the CLM reflect the linguistic styles of BD and regular users, which provides useful information about how BD patients are responding with respect to their mental state.
For instance, in Figure <ref>, besides the negative words that reveal a negative state for a BD user, we are able to infer that he/she is getting overwhelmed in the life, which is one of the symptoms of BD.






Based on the classifier, we segment user social data based on the time dimension in sliding windows approach and predict the BD onset probability for each segment. The prodrome filter approach can detect the signs of initial prodrome. For example, Figure <ref> is one of the results, the boxed periods are the most possible initial prodromal periods identified by the proposed technique.





















 §.§ Psychologist Evaluation


In this experiment, 90 samples of user social behaviors are extracted, where each time period lasts for 2 months. Among these 90 samples, 1/3 are classified as onset by BDOPM, 1/3 are classified as no-onset by BDOPM, and 1/3 are extracted from regular user behaviors and classified as no-onset. A web interface is provided to visualize these data. 8 psychologists are involved in the blind-test experiment to assign assessments (i.e., having BD symptoms or not) to those samples. Each sample is assessed by more than three psychologists.























         















Table <ref> demonstrates that BDOPM achieves high accuracy in most cases. 



For majority agreement, the accuracy of BD onset prediction is 0.429 owing to the various diagnosed standards among the psychologists. Table <ref> shows that only 37% of onset data among the opinions from the psychologists obtain exactly the same labels. This could be due to that the same symptom is found in many kinds of illness. 

Nearly half of the patients with BD have major depression, while roughly one-quarter to one-third of them are diagnosed as borderline personality disorder, post-traumatic stress disorder (PTSD), generalized anxiety, and social phobia were each diagnosed in roughly one-quarter to one-third <cit.>. 

Burgess <cit.> also indicates there are almost 70% of BD patients have been misdiagnosed more than 3 times before receiving their correct diagnosis. 

Due to the similarity of symptoms shared by several mental disorders, chances of the majority of the psychologists agree the user as BD are low under the condition that based only on the text without a comprehensive diagnostic interview. Therefore, we give a relaxing criterion that the user is considered as BD if one of the psychologists agree that the user is BD.     

Under this relaxing criterion, the users that have never been diagnosed BD may exhibit BD-like behaviors, such as over-talk, anxiety, or struggle with the negative or angry experiences.


In summary, from different types of data, our model is able to distinguish the possible onset behavior and reach a high precision under the relaxing criterion.








§ CONCLUSION

In this research, time-specific subconscious crowdsourcing, a novel data collection approach is proposed, which is capable to filter out not only highly self-aware but also general BD users on social media. With this approach, the time spent on diagnosis of illness could also be the key to identify the possible signs of the initial prodrome. The result shows that the pattern of life features combined with our extending features, e.g., insomnia and over-talk feature, provide a great performance on detecting the BD onset period. 



Furthermore, we introduce a novel phonological feature, which focuses on the energy of words based on the evidence of phonology. By simply employing phonological feature with pure text ensemble model (i.e., the model without any social media features), the classifier can achieve more than 91% precision. The proposed model also has achieve high accuracy in the onset detection task. 




The time influence-CLM indicates that the word choices of users can reflect the corresponding mental states. With this observation, it increases the possibility to perform regular assessment on people based on the simple writing.








































































ACM-Reference-Format


