# Towards Knowledge-based Mining of Mental Disorder Patterns from Textual Data

Maryam Shahabikargar*a
aMacquarie University, Sydney, Australia
<EMAIL_ADDRESS>
## abstract

Mental health disorders may cause severe consequences on all the countries’
economies and health. For example, the impacts of the COVID-19 pandemic, such
as isolation and travel ban, can make us feel depressed. Identifying early
signs of mental health disorders is vital. For example, depression may
increase an individual’s risk of suicide. The state-of-the-art research in
identifying mental disorder patterns from textual data, uses hand-labelled
training sets, especially when a domain expert’s knowledge is required to
analyse various symptoms. This task could be time-consuming and expensive. To
address this challenge, in this paper, we study and analyse the various
clinical and non-clinical approaches to identifying mental health disorders.
We leverage the domain knowledge and expertise in cognitive science to build a
domain-specific Knowledge Base (KB) for the mental health disorder concepts
and patterns. We present a weaker form of supervision by facilitating the
generating of training data from a domain-specific Knowledge Base (KB). We
adopt a typical scenario for analysing social media to identify major
depressive disorder symptoms from the textual content generated by social
users. We use this scenario to evaluate how our knowledge-based approach
significantly improves the quality of results.

## keywords

Cognitive Science, Knowledge Base, Machine learning; Business Process
Analytics

## 1 introduction

We begin this Section with an overview of the research problem and challenges
in identifying and understanding mental health disorder patterns from textual
data. We present our contributions and discuss how the proposed method may
facilitate acquiring insight into the mental status of individuals who may be
suffering from mental disorders in general and depression in particular.
Finally, we present the structure of this paper.

### 1.1 Overview and Research Problem

The mental health of individuals and communities is a pressing challenge in
the world, nowadays. Since COVID-19111https://en.wikipedia.org/wiki/COVID-19
pandemic outbreak in 2019, most governments have been preoccupied with
handling and combating the epidemic. The prevalence of the Covid-19 has been
significantly controlled and lowered as a result of the global success in
vaccine development and mass inoculation. But now, for most governments, a key
concern is harnessing and dealing with the impacts of years of virus exposure,
including the associated psychological and economic problems. COVID-19 has
impacted our lifestyles and workplaces. These changes can cause us to feel
frustrated, stressed, and anxious, which may seriously affect our mental
health. Based on a recent study, after being diagnosed with Covid, roughly one
out of every five people develops a mental disorder 201, 198. Hence,
governments are trying to guide families and business owners to deal with
these devastating effects and improve the situation. On the other hand, as
businesses reopen, it is important for organisations to provide a mentally
healthy workplace222https://covid19.swa.gov.au/collection/covid-19-resource-
kit.

Prior to any support, mental disorders need to be diagnosed. On the other
hand, due to their complexity, identifying mental disorder symptoms (e.g.,
depression symptoms) and their patterns could be a challenging task. Hence, it
is necessary to identify mental health issues accurately and facilitate their
treatment. As a critical mental health issue, depression is one of the leading
causes of disability worldwide. It plays an essential role in the overall
global disease burden 69, 124 and could turn into a drastic health condition
333https://www.who.int/news-room/fact-sheets/detail/depression. Depression is
a leading cause of disability, with 5% of adults and 5.7% of 60-year-old and
above people suffering from it. Data from the United States and Australia show
elevated rates of depression and anxiety throughout the epidemic. It is
estimated that during the outbreak, depression level (i.e., 25%) is seven
times higher than pre-pandemic levels worldwide (i.e., less than
4%)444https://www.forbes.com/sites/debgordon/2021/05/28/mental-health-got-
worse-during-covid-19-especially-for-women-new-survey-shows/. Consequently,
due to its importance, we focus on depression identification in this research.

There are various clinical and non-clinical approaches available to identify
depression symptoms. Using questionnaires and interviews are two main clinical
approaches for depression identification. On the other hand, analysing medical
data (e.g., EEG and fMRI images) and vocal, video, and textual data are
different approaches to identifying and predicting depression. In addition,
there are very few recent studies that proposed knowledge-based approaches to
identify behavioural and mental disorders such as depression.

To extend the state-of-the-art in this line of work, in this paper, we propose
a domain-specific Knowledge Base (KB) to organise complex structured and
unstructured clinical knowledge about symptoms, risk factors and supportive
symptoms that are effective in identifying mental disorders. We introduce a
pipeline that leverages the KB knowledge to facilitate the identification of
mental disorder patterns in textual data. We evaluate our approach with a
dataset, generated from social media activities, and highlight how the
proposed framework can help analysts in the
e-Safety555https://www.esafety.gov.au/ community to gain insight into the
mental status of potential individuals suffering from depression-related
symptoms.

### 1.2 Contributions

The state-of-the-art research in identifying mental disorder patterns from
textual data, uses hand-labelled training sets, especially when a domain
expert’s knowledge is required to analyse various symptoms. This task could be
time-consuming and expensive. In this paper, we present a weaker form of
supervision by facilitating the generating of training data from a domain-
specific Knowledge Base (KB). The knowledge in the KB is gathered from both
cognitive and psychological sciences as well as previous best practices in the
field. This KB contains a set of concepts organised into a taxonomy, instances
for each concept, and relationships among them. The KB then will be used for
developing a weakly supervised 166 classifier for mental disorder
identification. We propose a method to link the concepts and instances in the
KB to the features extracted from textual data.

We discuss a motivating scenario in which leveraging a domain specific KB for
depressive patterns could enable e-safety community to monitor the trend for
the emergence of depression-related symptoms, during special periods of time
such as the Covid-19 period. This paper makes the following contributions:

  * •

We leverage the domain knowledge and expertise in cognitive science to build a
domain-specific Knowledge Base (KB) for the mental health disorder concepts
and patterns. This KB contains a set of concepts organised into a taxonomy,
instances for each concept, and relationships among them.

  * •

We present a weakly supervised learning approach by facilitating the
generating of training data from a domain-specific Knowledge Base (KB).

  * •

We adopt a typical scenario for analysing social media to identify major
depressive disorder symptoms from the textual content generated by social
users. We use this scenario to evaluate how our knowledge-based approach
significantly improves the quality of results.

## 2 Background and State-of-the-Art

The fundamental part of each scientific research is to study previous related
works. In this Section, we review the literature with respect to our research
problem, namely mental disorder identification, focusing on depression, a
mental health condition marked by a consistently depressed mood or a loss of
interest in things, resulting in severe impairment in everyday life.

There are numerous studies each address this problem from a different point of
views. In this Section, we study and analyse the recent work in mental
disorders and cognitive analytics. We discuss Cognitive science and cognitive
analytics and the way they are connected to mental disorders In addition, some
cognition-related mental disorders such as depression are explained from a
psychological and cognitive analytics perspective. Finally, we study and
analyse the related work in clinical and non-clinical approaches for
identifying depression symptoms.

### 2.1 Mental Disorders and Cognitive Analytics

Mental health issues are proved to play a significant role in reaching
worldwide developmental objectives. Mental disorders have risen notably during
the past decades. They caused severe consequences on the economy and health of
all the countries 154. Mental disorders have a significant role in every
aspect of people’s life. It affects the way people behave, act and work, while
having a significant influence on people’s physical health and their personal
and social relationships. Mental health issues have drastically affected most
countries. For example, nearly one-half of Australian adults, including 7.3
million individuals, would experience mental-related matters at some point in
life. These issues cause Australia’s economy an approximate cost of up to 220
billion dollars yearly.

Mental health issues could negatively impact anyone at any life-stage as well
as people around them 150. There are several factors such as genetic, drug and
alcohol abuse, early life circumstances, trauma, stress and personality
factors contributing to mental disorders
666https://www.healthdirect.gov.au/mental-illness. In addition, a recent study
found that the recent global pandemic (i.e., Covid-19) has caused nearly one
in every five patients to develop a mental disorder, after being diagnosed
with Covid. Also, those with previous mental conditions are 65% percent more
likely to be diagnosed with Covid-19, even when other risk factors are
considered 201. Despite extremely varied Covid-19 prevalence and fatality
levels, research from the United States and Australia demonstrate heightened
rates of depression and anxiety throughout the epidemic. The approximated
level of depression in the outbreak (i.e., 25%) is seven times greater than
the ratio before it worldwide (i.e., less than 4 percent) 90. Hence, the
importance of addressing mental health and facilitating their treatment has
become much more prominent.

Mental disorders could be classified into several categories, such as ‘Anxiety
Disorders’, ’Depressive Disorders’, ‘Neurocognitive Disorders’, ‘Paraphilic
Disorders’ and ‘Bipolar and Related Disorders’. Each of these categories
consists of different instances of that category. For example, some cases of
depressive disorders are ‘Premenstrual Dysphoric Disorder’, ‘Disruptive Mood
Dysregulation Disorder’, ‘Premenstrual Dysphoric Disorder’ and
‘Substance/Medication-Induced Depressive Disorder’ and ‘Major Depressive
Disorder (MDD)’. Throughout this study, mainly, we refer to MDD as depression.
Also, the category of ‘Anxiety Disorders’ contains some instances such as
‘panic disorder’, ‘social anxiety disorder’, ‘agoraphobia’ and ‘generalized
anxiety disorder’.

Mental disorders are originated from psychological processes impairment.
Psychological processes consist of cognitive processes (i.e., the main
factor), Individual experiences, behavioural, social and biological factors
116. a key element that contributes to mental disorders such as ‘Bipolar and
Related Disorder’, ‘Sleep Disorders’ and ‘Depressive disorders’ is cognitive
processing changes that remarkably affect the individual’s capacity to
function. 72, 98. Cognitive Science, referring to the scientific study of mind
and brain 81, 143, is mainly related to understanding the nature of cognitive
processes such as problem-solving, language, perception, reasoning, attention
and motor control 210.

More acceptable recognition of the relationships between cognitive processing
and mental disorders is necessary for treatment interventions 149. On the
other hand, one of the main advantages of data science and machine learning
(ML) techniques are finding various relationships among variables. Hence,
using data analytics and cognitive analytics helps researchers see the
relationships between different variables related to cognitive processing and
mental disorders. Consequently, developing ML models for identifying mental
and behavioural disorders patterns would be enabled 20.

Cognitive analytics means data processing aiming at understanding varied,
intricate, heterogeneous and qualitative data 99. It could be considered as
doing analytics, originating from a human-like intelligence. Cognitive
analytics refers to the advanced approaches integrating the cognitive science
knowledge (e.g., the logic behind human decision-making, thought patterns and
cognitive processes) with data analytics techniques (e.g., ML and artificial
intelligence and other technologies related to data science) 99.

Cognitive analytics could help with recognising the natural human language and
interactions 157, through analysing both structured and unstructured data 99
such as text, conversations, email, social posts, images and video data. It
also allows cognitive applications to improve continuously, while could be
used to help companies understand the emerging trends and behavioural patterns
of their customers. Hence, they would be able to predict the probable future
consequences and plan ahead for their objectives 168.

There are several studies related to applications of data and cognitive
analysis in identifying and predicting mental and behavioural disorders 69,
131, 170. Cyberbullying 169, radicalisation, and suicidal-related behaviours
are examples of such applications. Social media is a valuable source of data
for analytical purposes, making preventing and intervening actions in such
disorders possible 30. In the following sections, these three applications are
briefly explained. In addition, depression and anxiety are briefly described
as two major mental disorders associated with cognitive impairments 5, 51.

####  2.1.1 Cyberbullying

Cyberbullying is known as an online bullying matter. It is a kind of
antisocial behaviour that may include aggression and intentional power abuse
in a cyber environment (e.g., social media or internet-based platforms),
leading to detrimental social, mental and psychological effects. Sending
inappropriate online messages and comments with adverse content could be
indicative of cyberbullying actions 170. Cyberbullying gained considerable
attention from researchers and governments because of the negative
psychological issues and problems that arise from it 224.

The brain could be influenced by cyberbullying in various ways depending on
the age, and gender 190. Cyberbullying appeared to be more and more common
among adolescents777https://en.wikipedia.org/wiki/Cyberbullying. In
adolescence, there are significant changes that may happen in the brain’s
developmental processes, which consequently cause substantial changes in
adolescents’ behaviour, cognition and emotion 40. Hence, they could be more
vulnerable in terms of being affected by adverse events and experiences (e.g.,
cyberbullying behaviours), which in turn cause them various emotional, mental
and behavioural problems 134. Changes in mental health status, and decision-
making processes, and self and emotional regulations are all examples of
changes that could happen during adolescence. Cyberbullies have poor brain
executive functions, low empathy and social cognition. Cyberbully victims are
prone to suffering from mental disorders, specially suicide attempts 190, 134.
Brain executive function refers to the capacity for controlling and
coordinating thoughts and behaviour. Also, social cognition capacity
encompasses self-awareness and the ability to understand other people’s minds
40.

Kinds of words (e.g., self-focused words, hate speech, positive or negative
emotion, death-related, anger), sentence sentiments and natural language that
are used in the daily communications are reflections of individuals’ real-life
manners, thoughts, cognitive processes, behaviours, and mental health status
87, 186, 6, 69, 203, 184, 208. As the studies show, Cyberbullies tend to use a
high rate of profane and vulgar words, which is demonstrated in their
cyberbully activities in an internet-based environment such as social media
170, 202. Social media, as a virtual daily communication platform, is proved
to be a rich source of different types of data, especially textual data.
Social media enables researchers and data scientists analyse cognitive and
behavioural processes and patterns related to the social media users 69. As an
example application of data science in finding cognitive and mental-related
patterns, Rezvani et al., Proposed a Cyberbullying detection pipeline for
social media data (i.e., Twitter and Instagram). It benefits from several data
analytics techniques such as ‘Natural Language Processing (NLP)’, ‘Neural
Networks (NN)’, and ‘Long short-term memory (LSTM)’170. Through their
pipeline, different types of textual and contextual features, image-related
features and metadata features are extracted with the aim of developing a
cyberbullying identification model 197.

Textual features include Parts of speech, named entities and sentiment
analysis, etc. In this cyberbullying pipeline, TF-IDF and NLP methods are used
to extract textual features. Besides, image-related features (i.e., labels for
images of social media posts) and metadata are extracted. Metadata features
mainly refer to behavioural information of the corresponding social media
user. Metadata features that are related to social media include ‘Number of
followers’, ‘Number of followees’, ‘Number of likes’, ‘Popular categories’,
‘Average reactions’, ‘Average replies’, ‘Frequent mentions’. They also used
Google standard profanity word list aiming at enriching the feature extraction
process. Finally, they built an LSTM classifier along with Neural Network for
context2vec embeddings that combine features to recognise probable useful
features 1. Their proposed model had notable evaluation results for both
Twitter and Instagram data. Twitter data analysis illustrated 0.85 accuracy,
0.87 Precision, 0.83 Recall, and 0.85 F-score. Similarly, the results of
Instagram data analysis showed 0.86 accuracy, 0.87 Precision, 0.83 Recall, and
0.85 F-score. All these results are indicative of promising results originated
from cognitive and data analytics in identifying mental and behavioural
disorders.

####  2.1.2 Radicalization

Radicalization is known to be the mechanism of alteration in individuals’
cognitive processing, beliefs, emotions and consequently their behaviours.
These changes lead to legitimizing inter-group violence and the need for
sacrifice in favour of one’s own group 41. Cognitive opening refers to the
moment when the ideology of thinking-radicalised as a cognitive process is
shaped within a person. It happens when accepted beliefs of a potential
individual who is experiencing political and socioeconomic discrimination are
shaking, and he/she becomes susceptible to accept those ideology218. Some of
the cognitive factors that assist the cognitive opening are feeling deprived,
perceiving unfairness, injustice, societal disconnectedness, and societal
disconnectedness; whether as an individual or as a group member. Besides,
feeling symbolic threats along within-group superiority are considered to be
other effective cognitive factors. Feeling symbolic threats occur when in-
group members believe out-group individuals are acting in a way that is
harmful to their in-group members, consequently getting the belief that their
group’s moral and values are more important. All these factors may help in
feeding violent attitudes 207.

Influential cognitive and behavioural factors, which are causing individuals
to experience mental health issues, could be analysed by leveraging predictive
analysis. As an application of data science analysis along with cognitive
science, Beheshti etal. 31 proposed a pipeline to help analysts with exploring
potential extremist activity patterns through social media data. With the aim
of anlysing those factors, They introduced some new concepts such as a
cognitive graph, entity, and relationship. The cognitive graph enables
exploration and interpretation of significant cognitive and behavioural
patterns existing in social data. They also present a particle swarm
optimisation algorithm to discover the leading nodes (i.e., influential people
such as extremist and radicalised individuals) in a social network. To resolve
the issue of recognising the context and ultimate influence of the extremist
or radicalised people in social media, Beheshti et al. proposed a context
analysis algorithm in their study. They address the issue of detecting those
nodes having a remarkable effect on boosting the influence of extremist ideas
in social media 31.

####  2.1.3 Suicidal Behaviour

There are several studies leveraging ML and deep learning methods aiming at
suicide identification 59, 7, 111. Suicide is a global health dilemma, while
preventable with timely actions888https://www.who.int/news-room/fact-
sheets/detail/suicide. It is among the most common causes of death worldwide
142, and all the countries experience this issue more or less. The suicide
rate in Australian men has grown from 16.2 per 100,000 individuals in 2011 to
18.6 in 2020, while women suicidal rate increased from 5.1 to 5.8 per 100,000
in the same years 151.

Suicide is a cognition-related 149 disorder and mostly originated from
depression (i.e., two-third of suicides occurred due to depression). It is
also related to some other factors such as the family history of mental
disorder, comorbid anxiety and gender 230. Several cognition-related factors
could be considered as predictive risk factors of suicide, namely problem-
solving impairments, memory and thinking deficiency, negative cognitive style,
the personality trait of neuroticism, rumination and self-criticism149,
causing more discrepancy words usage in their communications 208.

In a recent study by Shini Renjith et al. 167, a combined deep learning
classification model is leveraged, aiming at the identification of suicidal
ideation through Reddit (i.e., an internet-based social platform) posts
analysis. They used a hybrid model, consisting of LSTM and CNN for this text
classification task. In order to increase the model accuracy, they used an
attention technique to mimic cognitive attention 107.

The reason for using attention mechanisms is that some parts of the textual
data, which are conveying essential cognitive meaning could be more relevant
and should be utilised. For example, negative emotion words, more relevant to
suicidal behaviour, should be considered more important in data analysis.
Hence, using an attention-based model enables researchers to fix different
weights according to the words cognitive importance. This weighting, leads to
extracting a better emotional sense from users’ posts, while having more
cognitive-related patterns recognised by convolutional neural networks. Their
proposed model had 90.3% accuracy and 92.6% F1-score, which is greater than
the related baseline models 167.

####  2.1.4 Depression and Anxiety Disorder

Depression and anxiety are two prevalent mental disorders 52, being proved to
be associated with cognitive impairment 48. They are known to be risk factors
for some somatic disorders such as cardiovascular disorder (CVD). They’re
linked to lower quality of life, as well as higher healthcare costs 14. They
are frequent mental health issues that have significant financial and social
consequences 187.

  * •

Anxiety As an example instance of mental disorder categories, Anxiety
disorders are distinguished by a special way of thinking and behaviours,
associated with ongoing and mostly illogical panic, concern and horror. For
example, panic disorder (i.e., an instance of anxiety disorders) is
accompanied by fear or anxiety attacks that are normally brief but can be so
intense that the person believes she/he will collapse or die. People who have
panic disorder are mainly worried about recurring attacks, and they avoid
settings where they may repeat.

Individuals suffering from social anxiety disorder (i.e., another instance of
anxiety disorders) are mostly afraid of situations where the person believes
he/she will be in the middle of attention. They are also concerned about
saying shameful things, while at the same time worrying that others will
notice their anxiety and criticise them. On the other hand, months of
excessive worry about day-to-day stuff, eluding or looking for reassurance in
places when the result is in question are the main thinking pattern of people
with generalised anxiety disorder (GAD). They usually are too anxious about
things that could go wrong 12, 72.

Several studies found that anxious people have decreased performance on a wide
range of cognitive tasks. Anxious individuals exhibit difficulties with
inductive reasoning, decision-making process, memory length, attention
control, and inhibition. They are mainly engaged with emotionally negative
concerns. Anxiety may cause people to have problems with some certain
cognitive tasks because they selectively process something irrelevant to what
really matters 65.

  * •

Depression Depression (i.e., a kind of depressive disorder) is considered to
be one of the main origins of disability globally 69, 124, and expected to be
the first by 2030 160. This disorder is a leading cause of disability, with 5%
of adults suffering from it999https://www.who.int/news-room/fact-
sheets/detail/depression.

There are several studies demonstrated that cognition may have a significant
role in the start and duration of depression 124, 98. Depression is noticeably
associated with cognitive functioning impairments such as adversity in
executive functioning, working memory and processing speed 5, 51. Depression-
related cognitive functioning includes ‘cognitive control problems’, ‘negative
cognitive biases’ and ‘maladaptive cognitive emotion regulation strategies’
124.

Cognitive control problems, being prevalent in depressed people, means the
inability to prevent negative information from going into the working memory
(i.e., the current memory). Besides, negative cognitive biases refer four
types of processing as follows. Negative ‘self-referential’ processing, which
is indicative of having a negative self-schema and negative self-descriptions.
Negative ‘attentional’ biases, showing difficulty in not paying attention to
the negative drivers. Negative ‘interpretation’ which means having tendency to
interpret events and information in a negative way. Negative ‘memory bias’,
also refers to remembering more negative memories rather than positives.

In addition, there are three maladaptive cognitive emotion regulation
strategies. First, the ‘reappraisal’ strategy, referring to reviewing a past
event with the aim of rectifying the related negative feelings. A depressed
individual rarely benefits from this strategy. Second, ‘rumination’, being a
maladaptive strategy and one of the depression symptoms. It means thinking
about negative past experiences repetitively. And the third strategy is
‘distraction’, being an adaptive strategy, which means causing a person not to
think about something. Depressed people show low levels of distraction from
thinking to negative memories 124. Among all mental disorders, in this study,
we mostly focus on depression.

### 2.2 Depression: A Cognitive-Psychological Mental Disorder

Due to the significant adverse effects it may have over global communities,
depression has attracted the attention of many researchers and governments to
conduct extensive studies in this field. Depression as a cognitive-related
disorder is described previously in section 2.1.4. In this section, based on
the best practices in the field and the golden standards in cognitive and
psychological studies such as ’Diagnostic and Statistical Manual for Mental
Disorder’ (DSM) and several other resources 72, 128, 160, 69, depression is
explored in terms of its symptoms, risk factors, supportive symptoms and the
relationships among them.

####  2.2.1 Depression Symptoms

Depression is a complex mental disorder. It contains a set of heterogeneous
symptoms 25 such as emotional, cognitive, and behavioural symptoms, with
persistent depressed mood and lack of interest in usually enjoyable chores
117. In this part, diagnostic symptoms of depression that are mainly used by
psychologists are explained.

  * •

Depressed Mood: ‘Depressed mood’ is one of the main symptoms in identifying
depressed individuals 72. As a symptom of various mood disorders such as
depression 36, it is determined by some feelings such as feeling sad, empty,
hopelessness, and discouraged
101010https://www.nimh.nih.gov/health/publications/depression/. Having
pessimistic ruminations, being tearful and unhappy could also be indicative of
depressed mood 108, 186.

The presence of ‘depressed mood’ can sometimes be inferred by facial
expression or conduct. Also, depressed mood could be shown by bodily pains and
aches, a sensation of extreme frustration about little issues, and a tendency
to react with angry outbursts 182. In children and adolescents, this symptom
mainly may manifest itself in the form of irritability rather than feeling
dejected or sad 163, 72.

  * •

Loss of Interest:  Significantly decreased pleasure or interest, at least to
some degree, in nearly all of daily activities, and also the inability to
anticipate happiness, almost everyday, is one of the most prevalent symptoms
of depression. Individuals may feel not caring anymore, less interested in
hobbies, feel no enjoyment in activities that were considered to be joyful in
past 75, 86. In addition, Social withdrawal69, 72, neglect of pleasurable
avocations and reduced levels of sexual desire are some other probable
indicators of loss of interest in depressed people 72.

  * •

Appetite or Weight Change:  Around one-third of depressed people identified
with an increase in appetite, while about half of them report appetite
decrease 60. Depression is accompanied by several physical health problems
such as cardiovascular disease (CVD) and obesity 53. These diseases are mainly
associated with depression somatic symptoms such as problems with sleeping and
fatigue, so there is a mutually-reinforcing relationship between them. Change
in appetite, being a depressive somatic symptom, is also affected by these
kinds of relationships.

A potential biological cause that relates depression to those physical health
issues is systemic inflammation 136, 137, 38. Inflammation is defined as the
immune system’s reaction to damage or irritation. Stress, infection, or
chronic diseases could lead the immune system to create inflammatory responses
throughout the body 78.

Based on some studies, the different underlying neural and inflammatory
factors could cause some depressed people to tend to infer foods to be
pleasant (i.e., increased appetite). In contrast, others feel reluctant to eat
most of the foods (i.e., decreased appetite) 60.

  * •

Sleep Disturbance:  Unusual changes in sleep patterns nearly every day are
common somatic symptoms of depression 72. Hypersomnia is characterised by
recurrent episodes of Excessive Daytime Sleepiness (EDS). It’s often
considered to be the result of interrupted or poor sleep, and it’s linked to a
variety of sleep problems, such as insomnia 66.

Insomnia is defined to be a sleep-related difficulty such as falling asleep or
remaining asleep for a considerable period of time 67, waking up during the
night and then having difficulty falling asleep again, and also experiencing
increased daily sleep111111https://www.ampsych.com.au/psychology-treatment-
sydney/insomnia/. Insomnia could have reflections such as experiencing
irritability, aggression and anger, lack of energy, concentration and
motivation, loss of interest in daily activities. It also could lead to some
physical tensions such as
headaches121212https://www.healthdirect.gov.au/insomnia.

  * •

Psychomotor Problems:  Two different demonstrations of psychomotor problems
are psychomotor agitation and psychomotor retardation. Psychomotor agitation
is defined as engaging in purposeless movements, e.g., pacing around the room,
rapid talking, and tapping the toes and feeling restlessness 72. Also
irritability and suicidal attempts are also considered as its symptoms. The
United States (US) Food and Drug Administration has noted that the inner
tension and mental distress are, respectively, the original cause of excessive
motor activities and restlessness131313https://www.ncbi.nlm.nih.gov.

On the other hand, Psychomotor retardation could be recognised through some
symptoms such as Speech slowness, decreased mobility and cognitive dysfunction
45. Cognitive functions are indicative of several significant mental processes
that directly affect our everyday personal and social behaviours. Perceptual
processes, memory, decision-making, language comprehension and attention
processes are part of that cognitive functioning 148. Besides, previous
studies demonstrated that individuals with negative processing biases 227, 89,
173, 178 and negative cognitive styles are more susceptible to be depressed
44. The negativity bias refers to the situations where negative events such as
unpleasant thoughts, emotions, or social interactions influence an
individual’s psychological state and processes much greater than equally
emotional events but positive 109, 176.

  * •

Fatigue:  Sustained loss of energy and tiredness without physical exertion are
some of the fatigue symptoms. Even the smallest tasks seem to be hard to be
done and efficiency in doing tasks may be decreased. This feeling is indicated
in a large number of depressed cases 72. Fatigue could also increase the
likelihood of making mistakes.

Based on medical studies, Insomnia and fatigue are interdependently related to
each other while having different essences 67. Fatigue is not the mere feeling
of tiredness or drowsiness and could be caused by lack of sleep, long physical
or mental activities. Making errors, decreased productivity reduced alertness
are some of the probable adverse effects of being fatigued 93.

  * •

Negative Self-Evaluation:  It is very usual for depressed individuals to have
a negative self-image, feelings and thoughts of self-loathing and being
valueless during their depressive episodes 186, 75. The presence of delusional
or near-delusional guilt is less common but is indicative of greater
intensity. Depressed people may have unrealistic negative evaluations of their
worth and will ruminate on their minor past failings. They mainly misinterpret
the trivial events as evidence of personal fault and blame themselves for
failing in meeting various occupational and interpersonal responsibilities 72.

Depressed people often tend to react with self-criticism when facing failure,
stress or obstacles in life. Individuals with an increased level of self-
criticism use more discrepancy words in their communications. This could be a
reflection of different levels of confidence and certainty in achieving life
goals or probably the degree to which one person is able to concentrate on
specific aspects of favourable targets rather than unclear or general ones
208. Having the negative self-evaluation is closely related to depression and
is a powerful mediator between stressful life events and depression 230.

  * •

Impaired Ability to Think:  Indecisiveness, diminished ability to think or
concentrate, being easily distracted and having memory difficulties,
especially in older people, are some of the complaints that depressed
individuals may have 72. Indecisiveness means having difficulty with decision-
making in everyday life situations. Relationships, health, and job-related
issues are some examples of those situations. Indecisiveness is considered to
be associated with distress in different daily activities 96. On the other
hand, depressed people mainly demonstrate a high level of anxiety which in
turn makes it hard to make decisions 206.

Lack of motivation is one of the reasons that cause depressed people to be
indecisive. Having decision-making difficulties is considered to be a somatic
issue. A previous study has demonstrated that depressed people suffer from
grey matter loss in their brain. Grey matter is some regions in the human
brain that are involved with motivation and decision-making ability, emotions,
self-control, memory141414https://en.wikipedia.org/wiki/Grey_matter.

  * •

Suicidal Ideation or Thoughts of Death:  Suicide is one of the main public
health dilemmas worldwide. It was the fourth important cause of death in young
people on 2019, globally. There is about 700,000 suicide commitment
annually151515https://www.who.int/news-room/fact-sheets/detail/suicide.
Majority of depressed individuals are shown to have suicidal ideation 230,
171, 126. Not only the fear of dying but also recurrent thinking about it and
suicidal attempts or plans are all kinds of this symptom that can be presented
by a depressed person.

Depressed individuals concentrate on committing suicide because they believe
they are unworthy of life or since they feel to be unable to deal with the
depressive anguish 72. Based on a recent study 87, people who are approaching
suicidal attempts tend to use more anger-related terms while the positive
emotion in their communications is reduced. Besides, negative self-evaluation,
negative cognitive style are known to be probable risk factors for suicidal
deaths 149

An individual would be diagnosed to be suffering from depression if she/he
exhibits either depressed mood or loss of interest and four (or more) of the
other above-mentioned symptoms. In addition, this depressive episode must be
followed by distress 193 or a reduction in social or professional performance.
These symptoms must have been present during at least two consecutive weeks,
indicating a change in functioning compared to the past. It also must be noted
that those symptoms that are obvious attribute of another medical conditions
are excluded 160, 72.

####  2.2.2 Risk Factors and Supportive Symptoms

Risk Factors.

Depression risk factors include the type of personality traits that a person
have, demographic features, having previous episodes of depression, and having
major non-mood disorders. In this part, first, personality traits and the way
they could affect potential people to be depressed are described. Then other
risk factors such as demographic features would be explained.

  * •

Personality Traits:

Suffering from depression is linked with some of the personality traits 57.
Personality is recognised by the way people tend to behave, react to different
daily events, and also their patterns of cognitive and emotional processes
106, 222. A wide range of past and recent research is evidence of personality
traits’ effect on vulnerability to some mental disorders. It is also known
that personality is a significant risk factor of depression 112, 113, 118,
165, 129, 125, 8, 9, 94, 19, and has been hypopapered to be a depression
predictor 94.

Based on The most acceptable and universal personality model, the Five Factor
Model (FFM), there are five different personality traits, named “Big Five”.
These Big Five are ‘Neuroticism’, ‘openness’, ‘Extraversion’, ‘Agreeableness’,
and ‘Conscientiousness’ 118, 9. Extraversion is defined to be genial, chatty,
assertive, and energetic, while neuroticism means to have negative
affectivity, be uneasy, sad, irate, and unsure. On the other hand,
conscientiousness trait the characteristics such as being careful, perfect,
accountable, and orderly. Agreeableness also is indicative of traits such as
being kind-hearted, compliant, unselfish, and gentle. Lastly, openness is
defined as being creative and open-minded 172. The main personality traits
that are considered to be depression risk factors are neuroticism,
extroversion, and conscientiousness 94, 9.

Neuroticism as the most significant trait 112, 114, 113 is positively
correlated with depressive symptoms. The other two, i.e., extraversion, and
conscientiousness, have a negative correlation with susceptibility to be
depressed 118. Neuroticism, contains two sub-domains, namely ‘withdrawal’ and
‘volatility’. Extraversion consists of ‘enthusiasm’ and ‘assertiveness’, and
conscientiousness also includes ‘industriousness’ and ‘orderliness’. Sadness
and anxiety are two examples of Withdrawal referring to internal negative
emotions, while volatility refers to external negative emotions such as
irritability and anger. On the other hand, enthusiasm and industriousness are
negatively correlated with depression 9, 129. Hence, neuroticism could be
viewed as a risk factor while extraversion and conscientiousness are
considered to be protective factors 129, 8.

Neuroticism is considered to be the state of having negative affectivity 72,
and it has been shown that depressed individual have higher negative emotions
than not-depressed individuals69. The word “affect” refers to our experienced
emotions or feelings and the way they influence us in making decisions 4.
Negative affectivity relates to a variety of negative emotions and poor self-
concept, that consists of symptoms such as distress, sadness, disgust,
lethargy, and fear 119. Distress is a kind of negative stress in comparison
with eustress, which is positive stress. Distress has characteristics such as
causing anxiety, experiencing unpleasant feelings, reducing the performance,
resulting in physical or mental problems 135. Lethargy is a condition in which
an individual mostly has feelings of being fatigue, mood change, reduced
energy, alertness or ability to
think161616https://www.healthline.com/health/lethargy.

  * •

Demographic Feature and Other Risk Factors:

Based on previous studies, the prevalence of depression differs in different
age groups. It is three times higher in 18- to 29-year-olds than in 60-year-
olds 72. Females in their early teens had 1.5 to 3-fold higher levels of
depression 114, 76, 60. It is also shown that there are no obvious variations
in symptoms, duration, therapeutic response, or outcomes between men and
women. Besides demographic features such as age and gender, there are other
risk factors being effective in suffering from depression.

Having a previous history of depression also could make individual more
susceptible to be depressed again in future 79, 114. In addition, having the
background of other non-mood disorders such as substance-related disorders,
prominent anxiety 108, 104, borderline personality disorders as the most
common ones, as well as Other depression risk factors include disabling
medical illnesses such as diabetes, severe obesity, and heart disease 72.

Supportive Symptoms:

  * •

Absolute Word usage :  Depressed individuals mostly talk in the absolute
language and use a greater percentage of absolutist words in their natural
language and daily communications 186, 6. Absolutist thinking is the cause of
several cognitive falsifications and illogical thoughts that are said to be
the mediators of core emotional disorders. There are 19 absolutist words that
have been properly verified, e.g., ‘definitely’, ‘absolutely’ and ‘never’ 6.

  * •

Abnormal Fear :  As mentioned in section • ‣ 2.2.2, fear is one of the
behavioural symptoms of neurotic individuals. It is also illustrated in
American Psychiatric Association Manual 72 that having abnormal fear and
phobia could be a supportive symptoms of being depressed.

  * •

Tearfulness :  Crying is a powerful sign of organismic distress and acts as
distress reduction. Clinical studies have indicated that depressed people are
crying excessively 22 which may reflect the intensity of distress 175.
American psychiatric association also has introduced being tearful as a
supportive symptom for identifying depressed individuals 72.

  * •

Physical Pains :  Being depressed and having physical pain are strongly
connected 72 and could make a vicious cycle. Back pain or headache is the
first and most common unexplained body pain, caused by depression. Pain and
its consequent issues could affect individuals’ mood. Chronic pains could lead
to depression, whether injury-related ailments or pains originated from a
physical disorder such as diabetes, cancer or heart disease 95.

  * •

Obsessive Ruminations/Concerns :  Obsessive ruminations or thoughts are mainly
demonstrated in depressed people 72. Rumination is defined as thinking
frequently over a single or specific thoughts which are inducing negative
feelings. Obsessive rumination could be harmful in terms of mental health. It
causes difficulties in the ability to think and emotion processing. Also,
Choudhury et al. illustrated in their study that depressed people tend to use
more relational and medicinal concerns69.

Having obsessive ruminations, also could make the depression more intense or
prolonged. It may cause feeling alone and isolated, which in turn causes
pushing people away171717https://www.healthline.com/health/how-to-stop-
ruminating. There are some reasons for rumination, e.g., experiencing previous
physical or emotional trauma, dealing with continuous uncontrollable
stressors. Also, Neurotic people often tend to ruminate over their
relationships 123.

  * •

Self-focused Attention :  Several previous studies have shown that people with
depressive symptoms tend to use special words while talking or writing. It is
recognisable from the way individuals express their thought whether they are
suffering from depression or not. Depressed people use more first-person
pronouns, i.e., ‘I’, ‘Myself’, ‘Me’, showing an increase in self-focused
attention 69, 186, 203, 177. Based on depression cognitive models, self-
referent attention and processing, which is negatively biased, have important
roles in suffering from depression 25. These findings are in line with the
fact that one of the symptoms of depression is negative self-evaluation and
feeling of worthlessness 72. Hence, using self-focused words while they are
blaming or criticising themselves seems very natural.

  * •

Anxiety :  Anxiety is a natural body reaction to stressful events. It is
accompanied by the fear of what’s to come. For example, the first school day
or having a job interview could cause anxiety and nervousness.

Anxiety and depression happen independently, however, they could be considered
as comorbid disorders that happen at the same time. Anxiety could be a
supportive symptom for depression 72, which leads other symptoms to be
worsened181818https://www.healthline.com/health/anxiety. It is also considered
to be a probable symptom of negative emotion 9, 129. Although it could be a
kind of background non-mood disorder 72, 108, 104, anxiety is mostly
illustrated in depressed people’s behaviour 206.

  * •

Irritability :  Irritability is known to be the state of quickly becoming
annoyed, angry and frustrated even with minor issues 70. Irritability is
considered to be one of the supportive symptoms in depression identification.
Depressed individuals, especially children, might feel irritated frequently.
Sadness and depressed mood in Children and adolescents mostly is demonstrated
as irritability, so that they would react with anger to slight provocation 72.

Other symptoms of irritability could be feeling restlessness, difficulty
concentrating and agitation. On the other hand, there are some causal mental
and physical condition such as stress, sleeping problems, chronic pain and
thyroid that makes individuals experience
irritability191919https://www.healthdirect.gov.au/irritability-and-feeling-on-
edge.

  * •

Special Phrases :  Some of the most frequent phrases that can be seen as
signals for being depressed are “I should", “I can’t…", “It’s all my fault",
“I’m tired", “I want to be alone", “No one cares". As some may believe it is a
stigma to have a mental disorder, depressed people often try to hide it behind
their positive phrase that “I am fine". Two signalling phrases of losing
interest in normally enjoyable activities are “I don’t feel like it" and “It’s
not fun anymore". Besides, ironically use of “I feel better" and also saying
“What’s the point?” could be warning since all of those mentioned feelings can
become overwhelming and make people want to give up 186.

As mentioned before in section • ‣ 2.2.2, neurotic people are more likely to
be depressed, while showing more negative emotion in their daily life. Also,
depressed people are more likely to use negative emotion terms than not-
depressed people 204, 203. The following words are some examples of negative
emotion terms could be used by some of depressed individuals, ‘down’,
‘stressed’, ‘upset’ 186.

  * •

Depression Unigrams :  Based on a study by Chouldhary et al., depressed people
tend to use special depression unigrams and terms in their communications. As
Figure 1 shows, depression unigrams are categorised into 4 areas. Treatment
and relationship, life words refers to medicinal and relationship concerns,
respectively. These are concerns assumed to be related to obsessive
ruminations, a previously mentioned supportive signs. Also, symptom and
disclosure words are considered to be separate supportive symptoms for
depression 69.

Figure 1: List of depression unigrams that depressed people tend to use in
their communications as indicated in Chouldhary et al. study 69.

### 2.3 Depression Identification/Assessment Approaches

Likewise, with other chronic disorders, the sooner treatment of depression
will help the full remission of it 72. Therefore, due to the importance of
this issue, a valuable collection of studies has been done over depression
from various perspectives. In this section, we will review three different
approaches (i.e., clinical, non-clinical and knowledge-based), aiming at the
identification and assessment of depression.

####  2.3.1 Clinical Approaches

In contrast to most physical disorders that can be identified through methods
such as imaging and laboratory tests, the majority of psychological and
cognitive abnormalities are not easily diagnosed. Generally, mental health
issues need to be assessed before any Therapeutic prescription 92. Depression,
considered to be the main health problem around the world 158, is no exception
and attracts the attention of many researchers in terms of developing reliable
assessment gadgets. In order to provide adequate care, validated scales must
be used in the screening, diagnosis, and measurement of therapeutic efficacy
in depression. Clinicians who learn how to utilise those scales can increase
diagnostic accuracy, save time, offer greater constant treatment, and track a
patient’s complicated emotional and behavioural responses to therapy 11.

More than 40 years ago, symptom-based scales were established to give a
numeric value to a wide range of patient behaviours, emotions, and feelings.
They’ve subsequently evolved into a confusing array of tools developed for a
number of objectives, some of which are fairly broad in scope and others more
specific 11. Depression assessment tools include screening, diagnosis and
monitoring instruments, each designed for a specific aim. To identify
potential depressed individuals, short self-reported tools, namely screening
measures are used. On the other hand, diagnostic tools are interview-based
measures used by clinicians. Also, monitoring tools are rating scales to
appraise the intensity of depression and identify any changes in the
depressive symptoms 92.

  * •

Screening Tools (BDI-II, CES-D and PHQ-9) :

The Beck Depression Inventory (BDI) is among the most commonly used screening
tools for identifying depression severity 23, 92, 191, 24, 213, 39. The
assessment includes questions related to depressive symptoms related to
depressive symptoms like sadness, as well as impaired cognition such as
feeling worthlessness, and also bodily symptoms like weight loss 133. It was
first developed in 1961, having 21 items to assess depression-related
symptoms. Individuals must answer to multiple-choice questions based on their
feelings on the same day as they are answering 24.

In 1971 BDI-IA, being the amended version of the original BDI, was published.
BDI-IA must be responded based on the preceding week’s events and feelings,
including today 225. The BDI-II is a modified edition of the BDI that’s been
released in 1996 to comply with the new version of DSM 37 depression criteria.
It replaced four of the original BDI’s items, i.e., ‘Weight Loss’, ‘Body Image
Change’, ‘Somatic Preoccupation’ and ‘Work Difficulty’ with four new ones ,
namely ‘Agitation’, ‘Worthlessness’, ‘Concentration Difficulty’ and ‘Loss of
Energy’. BDI-II must be answered based on the preceding two weeks 23. Figure 2
demonstrates part of the BDI-II202020https://naviauxlab.ucsd.edu/wp-
content/uploads/2020/09/BDI21.pdf.

Figure 2: Part of the BDI-II: An extensively used screening tool for
identifying depression severity. The assessment includes questions related to
depressive symptoms like sadness, as well as impaired cognition such as
feeling worthlessness 23.

The Center for Epidemiological Studies-Depression (CES-D) 164, 158, 191, 46,
127 and the Patient Health Questionnaire (PHQ-9) 120, 92, 64, 61 are 2 of the
most important tools for depression screening. As Figure 3 shows 152, CES-D is
a 20-question self-report questionnaire. It was developed in 1977 by Laurie
Radloff to assess depression symptoms. This questionnaire should be answered
based on the feeling and affections referring to a week prior to the
completion day 164. Respondents rate each question based on the happening
frequency. The rating scale is originated from the Likert scale, varying
between 0 (i.e., hardly ever or at all) to 3 (i.e., generally or always) 46.

Figure 4 also illustrates the PHQ-9 questionnaire, being the most trustworthy
in depression screening tool leading to the more accurate identification 61,
3, 84. The PHQ-9 is frequently used in physician’s and therapist’s workplaces
as part of routine screenings or to assess the mental well-being. This
simplified version is inspired by the original PHQ form, which includes a wide
range of mental health problems such as depression, panic disorder, anxiety,
and difficulty sleeping, and more 211. It is a 9-question tool, each question
refers to one of the criteria indicated in DSM-5 72 manual and scores them as
‘0’, ‘1’, ‘2’, or ‘3’. In which ‘0’ means not at all and ‘3’ means nearly
every day 212121https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1495268/.

Figure 3: The Center for Epidemiological Studies-Depression: a reliable
depression-related questionnaire. It is applied in scientific studies and
clinical settings as a depression screening tool. It was developed in 1977 by
Laurie Radloff 164. Figure 4: PHQ-9: A 9-question depression screening tool
leading to the more accurate depression identification. It is originally
developed and published by Kroenke et al., on 1999 120, 121.

  * •

Diagnostic Clinical Interviews (SCID and CIDI) :

Screening attempts are mainly followed by diagnostic interviews. Interviews
are used by clinicians to identify potential people with mental disorders
(e.g., depression). Two reliable mental disorder diagnostic interviews are the
‘Structured Clinical Interview for DSM Disorders’ (SCID) and The ‘Composite
International Diagnostic Interview’ (CIDI) 92. The last version of SCID
interview is SCID-5, constructed in accordance with DSM-5 diagnostic criteria.
To help with evaluating each criterion as existing or absent, interview
questions are simply supplied alongside each relevant DSM-5 criterion 18.

In addition, the CIDI is a detailed and thoroughly structured diagnostic
interview for assessing mental disorders. CIDI, the first and the second
versions (i.e., v1 and V2) were developed by WHO in 1994 220 and 1998
respectively 13. The latest version is structured in 14 sections, one of them
especially related to depressive disorders. Figure 5 is the illustration of a
segment in CIDI-V2, being associated with depressive disorders identification
interview 155.

Figure 5: A segment of Composite International Diagnostic Interview (CIDI)
related to depression identification interviews. CIDI is a detailed and fully
structured diagnostic interview for assessing mental disorders 13.

  * •

Monitoring Tools (HAM-D, MADRS) :

Monitoring tools are rating scales to appraise the intensity of depression and
identify any changes in the depressive symptoms 92. Two valuable supplementary
tools to be used following a proper diagnosis are the ‘Hamilton Rating Scale
for Depression’ (HAM-D) 83 and the ‘Montgomery-Asberg Depression Rating Scale’
(MADRS) 92. HAM-D is commonly used measure for assessing the level of
depression in depressed individuals.

The first unstructured version, HAM-D21 was published by Max Hamilton in 1960
and composed of 21 components. Over the years, different versions of the HAM-D
have been developed and used 97, 47. Being structured (i.e., containing
complementary interview questions) or not is the main difference among those
versions. Due to some limitations, such as inefficiency in detecting changes
in the course of treatment, criticisms have been levelled at unstructured
types. Hence, MADRS, being a structured scale, was developed in 1979 by
Montgomery and Asberg to improve the sensitivity of HAM-D 141.

####  2.3.2 Non-Clinical Approaches

In addition to the clinical approaches explained before, which use assessment
tools for screening and identification, computer science society also did a
great job in this field by developing various automatic algorithms for
identifying or predicting depression. Depression has been investigated through
several approaches. Each of those approaches is a special and analysable
aspect of depression. For example, facial gestures or language use of
depressed people are two aspects that could be analysed. In this way, various
data types have been analysed in previous researches. Based on the literature,
these types of data include medical data (e.g., fMRI records and EEG), facial,
video, vocal, and social media data, In which social media is a rich source of
textual data.

There are numerous modern ML techniques and classifiers that have been used
for analysing these data 122. The followings are some of the example
techniques leveraged in computer science-based analysis: NLP, convolutional
neural networks (CNN), ML classifiers such as Support Vector Machines (SVM),
Naive Bayes (NB), Decision trees (DT), Multi-layer Perceptron (MLP), Logistic
Regression (LR), etc. Table 1 is demonstrating different approaches in this
regard.

  * •

Medical Data

    * –

FMRI Records: As we mentioned before, some depressive symptoms could be
derived from zonal anomalies in brain blood flow and activities 217.
Functional Magnetic Resonance Imaging (fMRI) measures these activities and
changes 156. Hence, several past studies have used fMRI signatures and
leveraged different ML techniques for their studies on depression
identification 82, 226.These capabilities are arising from ML algorithms’
power to contract several variables, e.g., MRI signals in brain
voxels222222Voxel is a 3-dimensional unit that embeds the signals in brain
scans, into a scale that takes the intricate patterns derived from these
variables 181.

Fu et al. 82 used SVM technique to analyse fMRI data, and Zeng et al. 226 have
developed a maximum margin clustering-based unsupervised ML model with 92.5%
group- and individual-level clustering consistency, That model was used for
identifying depression through analysing resting-state fMRI scans in the
absence of clinical information. Based on their study, some brain functional
connectivity networks may have a serious role in suffering from depression.

Previous research has revealed that people who previously suffered from
depression are more vulnerable to be depressed again in future 71. Similarly,
the fMRI data have enabled researchers to do different studies on treated
depressed patients aiming at identifying imaging bio-markers of depression
susceptibility. For example, Sato et al. 181 have developed a ML algorithm,
Maximum Entropy Linear Discriminant Analysis (MLDA) with 78.26% accuracy in
this regard.

    * –

Electroencephalography Signals: EEG is an electrophysiological measuring
technique for recording electrical impulses on the scalp, which has been
proven to correspond to the macroscopic activity of the brain’s surface layer
beneath. EEG measures and record voltage changes arising from an electrical
current within the brain’s neurones 216. Several past researches have shown
that using ML techniques to analyse EEG recorded data and signals would lead
to outstanding results in terms of identifying the predominant mental
condition of patients and depression identification.

Betul Ay et al. 16 and Sharma et al. 188, both leveraged CNN and LSTM models
in their studies. The first resulted in classifying depressed cases with the
accuracy of 99.12% for the right hemisphere signals analysis and 97.66% for
the left hemisphere. The second study has been done with 99.10% accuracy and
the mean absolute error (MAE) of 0.2040. In addition Aydemir et al. 17 used k
nearest neighbor (kNN) classifier with 99.11% and SVM with 99.05% accuracy,
and Seal et al. 185 apply a CNN model with the accuracy of 0.914 to classify
EGG data into two classes, namely related to the depressed or related to not
depressed individuals.

Table 1: Depression Identification/Assessment Approaches.

  * •

Video and Vocal Data

There is a growing interest in analysing audio and video data to create any
probable advances in depression-related areas. Since the facial expression
could be used vastly as a depressive disorder indicator 228, there are
numerous image- and video-based depression identification studies done
previously144, 101 to help psychologists with depression diagnosis and therapy
194. Detectable video features such as gestures and movements, and periodic
muscular movements make video data analysis a useful approach for depression
studies 223.

Image- and video-based depression identification studies leveraged a wide
range of automatic modern tools. Deep regression network with focusing on a
single facial image 228, Deep Learning fed with facial images sequence from
videos 102 are some examples of those tools 147. In addition, 3-dimentional
convolutional neural Networks used over video clips having access to
spatiotemporal feature aggregation module (STFAM) 101, and also CNN models
with attention mechanism using video clips as input data 100 are conducted
with acceptable performance.

In addition to video and facial images, there are several vocal- or speech-
based studies to developing computerised depression identification models.
Generally, depressed people tend to talk slowly and communicate using short
sentences in a monotonic way 219, 63. Vocal data could enable identifying
those depressive patterns by analysing the intonation, loudness, speaking
speed, and articulation 194, 223.

The work of Srimahhur et al. 192 is an example of Vocal data-based studies. In
this work spectrogram-based and also end to end CNN models are used with the
aim of identifing potential depressed people. Xingchen Ma et al., also
developed DepAudioNet, a deep model made up of CNN and Long ShortTerm Memory
(LSTM), enabling the classification of depressed cases through encoding
depressive patterns in the vocal channel 130. Samareh et al. 180, also did an
integrative multi-modal study in which, they used the audio, video, and also
textual data, in addition to applying gender variety in their research. Their
study had promising results in terms of depression symptom identification.

  * •

Textual Data

These data demonstrate the linguistic style of its author and also any other
possible metadata. Linguistic style refers to a group of signals based on
which we indicate what we mean, and also interpret other people’s meaning. It
includes features like speaking rate and loudness, being straightforward or
not, the word choices 199, etc. The linguistic style could be reflected in the
spoken and written languages, and the data derived from both could be
collected, stored and analysed.

Based on previous researches, written(i.e., textual) data proved to be a
reliable and promising kind of data for depression-related studies, through
analysis of different words in sentences and documents 49. Kinds of words
(e.g., pronouns, verb tenses) that are used in the daily communications are
connected to individuals’ real-life manners, differences, and mental health
status. In comparison to mentally healthy people, depressed people frequently
utilise the first person pronouns (i.e., self-focused words), negative
emotion, and sometimes more death-related words 203.

One of the main and golden standard computerised text analysis tools is the
Linguistic Inquiry and Word Count (LIWC) program. It is leveraged as one of
the most beneficial ways of extracting various word-based features from
textual data such as daily diaries, school assignments, and journal articles
161, 203, 162. In analysing textual data, LIWC counts words in psychologically
meaningful classes namely function and emotion words. These classes are
indicative of emotional and social conditions, motivations, purposes, and
thought patterns. Hence, all the LIWC’s capabilities make it a suitable source
for personality, behavioural, and mental health related studies 203.

The LIWC lexicon was created to analyse a variety of text types, including
e-mails, speeches, poetry, or captured daily conversation. LIWC has 90
linguistic, behavioural, and psychological dimensions, consists of 41 word
categories (i.e., a list of words) that use psychological notions (e.g.,
affect, cognition, biological processes, and drives), and six personal concern
categories (e.g., job, home, leisure activities), etc 161. These lists were
made with the help of emotion assessment methods and glossaries, and a judging
panel validated them 88. Various studies leveraged LIWC as a reliable tool for
emotion and linguistic analysis 68, 69, 88, 179, 42. It is a valuable resource
that is widely utilised for measuring positive and negative affect 68, 88,
while being a well-known lexicon used in content analysis 110. There is also
another lexicon used aiming at emotion and affect analysis, such as ANEW
(Affective Norms for English Words) 43, 145, NRC 139, 140, Warriner Lexicon
212, and MPQA 214.

Recently, considering the popularity of daily communications, social media
networks turned out to be a great textual data source for identifying factors
associated with depression. This identification, in turn, is a great work in
terms of helping psychologists, families and societies to deal with depression
side effects. On the other hand, this identification is empowered by different
ML techniques’ capabilities that make the textual data analysis possible 209,
69.

Social media networks are platforms with multifaceted applications. For
example, Twitter, Facebook, and Reddit are common spaces in which people can
share their beliefs, ideas, thoughts, feelings, experiences, and also many can
find answers to their questions. Previous studies show that these networks
could help with screening society tendencies and health-related issues such as
depression 54. Several scientific studies have analysed social media data
using several ML algorithms with the aim of depression identification and
prediction, some of them are as follows.

In a leading study by De Choudhury et al. (2013), a classifier was built to
recognise depressed Twitter users based on their social media activities. They
introduced social media as a data source for identifying symptoms of
depression in a user. They used different features for their analysis namely,
user engagement and emotion, depressive language use, linguistic style, ego-
network characteristics such as followers and followees number, and mentions
of antidepressant medications.

Based on this study, depressed people have notable self-focused attention,
lower social activity, higher negative emotion, raised medicinal and
relational concerns and increased indication of religious thoughts. In
addition, depressed individuals tend to have virtual activities mainly after
8:00 pm or in the early morning, while non-depressed people prefer to be
active on online social media, after work-time and mainly early nights. In
this study, several classifiers were tested and SVM, with an average accuracy
of 70% and precision of 74% for depression class resulted in the best outcomes
69.

In 2015, Tsugawa et al. identified a method to show the depression level in
Twitter users. They used past activities of users to make different
classifiers among which SVM had the best performance with 61% precision and
66% accuracy. The main features used in their model were word frequencies,
tweets’ topic , ratio of positive-affect and negative affect words, tweets’
daily frequency, average number of words per tweet and several metadata such
as number of followers 209.

Orabi et al.(2018) used CLPsych 2015 shared task, containing Twitter posts
tagged with depressed, control and PTSD as their training dataset. They also
used Bell Let’s Talk 215 as the test dataset in their study. They used
different Word embeddings such as Skip-Gram, CBOW, Optimised and Random and
then fed them to various Deep Learning networks, three CNN-based and one RNN-
based models for the evaluation phase. The CNNWithMax model, one of those
three CNN-baseds, showed the best performance with an accuracy of 87.957% and
precision of 87.435% 153. Also, in 2019, Arora et al. 15, Ziwei et al. 229,
Tao et al. 200 and some more researchers studied depression on Twitter
leveraging sentiment analysis techniques considering the sentences’ polarities
(positive, negative, or neutral). Besides, a recent study by Martins et al.
132, the NRC Emotion lexicon and NRC Affect Intensity lexicon were used along
with ML and text mining techniques for their analysis. Table 1 is a summary of
different studies done with various approaches aiming at contributing to
depression identification issues.

####  2.3.3 Knowledge-Based Approaches

Knowledge base refers to a set of information and concepts, mainly in a
specific field, being organised into a taxonomy, instances for each concept,
and relationships among them 29, 50. Based on the literature, several studies
have leveraged knowledge-based systems with this objective to develop various
state-of-the-art automated systems. Knowledge-based summarisation systems 205,
85, Recommendation Systems 174, 221, 74 and social streaming analytics 50 are
some examples of these kinds of systems.

On the other hand, a knowledge graph is a kind of knowledge base, empowered by
an inference motor 73. Knowledge graph is a complex net of various entities
and their interrelations 159 that could be related to a specific organisation
or area. Knowledge graphs can collect, extract, and integrate information
about external resources 28. These capabilities lead to constructing an
integrated knowledge-based system 73.

‘Kosmix’ is an example of knowledge-based systems, enabling various
applications and helping with gaining insight into a variety of issues on
social media. Kosmix is a framework for social data streams analytics and
identifying the significant incidents that are becoming apparent. It is
empowered by a scalable real-time data processing foundation such as RDBMs and
Hadoop 50.

The popularity of using knowledge bases in different
areas232323https://www.ibm.com/cloud/learn/knowledge-graph is illustrative of
its power to help with finding new solutions and insights in decision-making
processes 34. Given the possibility of creating solutions for complex
problems, KBs could be considered as beneficial tools for problem solving in a
variety of fields, such as mental health issues. In recent years, very few
pioneer works conducted studies related to the using knowledge bases and the
contextualised data-driven from them, for identifying mental and behavioural
disorders.

Few recent studies tried to use knowledge-based approaches to formalise
cognitive science knowledge related to behavioural disorders. For example,
Beheshti et al. 32 provided a new data analytics approach for analysing
behavioural disorder patterns in social media platforms. They created a
domain-specific KB based on the golden standards in personality and
behavioural studies. Figure 6 demonstrate an example snippet of the domain-
specific knowledge base for behaviour disorders, introduced by them.

They applied the KB for developing cognitive systems that intelligently
contextualise and prepare raw social data for behavioural analytics. For this
aim, they proposed a word embedding approach based on patterns to be
implemented over each extracted feature to create a social behaviour graph
model. As mentioned in their study, the proposed method could be applicable
for identifying more specific mental disorders, such as depression and
anxiety.

Figure 6: A segment of the domain-specific knowledge base for behaviour
disorders 32.

####  2.3.4 Summary and paper Contribution

Mental disorders were the leading sources of global health-related burden,
with anxiety and depression problems accounting for the majority of cases. In
recent years, the global COVID-19 pandemic has even worsened the situation.
People who are suffering from mental health conditions mostly visit a
psychologist to receive supportive advice on their mental situations. In the
clinical studies/approaches aiming at screening and identifying potential
depressed patients and depressive symptoms, questionnaires (e.g., 3 189, 127
and 4 64, 61) and also interviews are mainly used by psychologists 55.

Mental health disorders include a wide range of symptoms, risk factors,
relationships, and effective interconnections. Most of those disorders (e.g.,
depression) are not easily identifiable due to their complexity and need lots
of time and effort to be identified 62, 80. As a result of complexity, mental
disorders will not be easily automated or translated into the insights to help
clinicians with their identification tasks. It also causes limitations for
studies, aiming at using ML and automated analysis in this field. On the other
hand, mental disorders such as anxiety and depression are complex subjective
issues 62, 80. These complexities and subjectivity lead to the fact that
having progress in mental disorder issues requires more time, study, and
research.

On the other hand, as mentioned in section 2.3, there are lots of evolving
studies have been done, and various approaches have been implemented to help
with the assessment, screening, identification and prediction of depression.
On the other hand, those approaches have evolved to identify better and treat
mental disorders. For example, as mentioned before, there are several versions
of questionnaires developed during years aiming at progress in depression
screening and identification. Although there are valuable progress and
improvements in this field, there is still a huge need for further research
and contributions to help with identification, prediction and treatment of
mental disorders such as depression.

As our first contribution, we introduce a general-purpose Mental Disorder
Knowledge Base (MDKB). Leveraging knowledge-based approaches, the cognitive
and psychological knowledge associated with mental health disorders are
organised in the form of a knowledge base, providing a rich structure of
relevant entities, semantics, and relationships among them. This knowledge
base could help with decision-making processes by extracting insights into the
mental conditions of potential patients.

## 3 Method

In the previous Section, Section 2, we studied and analysed the various
clinical and non-clinical approaches to identifying mental health disorders.
We highlighted that state-of-the-art research in identifying Mental Disorder
(MD) patterns from textual data, uses hand-labelled training sets, especially
when a domain expert’s knowledge is required to analyse various symptoms. This
task could be time-consuming and expensive. To address this challenge, in this
Section, we present a novel approach to facilitate mining of mental disorder
patterns from textual data. We leverage the domain knowledge and expertise in
cognitive science to build a domain-specific Knowledge Base (KB) for the
mental health disorder concepts and patterns. We present a weaker form of
supervision by facilitating the generating of training data from a domain-
specific KB.

## 4 Constructing A Domain-Specific Knowledge Base

In this section, we explain our methodology to leverage the domain knowledge
and expertise in cognitive science to build a domain-specific Knowledge Base
(KB) for the mental health disorder concepts and patterns. As illustrated in
Figure 7, construction of the proposed mental health disorder Knowledge Base
(mKB) consists of five steps: (i) exploring scientific sources; (ii)
extracting related concepts, instances and relation- ships; (iii) constructing
the hierarchical taxonomy; (iv) developing instance-to-lexicon connector APIs;
and (v) developing instance score calculator APIs from input textual data.

Figure 7: The five-step process of constructing mental disorder knowledge
base.

### 4.1 Step 1: Exploring Scientific Sources

In the first step, a set of golden standards in cognitive computing that are
related to mental disorders are explored. There are several best practices,
research, online sources, guidelines, and manuals associated with mental
disorder identification, helping with constructing the mKB. For example, some
of the golden standards and best practices in this field are ‘Diagnostic and
Statistical Manual of Mental Disorder’ 72 and ‘Clinical Practice Guidelines
and Principles of Care for People with Dementia’, developed by the American
psychiatric association and the Australian Government National Health and
Medical Research Council (NHMRC) 103, respectively.

In addition, ‘ICD-11’, a book by World Health
Organisation242424https://www.nice.org.uk/guidance/ng54 and ‘guidance on
assessment, diagnosis, and management of dementia’, published together by the
British Psychological Society and Royal College of Psychiatrists 58 are among
those sources. Also, ‘panic disorder, social anxiety disorder, and generalised
anxiety disorder guide’ 12, 2 contains guidelines for Clinical measures
developed by ‘Royal Australian and New Zealand College of Psychiatrists’.
These sources could be used for constructing the proposed mKB.

### 4.2 Step 2: Extracting Concepts, Instances and Relationships

In the second phase of constructing the mKB, after exploring previous studies
and golden standards such as those mentioned in Section 2, various mental
health related Concepts, instances, and relationships need to be extracted.
For example, in designing the mKB, we considered ‘Anxiety Disorders’,
’Depressive Disorders’, ‘Neurocognitive Disorders’, ‘Paraphilic Disorders’ and
‘Bipolar and Related Disorders’ as instances of the concept ‘Mental
Disorders’. Also, anxiety disorders, distinguished by a special way of
thinking and behaviours 12, contain instances such as ‘panic disorder’,
‘social anxiety disorder’, ‘agoraphobia’, and ‘generalised anxiety disorder’.

Each of these instances would probably consist of some concepts, such as ‘Risk
Factors’, ‘Symptoms’, and ‘Supportive Symptoms’. As an example, ‘Negative
encounters’ could be a risk factor for social anxiety disorder and are very
likely to occur in children who are ridiculed, abused, and neglected 56.
Therefore, negative encounters could be considered as instances of the social
anxiety disorder risk factors. On the other hand being bullied, rejected, and
also ridiculed are considered to be instances of negative encounters. Social
anxiety disorder has symptoms such as fear or anxiety attacks, considered to
be its instances. 12, 72. The rest of the concepts, instances, and
relationships in the mKB are extracted in the same way as explained for
anxiety disorders.

### 4.3 Step 3: Constructing the Hierarchical Taxonomy

In this step, all of the extracted mental health disorders related concepts
and instances are organised into a taxonomy, being a hierarchical structure
for classifying those concepts and instances. The mental health disorder
taxonomy contains six main levels. The main concept (i.e., ‘Mental Disorders’)
is placed on the top level. The second level contains various instances of
mental disorders (e.g., ‘Anxiety Disorders’) each of which represents a
specific group of diseases. For example, ‘panic disorder’, ‘social anxiety
disorder’, ‘agoraphobia’, and ‘generalised anxiety disorder’ are contained in
a group that ‘Anxiety Disorders’ is its representative. All of the instances
in this level are connected to the previous level concept (i.e., ‘Mental
disorders’) and also to the next level (i.e., third level) instances which are
all single disorders contained in a group of related disorders as mentioned
before.

Each specific instance in the third level is linked to a set of related
concepts in the fourth level. These concepts in the fourth level are ‘Risk
Factors’, ‘Symptoms’, and ‘Supportive Symptoms’. Each concept in the fourth
level is connected to its instances in the fifth level and also to the
probable sub- and sub-sub- instances in the sixth level and afterwards. All
the above-mentioned connections (i.e., from up to down) are shown by solid
arrows. However, it is possible that some Concepts and instances would be
horizontally connected to each other. Those horizontal connections (i.e.,
relationships) are shown by dotted arrows. Figure 8 is a snapshot of the
mental health disorder Knowledge Base focuses on depression, being one of the
main causes of disability globally 69, 124. It contains different concepts
related to each mental disorder, instances of each concept, and the
relationships among them. Vertical solid connections are mainly indicative of
relationships between concepts and their instances (e.g., impaired cognitive
functioning is an instance of retardation 45), while horizontal dotted
connections are illustrating the different kinds of probable relationships
(e.g., impaired cognitive functioning could cause negative emotion) 124.

Figure 8: A snapshot of the mental health disorder Knowledge Base focuses on
depression, being one of the main causes of disability globally 69, 124. It
contains different concepts related to each mental disorder, instances of each
concept, and the relationships among them. Vertical solid connections are
mainly indicative of relationships between concepts and their instances (e.g.,
impaired cognitive functioning is an instance of retardation 45), while
horizontal dotted connections are illustrating the different kinds of probable
relationships (e.g., impaired cognitive functioning could cause negative
emotion) 124.

### 4.4 Step 4: Developing Instance-to-Lexicon Connector APIs

Kinds of words (e.g., self-focused words, hate speech, positive or negative
emotion, death-related, anger), sentence sentiments, and natural language that
are used in the daily communications are reflections of individuals’ real-life
manners, thoughts, cognitive processes, behaviours, and mental health status
87, 186, 6, 69, 203, 184, 208, 68. According to numerous studies, there is a
clear link between a set of words and the presence of distinctive content
(e.g., profane 170, self-criticism 208, negative emotion 68, suicidal
attempt/ideation 77) in textual documents.

As a result, we proposed to use lexical resources for depression
identification through text analyses. Hence, prior to this step, various
lexical resources are fed into the mKB-related taxonomy, aiming at turning
that taxonomy into a lexical-driven knowledge base, which facilitates textual
data mining. The goal is to use a collection of related words that can be used
for extracting the context-specific features (i.e., linguistic or emotional
features) from the text. Some examples of valuable lexicons are
LIWC252525http://www.liwc.net/(i.e., psycholinguistic lexicon), ANEW
(Affective Norms for English Words) 43, 145, NRC 139, 140, Warriner Lexicon
212, and MPQA 214. These lexicons contain several categories, related to a
specific emotion, behaviour, affect, or linguist style associated with an
instance in the MD taxonomy.

For example, LIWC contains the ‘sadness’ category, consisting of a list of
around 1,300 words related to sadness. On the other hand, under the ‘Depressed
mood’ category of the MD-related taxonomy, there is an instance named
‘sadness’. In this step, these associated items will be linked together by
leveraging several APIs. A unique API is developed for each of the instances
in the fifth level or their sub-/sub-sub instances in the next levels, and
embedded into the mKB. Each of these APIs is a Machine Learning (ML) algorithm
that links the corresponding instance (i.e., included in the MD-related
taxonomy) to one of the proper input lexicons, as well as the proper category
of that lexicon. This step helps with constructing an MD-related taxonomy
enriched with thousands of words 10.

### 4.5 Step 5: Developing Instance Score Calculator APIs from Input Textual
Data

In this step, several APIs are developed, each of which is associated with one
of the instances in the MD-related taxonomy. APIs are ML algorithms, that
calculate the feature scores (e.g., sadness score), corresponding to each
instance (e.g., sadness), via analysing input textual data. calculated feature
scores act as fundamental parts of our proposed mKB, which enables automated
knowledge-based analysis. One of the automated tasks, empowered by using this
knowledge-based analysis is the identification of probable individuals with
mental disorders. For example, through this research, a classifier is
developed (i.e., explained in Section 5), that enables identifying potential
depressed individuals, automatically. The main tasks, enabled by the instance
score calculator APIs are as follows:

  * •

Lexicon Level Preprocessing: Prior to any score calculations, all the words
included in each instance-related lexicons need to be preprocessed. The
preprocessing consists of removing unwanted and useless symbols, and
punctuation and also stemming all the words included in each lexicon. Stemming
is the technique of reducing words to their word stem, base, or root
form262626https://en.wikipedia.org/wiki/Stemming. Since the lexicon words will
be used for calculating similarity scores between each lexicon category and
the input text, stemming could be the most significant and effective technique
in this stage.

  * •

Linking the Curated Input Textual Data: As mentioned before, each instance in
the taxonomy is connected to the proper lexicon. The instance score calculator
API enables linking the curated input textual data to the related instance and
lexicon. Data curation is an automated process that prepares the raw input
data prior to further data analysis 29. In Section 5.1, the data curation
process is described in more detail.

  * •

Leveraging Textual Data Mining Techniques for Instance Score Calculation:
After cleaning and preparing the raw data, different features are extracted
from the cleaned data. There are two types of features that could be extracted
from the input cleaned/prepared data, namely text-related features and user-
related features. Sentiment polarity (i.e., positive, negative, or neutral
feeling conveyed through a text) and personality trait (e.g., being neurotic
or extravert) analysis are examples of text-related and user-related features,
respectively. Afterwards, our data is enriched by different techniques such as
stemming. Finally, after data cleaning, preparation, feature extraction, and
feature enrichment phases, the output (i.e., featured data) is ready for
further analysis and score calculation process 35.

In our proposed method, different scores such as cosine similarity scores,
suicidal behaviour scores, and personality trait scores are calculated. Cosine
similarity scores help us to identify the rate of similarity between the input
textual data (i.e., written by a potential depressed person) and the instance-
related lexicons. Those scores are expressive of how frequently an MD
instance-related words (e.g., sadness-related words) are used by a specific
individual. Consequently, they could be indicative of a specific MD-related
instance (e.g., sadness feelings) that the writer conveys and shows through
his written text.

Cosine similarity scores are calculated by the instance calculator APIs. They
are computed using different textual data mining techniques, such as NLP
techniques, consisting of ‘Term Frequency–Inverse Document Frequency’ (TF-IDF)
and ‘Cosine Similarity’. TF-IDF is a text mining technique for determining the
importance of a word in a collection or corpus of
documents272727https://en.wikipedia.org/wiki/Tf%E2%80%93idf. Each word in text
mining is given a unique coordinate, and a document is represented by a vector
representing the number of times each word appears in the document. Also,
cosine similarity is a useful metric for determining how similar two texts are
likely to be in terms of content, regardless of their
length282828https://en.wikipedia.org/wiki/Cosine_similarity.

On the other hand, motivated by a recent study 131, the probability of a
special kind of personality trait (e.g., neuroticism) could be extracted. This
probability is calculated by a specific API, connected to the personality
trait instance on the mKB. This API consists of a sophisticated algorithm,
using a 7-layer convolutional neural network and several NLP techniques such
as word2vec embedding. In addition, Suicidal behaviour (e.g., suicidal
attempts or ideation) scores are calculated using a special score calculator
API.

In addition, there could be other APIs that don’t need text mining techniques
for score calculation. For example, the ‘Gender’ or ‘Age’ instance-related
APIs would create simple numerical scores. For example, ‘Gender’ API’s scores
could be ‘0’ or ‘1’, indicative of the male or female users. Also, ‘Age’ API
could give some scores based on different pre-defined age ranges. Algorithm 1
demonstrate the process of instance score calculation for those APIs that
apply textual data mining techniques for this aim.

Data: Curated Input Textual Data

Result: calculated Instance-related Scores

The mKB Instances;

Linked Instance-related lexicons;

for  _Each Instance in the mKB_ do

Reading the Curated Input Textual Data;

Reading the linked lexicon;

Applying proper text mining techniques (e.g., Cosine Similarity Calculation);

end for

Algorithm 1 The process of instance score calculation in API’s that work based
on textual data mining techniques.

Finally, developed APIs are linked to corresponding instances, and embedded in
the taxonomy. After embedding the APIs into the taxonomy, it technically turns
into a knowledge base. Through this KB several mental disorder scores would be
calculated. These scores could be shown as an extracted knowledge from mKB
aiming to give some insight and alarms to the analysts or psychologists. This
knowledge besides analysts’ experiences could probably be informative, helping
them make more accurate identifications.

## 5 Developing a Weakly Supervised Classifier for Target Mental Disorders
Using Domain-specific KB

ML algorithms have notable real-world applications. Most of these applications
are enabled by leveraging deep learning models and existence of various open-
source ML platforms such as TensorFlow and PyTorch, as well as a large number
of modern models. However, large hand-labelled training datasets are required
for these models to perform well 166.

In recent studies, hand-labelled training data sets have been employed to find
mental disease patterns from textual data. Benefiting from experts and
psychologists knowledge to label a dataset with presence or absence of a
disorder could be an expensive and time consuming task. Besides, evolving
nature of knowledge, makes it necessary to access re-labelling mechanisms for
more accurate data analysis tasks 166. In cognitive science area, which
includes high levels of subjective knowledge, having access to labelled data
for analytical tasks is even more crucial 33. Weak supervision is a learning
approach in which a higher level source of supervision can be used to generate
a larger training sets 166. In this section, we leverage the mental health
domain-specific Knowledge Base (mKB), discussed in previous section, to
propose a weakly supervised mental disorder classifier. Using the cognitive
and psychological knowledge that is embedded in the mKB acts as a kind of
domain experts knowledge to be used as a labelling asset, contributing to the
creation of more labelled training data sets for cognitive analytics.

Our approach will enable the mKB to be the main source of supervision. The
mKB, is a general KB, consists of several instances of mental disorders and
their related concepts and instances. Our proposed approach is applicable at a
time to one of the mKB’s disorders (e.g., depression), which is called Target
Mental Disorder (TMD). The mKB, is empowered with several APIs, which are
calculating TMD-related instance scores. These scores are valuable features,
associated with specific cognitive, behavioural, and mental conditions, which
enable the process of labelling training data sets for any other studies
related to mental disorders.

Figure 9 illustrates the proposed pipeline for developing a target mental
disorder classifier. There are several stages included in developing the
proposed pipeline, as follows: (i) ‘Data Curation’; (ii) ‘Linking Extracted
Features to TMD-ralated Instances in mKB’; (iii) ‘calculating Scores for TMD-
related Instances leveraging mKB APIs’; and (iv) ‘Developing a Target Mental
Disorder Classifier’. Our proposed approach offers an extensible framework by
adopting a service oriented architecture 26 to enable new analytical features
to be plugged into the system in an easy way. For example, if we find it
effective to add other features (e.g., ‘swear words’, ‘hate speech’ or
‘profane words’ scores) to our model, then the extensible architecture will
facilitate this for the analyst.

Figure 9: The proposed pipeline for developing a weakly supervised mental
health disorder classifier, leveraging calculated scores for Instances related
to a Target Mental Disorder (TMD), generated by mKB. Figure 10: Data curation
process motivated by Beheshti et al. study 29.

### 5.1 Data Curation

Data curation defines as a process that turns the raw data into contextualised
data and knowledge 29. This process helps the ML algorithms run more
efficiently. Motivated by two recent studies 27, 29, as Figure 10
demonstrates, the raw textual data needs to be prepared and curated before any
further analysis. The curation process contains 3 phases, namely (i) Data
Cleaning; (i) Feature Extraction; and (iii) Feature Enrichment, which are
explained as follows.

  * •

Data Cleaning: There are different techniques and tools that could be used for
cleaning textual data. For example, with the help of some ML packages and
their corresponding methods(e.g., XML, Pandas, and RegEx (i.e., regular
expressions)) useless data (e.g., punctuation, numbers, symbols, etc) could be
removed or some special parts of raw data (e.g., acronyms such as PSTD) could
be replace with the proper real words (e.g, Post Traumatic Stress Disorder )).
Also, special noisy data formats (e.g., HTML and web-related data) could be
turned into much easy-to-work formats (e.g., DataFrame). Besides, crowd-
sourcing is a modern approach for cleaning social data. In this approach, the
knowledge of the crowd (e.g., Amazon Mechanical Turks) is used for some
correction tasks (e.g., spell- or abbreviation-checking).

  * •

Feature Extraction: There are two types of features that could be extracted
from the clean data, namely ‘Text-Related Features’ and ‘User-Related
Features’. The text-related type consists of ‘Natural Language’, ‘Lexical’,
and ‘Time/Date’ features . The user-related type consists of the user’s
‘Personality Trait’, ‘Age Range’, and ‘Gender’. Some of these features are
explained as follows.

    * –

Natural Language Feature refers to entities that could be retrieved from
Natural Language and speech through ML analysis. It includes Part-of-Speech,
named entities, etc. Verbs (e.g., developed, caused, felt, experienced ),
Nouns (e.g., psychiatrist, depression, anxiety, acid Reflux, Acticlate, Zoloft
), and adjectives (e.g., nauseous, busy, terrible, bothering) are some
examples of the Part-of-Speech. Person names (e.g., Jean Piaget and Albert
Bandura), Organisations’ names (e.g., Royal Prince Alfred), locations (e.g.,
Sydney) are also some instances of named entities 105.

    * –

Lexical Feature includes examples such as Keyword (e.g., hypochondria,
depressive episode, depression), Topic (e.g., Daily Acid Reflux292929A
digestive disease in which stomach acid or bile irritates the food pipe
lining.), Phrase (e.g., ’with my psychiatrist’s help’), Abbreviation (GAD and
IBS), and Spelling Errors.

    * –

Time/Date Feature refers to the time (14:14:54) or date(2017/02/21), when a
text is created. This feature could help with getting insight into the
probable sleep time or when a user is mainly active in social media. It could
be a valuable feature in the time series analysis.

    * –

Personality Trait Feature consists of different personality traits (e.g.,
neuroticism, extraversion, openness, etc). It is one of the user-related
features, extractable via different modern textual analysis techniques 131. A
personality trait could contribute to suffering from several mental conditions
112, 114, 113, and could be an important feature to be considered in the
cognitive analysis.

  * •

Feature Enrichment relates to utilising relevant sources and services (e.g.,
WordNet303030wordnet.princeton.edu/ and STANDS4313131abbreviations.com/abbr
api.php) to identify synonyms and stems for a keyword that has been extracted.
For example, ’traumatic’ as a keyword could be enriched with its synonyms such
as ’disturbing’, ’shocking’, ’distressing’ and ’upsetting’. IBS and GAD are
two keywords which are extracted from the text. IBS and GAD are two acronyms,
that are equivalent to two types of disorders, namely ‘Inflammatory Bowel
Disease’ and ‘Generalized Anxiety Disorder’. Identifying these equivalents
relationships leads to creating more enriched data to help with accurate data
analysis tasks.

### 5.2 Linking Extracted Features to the TMD-related Instances in the mKB

Each mental disorder included in the mKB (e.g., depression) contains several
instances (e.g., ‘Sadness’, ‘Suicidal Behaviours’,‘Gender’). To link these
instances to the curated data and extracted features, each instance is
provided with an empty list. Then, extracted features (e.g., stemmed keywords
or phrases) are added to the corresponding instance list. The kind of added
features to the list is dependent on the type of the related instance. For
example, extracted gender(i.e., male or female) related to the writer of a
text is added to the empty list provided for the instance of ‘Gender’ in the
mKB.

Besides, for ‘Sadness’ instance, for example, we need extracted features to be
added to the list. On the other hand, there are some instances such as
‘Suicidal behaviour’ that need the whole raw text (i.e., written by each
user), instead of extracted features, to be added to the corresponding list,
aiming at counting the number of suicidal phrases via corresponding API.
Algorithm 2 illustrates the process of linking extracted features to the
corresponding instances in the mKB.

Data: Curated input textual data

Result: List of features that are linked to the instances of the mKB

Specify the TMD;

Extract Features from textual data;

TMD_ralated_Instances = Set up and Array for TMD-ralated Instances in the mKB;
%(e.g., ‘Negative Feeling’, ‘Anxiety’, ‘Sadness’, etc.)

for  _Each TMD_ralated_Instances_ do

Generate an empty list;

for  _Each feature in Extracted-Feature_ do

Add the feature to the corresponding instance-related list;

Link Extracted Features to the instances in mKB;

end for

end for

Algorithm 2 Linking Extracted Features from input textual data to the TMD-
ralated Instances in the mKB.

### 5.3 Calculating Scores for the TMD-related Instances Leveraging mKB APIs

The mKB is empowered by several APIs for calculating the instance scores. Each
of those APIs has a separate functionality. Some of them (e.g., the ‘Suicidal
Behaviour’ or ‘Special depressive phrases’ API) create scores that are
indicative of the counted numbers of special phrases that are use in a cleaned
text. On the other hand, some of them (e.g., ‘personality Trait’ API) create a
score that is the probability of having a special personality trait (e.g.,
neuroticism) by analysing a cleaned text.

The linked extracted features (i.e., from Section 5.2) are the input for
corresponding instance-related APIs. This input enables the score calculation
processes for each of the TMD-related Instances. For example, a list of
extracted stemmed tokens is linked to the ‘Sadness’ API. This API calculates
the cosine similarities between the linked list and the related lexical
source, being attached to the instance. The calculated scores act as input
features for developing a learning algorithm (i.e., a classifier), and are fed
into the next step. Algorithm 3 demonstrates the process of calculating scores
for the TMD-related instances, leveraging mKB APIs.

Data: Linked Features (i.e., the Algorithm 2 output)

Result: Scores Related to Instances

Specify the TMD;

for  _Each TMD-related Instance in mKB_ do

Instance-related Score = Embedded-score-calculator-APIs(linked features);

%Embedded-score-calculator-APIs() is a function for calculating scores

%functions mainly use techniques related to TFIDF or Cosine Similarty
calculation

end for

Algorithm 3 Calculating Scores for TMD-related Instances Leveraging mKB APIs.

### 5.4 Developing a Target Mental Disorder Classifier

In this step, the calculated scores for each TMD-related instance act as input
features of the TMD-related classifier. several ML algorithms such as Random
Forest, Logistic Regression, SVM and XGbooster could be deployed to develop
this classifier. After feeding related scores, a binary learning algorithm is
developed to classify whether an input text is associated with a target mental
health disorder or not.

For example, considering depression as a TMD, the corresponding classifier
would take a textual document and give it the labels of ‘0’ or ‘1’ for ‘not
depressed’ or ‘depressed’ tags, respectively. In the next Section, we will
discus how we create a depression-related classifier with a high accuracy,
using ensemble techniques. Algorithm 4 illustrates the process of developing a
TMD-related classifier.

Data: Calculated Instance-related Scores

Result: Developed TMD-related Classifier

Specify the TMD;

for  _Each TMD-related Instance_ do

Generate Instance score using related API;

Integrate all the scores as a feature array;

Deploy a Proper ML classifier using the feature array;

end for

Algorithm 4 Process of Developing a TMD-related Classifier.

## 6 Evaluation and Experiment

In this Section, the outcomes derived from the proposed method in Section 3
are explained and evaluated. We will demonstrate how this model can help
analysts and domain experts to get insight into the mental health status of
their target population. First, a depression-related motivating scenario is
described, clarifying the importance of this research. Afterwards, we present
the experimental setup, the dataset, experimental results, and evaluation of
our method.

### 6.1 Motivating Scenario

The mental health of individuals and communities is a pressing challenge in
the world, nowadays. Since
COVID-19323232https://en.wikipedia.org/wiki/COVID-19 pandemic outbreak in
2019, most governments have been preoccupied with handling and combating the
epidemic. After the global success in vaccine development, a key concern for
most governments is to harness the impacts of years of virus exposure,
including the associated psychological problems in the community. Based on a
recent study, after being diagnosed with Covid, roughly one out of every five
people develops a mental disorder 201. Data from the United States and
Australia show elevated rates of depression throughout the epidemic; It is
estimated that during the outbreak, depression level (i.e., 25%) is seven
times higher than pre-pandemic levels worldwide (i.e., less than 4%) 91.
Hence, it could be a critical issue for governments to monitor, identify and
take proper actions in this regard.

Due to the importance of the issue, as a motivating scenario, we focus on
depression. We use the framework proposed in Section 3 to highlight how our
method significantly assists e-safety333333https://www.esafety.gov.au/
community to monitor and identify the trend for the emergence of depression-
related symptoms, during special periods of time such as the Covid-19 period.
We leverage the domain specific KB (that discussed in Section 3) and expertise
in cognitive science to build a domain-specific Knowledge Base (KB) for
depressive patterns. This KB contains a set of depression-related concepts
organised into a taxonomy, instances for each concept, and relationships among
them. Then, we use the proposed weakly supervised learning approach (Section
3) by facilitating the generating of labelled training data from depression-
related KB. To evaluate our approach, we adopt a typical scenario for
analysing social media to identify major depressive disorder symptoms from the
textual content generated by social users.

### 6.2 Experimental Setup

####  6.2.1 Experiment Environment

We use Jupyter notebook from Anaconda 3 environment, Python version ’3.9.0’,
Pandas (’1.3.4’), NLTK (’3.5’), Sklearn (’1.0.1’), XGBoost (’1.5.0’) for
performing our NLP, textual data analysis, and developing depression-related
classifier.

####  6.2.2 Dataset

People’s ideas and feelings can be viewed through social media platforms such
as Twitter. New studies have centred on the investigation and mining of such
data in a range of fields, including financial systems, politics, and
healthcare 68. On the other hand, social media is a rich source of textual
data, enabling researchers and data scientists analyse cognitive processes and
behavioural patterns of the social media users 69, 183. Hence, as we are
interested in identifying potential depressed individuals (i.e., part of our
motivating scenario) through textual data mining, we use a real-world
dataset343434https://github.com/BigMiners/eRisk2018 from
Reddit353535https://en.wikipedia.org/wiki/Reddit, i.e., a social news
aggregation, web content rating, and discussion Website. The dataset contains
820 users, each tagged with ‘1’ (i.e., ‘depressed’) or ‘0’ (i.e., ) ‘not
depressed’ labels. From a total of 820 users, 79 were tagged as depressed and
the rest (i.e., 741 users) were tagged as not depressed. The raw data is in
the form of XML files and it is organised into ten chunk’s. Each chunk
contains 820 folders (each folder for one user), and each folder consists of
parts of the posts related to one of the 820 users. Considering all of the
posts related to each user (contained in all 10 chunks), the average number of
posts for each user is 664 numbers.

### 6.3 Experimental Results

In this part, we describe the experimental results derived from our method.
First, we explain the construction of depression-related KB. Then, we explain
the process of developing a weakly supervised classifier for depression, using
the results derived from the constructed depression-related KB.

####  6.3.1 Constructing a Depression-related Knowledge Base

As mentioned before, a knowledge base consists of a taxonomy, several
concepts, sub-concepts, instances, and the relationships between them. Figure
11 illustrates a snapshot of the depression KB, containing some of the
concepts and instances used in the evaluation part. A more detailed Image of
depression concepts and instances could be found in the Figure 8. In this
section, different steps for constructing depression-related KB are described.

Figure 11: A Snapshot of depression KB, containing some of concepts and
instances used in evaluation part.

  * •

Concepts and Instances of Depression-related KB In this section, different
components of depression-related KB, namely concepts (i.e., ‘Symptoms’, ‘Risk
Factors’ and ‘Supportive Symptoms’) and their instances are explained. We also
describe how different components are linked to each other. We also represent
some examples in each part for more clarifications and ease of interpretation.

    * –

‘Symptoms’

There are nine main depression symptoms, namely ‘Sleep pattern change’,
‘Appetite/Weight change ’, ‘Diminished ability to think ’, ‘Loss of Interest
’, ‘Psychomotor Problems ’, ‘Suicidal behaviour ’, ‘Depressed Mood ’,
‘Negative self-evaluation ’, ‘Fatigue ’. We consider them as nine instances
linked to the ‘Symptoms’ concept.

Impaired cognitive functioning, being the sub-instance of psychomotor
problems, has several instances such as ‘decision-making difficulty’. On the
other hand, ‘Indecisiveness’ is an instance of the concept of ‘diminished
ability to think’. Since indecisiveness and decision-making difficulty both
are the same impaired cognitive functioning, they are connected in the KB by a
dotted arrow indicative of the ‘same as’ relationship.

    * –

‘Risk Factors’

There are four instances of the ‘Risk Factors’ concept. They are ‘Demographic
features’, ‘Previous Episodes’, ‘Personality Trait’, ‘Major non-mood
Disorder’. These instances are placed under the ‘Risk Factors’ concept, in the
KB. Some of these instances such as Personality Trait consists of some more
sub-instances.

A personality trait is one of the depression risk factors. ‘Neuroticism’ is
the most significant instance of the personality trait concept, consisting of
the ‘negative emotion’ and ‘distress’ as its instance and sub-instance,
respectively. In the KB an instance (e.g., negative emotion) is linked to its
upper concept (i.e., the personality trait of neuroticism) or its following
instance (e.g., distress) by a solid arrow. Besides, the relationships between
instances of a concept to the other concepts or their instances are shown as
dotted lines.

    * –

‘Supportive Symptoms’

There are 10 instances of the ‘Supportive Symptoms’ concept. They are
‘Anxiety’, ‘Self-focused attention’, ‘Abnormal Fear/Phobia’, ‘Tearfulness’,
‘Physical pains’, ‘Special depressive Phrases’, ‘Irritability’, ‘Obsessive
Rumination’, ‘Absolute words’, ‘Depression-related unigrams’. Some of these
instances such as Depression-related unigrams include some sub-instances such
as ‘Depression-Treatment’ and ‘Depression-Symptoms’. These sub instances are
indicative of special terms related to depression treatment or symptoms, for
example.

in addition, ‘Anxiety’ and ‘self-focused attention’ are two instances of
depression supportive symptoms concept. Anxiety is caused by excessive
distress. Hence, they are connected to each other by a dotted arrow,
indicating a ‘cause in’ relationship. In addition, the feeling of
worthlessness/self-criticism could lead to increased self-focused attention.
Therefore they are also connected by the dotted arrow.

  * •

Lexical Sources Linked to the Depression-related KB In this research, we use
several lexical sources to be linked to the depression-related KB. As Figure
12 illustrates, our final lexical database is in the form of an excel file. It
is constructed by merging four lexicons, namely LIWC2015 lexicon (i.e.,
categories related to depression instances) 161, NRC emotional lexicon 140,
absolute word lexicon 6, depression Uni-gram lexicon 69. Different lexical
sources, used in the construction of this research lexical database, are
described as follows.

    * –

LIWC2015:  As explained in Section • ‣ 2.3.2, LIWC2015 is one of the main and
golden standard computerised text analysis tools. It is a valuable resource
that is widely utilised for measuring positive and negative affects 68, 88, as
well as extracting various word-based features from textual data 161, 203,
162. LIWC2015 consists of an English dictionary with 90 linguistic,
behavioural, and psychological categories. Each category includes a list of
related words. In order to construct the depression-related KB, we used all of
the categories, related to the depression instances.

    * –

NRC Emotion lexicon:  It is a broad, high-quality English term-emotion
association lexicon focusing on ’joy’, ‘sadness ’, ‘anger ’, ‘fear ’, ‘trust
’, ‘disgust ’, ‘surprise ’, ‘anticipation’ 140. To enrich the categories word
list, we merge them with proper categories of NRC Emotion lexicon 138,
including For example, we merge all the words in the ‘negative emotion’
categories of both LIWC and NRC, together. On the other hand, some NRC
categories such as ‘disgust’, being an instance of negative emotion in
depression-related KB, was separately used to form the list of related words
of ‘disgust’ instance.

    * –

Absolute word lexicon:  Depressed individuals mostly talk in absolute language
and use greater percentage of absolutist words in their natural language and
daily communications 186, 6. In this study we use the absolute word list,
developed by Al-Mosaiwi et al. 6.

Figure 12: A snapshot from a part of lexical database used in this research.
It is constructed by merging four lexicons, namely LIWC2015 lexicon (i.e.,
categories related to depression instances) 161, NRC emotional lexicon 140,
absolute word lexicon 6, depression Uni-gram lexicon 69.

    * –

Depression Uni-gram Lexicon: Based on a study by Chouldhary et al. 69,
depressed people tend to use special depression unigrams and terms in their
communications. Through their study they developed a lexicon of some
depression-related categories. In this study, we use those lexicon to make a
more comprehensive lexical database.

    * –

Suicidal phrases source: Based on Fernandes et al., there is a list of terms
and phrases, used to detect and extract documents that may include references
to attempted suicide 77. This list may aid in the identification of suicidal
thoughts and attempts in textual
data363636https://github.com/andreafernandes/NLP_Tools_Development. Hence, in
this research, we leveraged this list of words and phrases, aiming to
calculate a score for this symptom. Table 2 illustrates different phrases
related to suicidal behaviours.

Table 2: List of terms and phrases used to detect and extract documents that
may include references to attempted suicide or ideation in this regard 77.

  * •

Depression-related KB’s APIs:  In depression-related KB, we deployed several
APIs, aiming at calculating instance-related scores. There are three kinds of
APIs used in our KB construction. The task and the structure of each API are
explained as follows.

    * –

Instance to Lexicon Connector API:  In this step, each depression-related
instance is empowered by an APIs, which is linking the instance to the proper
lexical source. For example, there is a special API that connects the
‘Absolute word’ instance to the ‘Absolute word lexicon’, also another API
links the suicidal behaviour instance to the suicidal phrase’s source, etc.

    * –

Cosine Similarity Calculator API:  In addition to the Instance to Lexicon
Connector API, most of the instances are linked to another API, which provides
different instances with the cosine similarity scores. This API, which is
linked to the instance-related lexical source, uses different NLP techniques
(e.g., TFIDF and Cosine Similarity) to calculate those scores.

In those APIs that are created for cosine similarity calculation, TFIDF
technique is applied, first. For this aim, concatenated texts in each of the
10 chunks for each user (i.e., mentioned in Section 6.2.2), are considered as
different documents. These documents, used in the TFIDF technique, make it
possible that important and meaningful words, that are used by each user, to
be considered in the analysis. Consequently, we could come up with reliable
results.

    * –

Suicidal Behaviour API:  We use a list of phrases, related to suicidal
behaviours for identifying the scores of suicidal attempts or ideation from
texts. Suicidal behaviour API consists of the regular expressions to count the
number of suicidal phrases in texts. the calculated number is used as the
calculated score to be used in further stages.

####  6.3.2 Leveraging the Proposed Pipeline to Classify the Textual Data as
‘Depressed’ or ‘Not depressed’

After constructing the depression-related KB, several calculated instance
scores enable us to develop an automated machine learning (ML) algorithm
(i.e., depression classifier). This algorithm is equipped with the knowledge
derived from the mKB and could be used in labelling different texts into
‘depressed’ or ‘not depressed’. For example, if a text is labelled as
‘depressed’, it shows that the writer of the corresponding text was probably
depressed. In this approach, we use a data analytics tool for identifying the
depression status of a person who wrote a text, instead of receiving direct
consultancy or supervision from experts or psychologists. Hence, this
classifier is considered to be a kind of weakly supervised learning algorithm.
This classifier could facilitate many future depression-related studies in
terms of creating a large amount of labelled data (i.e., training data set)
for their deep learning analysis. In this section, as shown in Figure13, we
apply the proposed pipeline explained in Section 5 to develop a learning
algorithm for depression identification by textual data analysis.

  * •

Pre-Processing and Data Curation:  As mentioned before,in Section 6.2.2, our
input dataset (i.e., Reddit posts) contains 820 users’ posts (i.e., posts of
each user is divided in to 10 chunks). They are in the form of ‘XML’ files,
containing the textual posts during different time ranges. In the first step,
through preprocessing and data curation process, the raw input data should be
organised into a proper format. Hence, we use the ‘XML’ and ‘pandas’ packages
to turn the XML files into data frame, making the ML analysis feasible. The
first data frame consists of 820 rows (i.e., the number of users) and three
columns, namely ‘user-names’, ‘depression status’ and ‘concatenated-texts’.
All the single posts of each user were concatenated together, forming a single
long text. This document forms the content in the ‘concatenated-texts’ column
of the data frame. The values in the ‘depression status’ column are ‘0’ or
‘1’, indicative of not-depressed and depressed tags, respectively.

We also create another data frame (i.e., the second data frame) containing
8200 rows, each 10 rows related to one of the users. It has the same columns
as the previous one. We used the content of this data frame for the ‘TFIDF’
and ‘Cosine Similarity’ scores, mentioned in Section – ‣ • ‣ 6.3.1.
Afterwards, we use regular expressions to remove stop words, symbols, numbers,
and other useless data from the texts. We apply NLP techniques such as the
word tokenisation method to the cleaned texts. In addition, all of the words
were stemmed using ‘nltk.stem package’. The output would be lists (i.e., in
the first data frame) or strings (i.e., in the second data frame) of words,
within a specific column in the data frames, which are considered to be our
extracted features. A part of Figure 13 is indicative of an example curation
process over a text, which is extracted from an XML input file. The final
result of curation part, is a list of stemmed forms of extracted and tokenised
features.

Figure 13: A snapshot of applying proposed pipeline in the Method Section,
containing an example curation process result.

  * •

Linking Extracted Features to the Depression-related Instances in the mKB:
For the evaluation part, we use 17 instances of depression KB (i.e., named in
the next part) that could be provided with a proper lexical source. In this
part, we assumed every single word that is used in the user’s texts is a
valuable asset to be considered in the analysis. Hence, we link stemmed and
extracted words from input text to the 16 (exclude one out of 17) instances in
the mKB. The linked data is provided in the form of a list of stemmed words,
related to each user to be used by the corresponding instance-related API for
score calculation. The excluded instance is the ‘Suicidal behaviours’
instance. This instance is not linked to the stemmed forms of extracted words,
but to the original cleaned text. The aim is to use this original text for
calculating a score for the ‘Suicidal behaviours’ instance, which is simply
the count of special phrases used in the texts.

  * •

Calculating Scores for Depressive Instances:  There are 17 depression-related
instances in mKB that are provided with score calculator APIs. These instances
are related to one of the three depression-related concepts, namely
‘Symptoms’, ‘Risk factors’, and ‘Supportive Symptoms’. Some instance scores,
such as those related to ‘having physical pain’ and ‘change in appetite’ are
not extractable by the KB APIs, because the current APIs are enabled by being
linked to the lexical sources. Lexical sources are great sources for
calculating linguistic- and emotion-related instances, not those related to
the individual’s physical status.

Figure 14: A snapshot of calculated lexical-enabled depressive instance
scores.

On the other hand, scores related to instances like ‘change in the sleep
pattern’ and ‘social activities’ could be calculated by analysing the related
metadata. For example, the time and the date of having an activity on social
media, the number of followers, or the people who are followed by a user, are
useful metadata for calculating some more instance scores. in this research,
we are just focusing on calculating the lexical-enabled instance scores,
regardless of other metadata-based scores. Consequently, 17 depressive
instances are considered to be used in our evaluation. Their related scores
(i.e. for 16 instances) would be calculated and used for developing the
depression classifier. Those features, as shown in Figure 14, being in the
form of calculated cosine similarity scores are fed into the classifier, as
its input features) in the next step.

In addition, the suicidal behaviour scores, calculated by the corresponding
API in the KB, are not in the form of cosine similarities. They are integers,
ranging between ‘0’ to ‘31’. On the other hand, calculated cosine similarity
scores ranged from ‘0’ to ‘1’. Hence, we normalised these instance scores,
prior to being fed to the classifier as its features. The normalisation
process is conducted by applying ’StandardScaler’ technique from
‘sklearn.preprocessing’ package, in Python. The depressive instances and their
corresponding concepts, which are considered in our evaluation, are as
follows:

    * –

Concept 1:  Risk factor-related features are ‘Negative Feeling’, ‘Disgust’

    * –

Concept 2:  Symptoms-related features are ‘Sadness’, ‘Discrepancy’,
‘Tentativeness’, ‘Certainty’, ‘Leisure’, ‘Suicidal behaviours’

    * –

Concept 3:  Supportive symptoms-related features ‘Self-focused attention’,
‘Anxiety’, ‘Anger’, ‘Fear’, ‘Symptom unigrams’, ‘Treatment unigrams’,
‘Disclosure unigrams’, ‘Relationship unigrams’, ‘Absolute words’

  * •

Classifier:  To identify the best algorithm for our classifier, we tried
several simple and complex models. The implementation results for several
simple models such as KNN (k nearest neighbour), SVM (Support Vector
Machines), Linear Regression, and Naive Bayes were unpromising. The
classification reports for all of them were indicative of ‘0’ scores as the
outputs for precision, recall and f1-score regarding the depressed class
(i.e., labelled as ‘1’ in the report). Figure 15 shows an example
classification report for the SVM algorithm. This result derives from the
incapability of these models to deal with our imbalanced data.

Figure 15: The classification report of the SVM classifier.

Therefore, we decided to implement two ensemble techniques, namely an XGBoost
and a stacking model, being more complex and robust models compared to the
previous ones. XGBoost is an ensemble model that enables applying several
hyper-parameters to control the learning process 146. This model teaches each
of its predictors sequentially based on its predecessor’s error. It also makes
it possible to give weights to the majority and minority classes, consequently
eliminating the issue of having imbalanced data. Figure 16 illustrates the
classification report of developed XGBoost classifier with 0.82 accuracy.
Applying 10-fold-cross validation, also, leads to an increase in accuracy to
0.87.

We also developed a stacking model. It contains five stacked classifiers,
namely a Random Forest (RF), a KNN, an SVM, a Naive Bayes, and an XGboost. We
removed the imbalanced data issue by down-sampling. To do so, Each of the five
stacked classifiers are trained and tested on a separate sample, which are
created using 78 depressed users’ data and randomly selected one-fifth of not
depressed individuals. So we could implement SVM, and other simple models by
using the balanced data. We aimed at building a model to analyse our data
considering both linear (e.g., SVM) and non-linear (e.g., RF and XGboost)
approaches in decision making process. Figure 17 is illustrative of the
developed ensemble model and the classification report for the test data
tagged with ‘1’, showing depressed L.

Figure 16:  The Classification report of the developed XGBoost model for
depression identification by textual data analysis.

To compare the prediction results of the developed algorithms on a single
unseen text, one of the samples in the data set (i.e., related to a depressed
user) were extracted and removed from the data set. Then, it was fed to both
of the models. the prediction results for XGBoost and stacking models showed a
probability of 0.90 and 0.77 for being depressed, respectively. Taking into
account the classification reports, the stacking method could be considered a
better method in this regard. Consequently, developed stacked algorithm could
be used as a reliable weakly supervised learning model to be used in labelling
large data sets (i.e., ‘depressed’ or ‘not depressed’ tags).

### 6.4 Evaluation

Through this research, we had two contributions: constructing the depression-
related KB, and developing a depression-related classifier. To evaluate our
proposed approach, we conducted a survey and requested domain experts to
provide their feedback. We design three hypopaper to validate the knowledge in
the mKB as well as validating the proposed methodology. To achive this goal,