=Paper= {{Paper |id=Vol-1348/maics2013_paper_4 |storemode=property |title=A Model for Stream of Thought in Anxiety and Depression |pdfUrl=https://ceur-ws.org/Vol-1348/maics2013_paper_4b.pdf |volume=Vol-1348 |dblpUrl=https://dblp.org/rec/conf/maics/BurnellS13 }} ==A Model for Stream of Thought in Anxiety and Depression== https://ceur-ws.org/Vol-1348/maics2013_paper_4b.pdf
                   A Model for Stream of Thought in Anxiety and Depression
                                                 Lisa Burnell and Antonio Sanchez


                                                         Texas Christian University
                                                  TCU Box 298850, Fort Worth TX 76129
                                                 l.ball@tcu.edu, a.sanchez-aguilar@tcu.edu

                                  Abstract                             someone asks “what are you thinking?” and you respond
      Depression and anxiety are debilitating conditions that           with “just wandering”. It is non-productive day-dreaming.
      significantly reduce the quality of life for many people and      Innocuous as this is in people not suffering from anxiety or
      their loved ones. Understanding the “internal world” of the       depression, any given thought can act as a trigger for those
      sufferer is difficult for those who have not had direct           that do.
      experience. We examine the internal scripts that are a                Our chosen method is to develop a software model that
      hallmark of these illnesses. Once triggered by external and       attempts to capture an abstracted form of these thought
      internal events, what is the path, duration, and severity of      streams. We believe that finding a way to categorize the
      resultant thoughts and emotions? These paths may be called        triggers and scripts into generalized patterns is more
      thought streams. We are creating a simulator to better            promising than attempting to focus on specific,
      understand an abstracted version of these thought streams.        individualized events. For example, receiving criticism at
      Existing research has been done in modeling mental illness,       work is an abstraction of a number of detailed specific
      for example connectionist or hybrid models of the                 events that could occur. One of the challenges is to find the
      neurobiological mechanism of illness. SAD (Stream of              proper level of abstraction between the most specific
      thought in Anxiety and Depression) is more closely related
                                                                        experiences of an individual and ones so general to be of
      to earlier work on goal-oriented, normal day dreaming
      since it symbolically represents conscious aspects of
                                                                        little value in understanding depression and anxiety.
      thought. The difference is that SAD is intended to capture            The primary purpose of this work is to better understand
      depressive or anxious thinking over time.                         dysfunctional thinking and to predict how it influences
                                                                        future mood. At this point, we are not attempting to treat
                                                                        depression or anxiety or to directly assist mental health
Depression and anxiety are debilitating conditions that                 professionals in diagnosis or treatment. Our hope is that at
significantly reduce the quality of life for many people and            some point the work could be of benefit to new mental
their loved ones. Much work has been done to understand                 health professionals by helping elucidate the internal state
and treat these debilitating and sometimes lethal illnesses.            of patients. Conversely, these professionals and the patients
But understanding the “internal world” of the sufferer is               they treat will be invaluable sources for additional
difficult for those who have not had direct experience.                 knowledge acquisition and validation of the system.
   We examine the internal “scripts” that are a hallmark of
these illnesses. In addition to major life events, like the
death of a loved one, what triggers acute episodes? Once                   The Psychology of Depression and Anxiety
triggered by external and internal events, what are the path,
duration, and severity of resultant thoughts and emotions?              Cognitive models of negative emotion suggest that
We call these paths “thought streams”. William James                    depression and anxiety are associated with different
wrote that “Consciousness… does not appear to itself                    cognitive features. However, distinguishing anxious from
chopped up in bits…a “river” or “stream” are the                        depressive self-talk is difficult because of the overlap
metaphors by which it is most naturally described” (James               between anxiety and depression (Safren, et al. 2000).
1890).                                                                     Minds are busy. The unfortunate part is that many of
   In healthy, non-goal oriented thinking, the mind                     these thoughts are repetitive, and of those, many are
wanders from topic to topic, none of which generally leads              negative. Much of the time we are not doing useful
to negative thought streams. Meditators sometimes refer                 reasoning like planning, problem solving, or decision
to this as “monkey mind”, an analogy to monkeys jumping                 making. Some spend significant time (1) ruminating about
amongst trees. A goal in meditation is to try to quiet the              the past, replaying feelings of grief, shame, or remorse and
mind and reduce this mental activity since it can increase              (2) worrying about the future, often about things we cannot
ones’ stress level or lead to negative mental states. This              control, like rain or unlikely events like a major earthquake
mind-wandering is typically what we think of when                       in Texas.
                                                                           Why is it that in a healthy mind, we are able to “escape”
                                                                        these negative thoughts, rather than spiraling into repetition

    Copyright retained by the authors.                                  and increasingly negative thinking? Styron (1990) writes
“depression is a disorder of mood, so mysteriously painful     represent the evolution of conscious depressive and
and elusive in the way it comes known to the self…as to        anxious thinking.
verge close to being beyond description”. While the
severely depressed individual might appear stuporous,                              The SAD Model
turmoil of these negative thought spirals may be raging.
The mind becomes obsessed with feelings of desperation.        We have developed a basic version of the SAD model for
The desire to escape this torture leads some to attempt or     Anxiety and Depression which is an early attempt to
complete suicide.                                              capture the stream of thoughts that occur within individuals
   Types of daydreams are directly related to depression.      who are experiencing the commonly co-occurring illnesses
Several measures, e.g. the Beck Depression Inventory, are      of anxiety and depression. Thoughts, emotions, behaviors,
used to measure depression level. Depressed subjects’          and external events may cause individuals to become better
daydreams included those that were “neurotic, anxious,         or worse over time.
dysphoric, and negative”, including mental agitation and          A few definitions are in order. First, a “thought stream”
distractibility, indecisiveness, personal devaluation, and     as described previously, is a general chain of thoughts, as
fear of failure (Giambra and Traynor 1978).                    one might have when day-dreaming. The second is a type
                                                               of thought stream called a “thought spiral”. This is a cyclic
      Cognitive Modeling of Mental Illness                     chain of frequently repetitive negative thoughts that have
                                                               been established over time. These are somewhat like AI
Cognitive architectures are frameworks used to design          scripts in that they represent an expected sequence of
systems that emulate human reasoning. Examples are             thoughts. The third is a “thought trigger”, or just trigger.
SOAR, ACT, ICARUS, and CLARION1. These have been               This is a general category of events or thoughts that initiate
used to create artificial agents that can solve problems,      thought streams. Fourth, a thought script is essentially an
either independently or in cooperation with humans.            individual thought, like “I feel overwhelmed”, which form
Increasingly, these architectures include support for          the components of thought streams and spirals. However, a
modeling emotions.                                             thought script may embed a brief, frequently occurring
   Work in cognitive modeling often focuses on goal-           spiral, as shown later.
directed behavior (Mueller 1990). What if there is no real        A rule-based prototype has been developed with CLIPS
goal from which to begin inference? Instead, the initial       (Riley, 2005). Facts represent mood states, events, thought
trigger may be an external sense perception or a thought,      triggers, and related data. Rules represent thought scripts
brought to awareness through what feels like a mystery.        and spirals. A file of temporally-ordered events is used as a
   Some work has been done in modeling mental illness.         driver to the simulation. These events include (1)
Of this work, the objective is often to assist mental health   perceptions, including visual and auditory images (e.g.,
practitioners working with patients or to understand the       seeing a large stack of mail, hearing a ringing phone), (2)
neurobiological mechanism of illness through simulation.       other actions such as waking up from sleep perhaps with
Webster and Banks (1989) use symbolic logic and chaotic        vivid dream recall, and (3) internal experiences like intense
dynamic systems theory to simulate manic-depressive            memories that appear to come from nowhere (some PTSD
illness. Most of the discussion focuses on Type II bipolar     sufferers call this “flashbulb thoughts”). These events offer
with its episodes of hypomania and mild to moderate            some way to show how a thought stream is initiated.
depression. Their conclusions are “that manic-depression       Particularly challenging is modeling how thought spirals
may represent a bifurcation from the chaotic dynamics of       “turn off”. For now, this can occur from attending to some
normal emotional lability to the pathological periodicity of   types of external stimuli or performing some action, e.g.,
affective illness”. Sun, Wilson, and Mathews (2011) used       falling asleep. In reality, avoidant behaviors may be the
the CLARION Cognitive Architecture to develop a                only way to stop the thought spirals. A simple example run
simulation for addiction and Obsessive Compulsive              is given in the Prototype Implementation section.
Disorder (OCD). This system embeds models of these                In the event simulation, external events do not
disorders within a comprehensive system that studies the       necessarily occur in fixed time units. Several events may
interaction among cooperating sub-systems. It is largely       occur within an hour; other times events may be hours
based on Neural Networks and shows great promise for its       apart. When the individual is feeling well, events that affect
intended purpose – better understanding the internal,          the individual may be days apart. Rules often generate new
hidden aspects of mind that lead to certain behaviors. Our     events as the simulation progresses. Consider that two
work is more like the work on day dreaming (Mueller            events ex and ex+1 have been read from the input file. If a
1990) in the sense that we are trying to symbolically          stream of thought produces another event between ex and
                                                               ex+1, it is inserted. For example, if the individual is asleep
                                                               when ex+1 would have occurred, then a new event ex+1
1
                                                               replaces the one from the input file. Otherwise, it is
 Wikipedia contributors, "Cognitive architecture,"             inserted between these two events. While this is an
Wikipedia, The Free Encyclopedia,                              imperfect representation, the intent is to create a starting
http://en.wikipedia.org/w/index.php?title=Cognitive_archit
ecture&oldid=532671550 (accessed January 30, 2013).
point for the system. The last section suggests ways this       Script Name: OVERWHELMED
model may be improved.                                          Trigger: Unpleasant task 
1. This individual awakens in a depressed state. Triggers       Examples: See a stack of mail, a task list, work items
that generally lead to increased anxiety (noticing a stack of
mail to be dealt with) and avoidance behavior lower the         Mood State: normal: ADVAL = 0
mood of the individual. Activities that can be considered       CMI unchanged
accomplishments raise mood (e.g., taking a shower for a          Actions (one of)
significantly depressed individual can be a significant            Stop -- go on to unrelated activity/thought stream
accomplishment).                                                   Healthy coping -- pick a task or break a big task into
                                                                      smaller pieces
      Table 1. Simplified Event Simulation Input.
  Event/Trigger              Time              ADVAL            Mood State: anxious/depressed state: ADVAL < 0
  Wake                       D1 3:00am           -4             Update CMI based on chosen action
  Undesired Activity         D1 5:00am           -6              Actions (one of, dependent on intensity level)
  Shower                     D1 2:00pm           -2                run I DON’T WANT TO SCRIPT
  Distraction: TV            D1 6:00pm           -4                run I CAN'T SCRIPT
                                                                   run WHAT'S THE POINT SCRIPT
   The ADVAL (Anxiety/Depression Value) is in the range            run I'M NOT GOOD ENOUGH SCRIPT
of -10 to 0, where negative values represent                       run SELECT DIVERSION ACTIVITY
anxious/depressed mood intensity and 0 represents a                        (creates a state change until new trigger)
normal mood state. The first ADVAL value in Table 1 is                     o examples: television, anti-anxiety
the initial condition of the individual. This value changes                    medications, drinking alcohol, sleeping
as a result of executing the system or reading the next
event from the input file.                                         Collective Mood Intensity (CMI) is a numeric measure of
   Once a trigger has been activated, a thought script is       the current strength, or intensity, of a mood state. For a
selected dependent on the current mood state and its            given mood, it is a function of the number of the thought
intensity for the individual. These can then lead to either     streams triggered within that mood state and the
the initiation of associated thought streams (via the           contribution of each triggered thought stream or action
assertion of facts in working memory) or to the expiration      within the recent past.
of the thoughts initiated by the trigger (as described by
CMI later). A simplified example, in pseudo-code, is                                CMI = ∑(mits + mia)
shown below. For a given mood state, the example shows                                for time=0 to c
alternative trigger effects, dependent on mood intensity.
The SELECT DIVERSION ACTIVITY is an example of                     Each thought stream and action has an associated value
some action that stops the current thought stream               for each mood state it affects. The higher the CMI value,
temporarily. Most of these might be ineffective in stopping     the longer the mood stays active. For example the
the thought stream, worsen it to become a thought spiral,       DIVERSION ACTIVITY reduces the CMI value for the mood
or trigger new ones.                                            state from which the activity was triggered. The value mits
   Abstracted versions of two script examples,                  is the mood intensity contribution of a single thought
“OVERWHELMED” and “I CAN’T” are shown below.                    stream and mia is the contribution for an action. Once a
These scripts are related depending on conditions. So,          CMI reaches nearly zero, its time is reset to 0. This is
under certain conditions, the “I CAN’T” script may execute      intended to represent the expiration of a thought stream.
after the “OVERWHELMED” script.                                 Similar CMIs are calculated for the other moods. At this
                                                                point the next event and its associated ADVAL are read from
Script Name: I CAN'T                                            the input file.
Trigger: Overwhelmed script or new event trigger
Mood State: moderate depression/anxiety (ADVAL < −3)                        Prototype Implementation
Update CMI (due to this script being activated)                    We developed the SAD prototype using CLIPS, or C
                                                                Language Integrated Production System. CLIPS is a
 Thought stream:                                                domain-independent rule-based expert system shell
   I don't want to…                                             originally developed by NASA. Rules are written as if-then
   But you should…                                              statements, such that the antecedent (“if” portion”) matches
     (This may cycle to previous thought more than once)        facts and the consequent (“then portion”) performs actions,
   But I have to…                                               which may include adding or deleting facts to what is
   I just can't… (repeats script)                               known as working memory. Rules may contain variables
                                                                that match multiple facts. Working memory records the
current system state, i.e. what is currently true about the      did I have to wake up”? Sleep, whether drug induced or
domain. The inference engine selects a rule and executes         not, may not produce any significant mood changes in
its actions. It then continues to select rules and execute       severe depression. In the severest depressions, suicidal
their actions. This process continues until no applicable        ideation SACs may be all-consuming and potentially lead to
rules remain (Riley, 2013). A rule is shown below. The           an attempt or completion.
assert and retract statements alter working memory.
Pattern matching is simple here in that it looks for specific     CLIPS> (run)
facts in working memory. Other rules can match any                ______________________________
number of facts that satisfy a general pattern. As an
example we present an initial rule shown below; indeed                   Mood Model
more rules need to be added.                                      ______________________________
    (defrule rainy-day-3 "low level anxiety"                      We follow a stream of thought
     (thought-trigger rain)                                       Get initial thought topic. Just rain
     ?ms <- (moodstate anxious)                                   for now
     ?msev <- (moodseverity low)
    =>                                                            STARTUP: with thought trigger 
     (printout t "Rain! I'm nervous about driving!")              ====================
     (retract ?msev)
                                                                  Moodstate is anxious
     (assert (moodseverity high))
                                                                  Mood severity is high
     (assert (phase show-current-state)))
                                                                  Thought trigger is rain
   A sample run of the prototype is shown in Figure 1.
Comments in the output are produced to trace program              Rain! I can't drive. I AM AFRAID
execution. In the current prototype, ADVAL is an
enumerated set of values {high, moderate, low, normal}.           From here we follow a thought spiral
The thought triggers are concrete, e.g. I observe that it is      (scripts)
raining. This is to make it easier to explore and evaluate
scenarios. CMI as defined in the conceptual model is              Moodstate is depressed
implemented as a simple counter of thought scripts                Mood severity is low
executed (this is also used to prevent infinite loops in the      Thought trigger is rain
event that rules keep firing). Event times are not currently
implemented.                                                      Sad thought script (count is now 1)
   From the last output shown, the ‘I CAN’T” script would
execute. Consider one scenario. Given that the person is in       Since we're sad already, this
a depressed, highly anxious mood, the spiral may end with         continues (count++)
an avoidance activity, e.g. not leaving the house. This           Moodstate is depressed
reduces anxiety, but elevates depression and triggers a           Mood severity is low
spiral down to the “I’M NOT GOOD ENOUGH” script.                  Thought trigger is I-can't-do-this
As time passes, this spiral “calms down” and expires. In
CLIPS, no more rules are activated, so the next event              … 
trigger is read from the input file.                               CLIPS>
   Note that in the prototype, mood is used to represent the     Figure 1. Sample run of the SAD prototype.
current state of the individual, not their psychiatric (DSM-
IV) diagnosis. Even a person experiencing a major
depressive episode has times during which their depression                 Conclusions and Future Work
is less.                                                         Although the work to date is conceptual in nature, the
   The current system does not yet implement SACs                prototype developed allows us to focus on the issues.
(“short awful chains”). These short sequences of intensely       Thoughts are not the only participant in one’s experience.
negative thoughts are meant to represent situations in           Thoughts, emotions, and memories are all part of the
which the individual is experiencing a major episode of          conscious experience of the individual. Lerner and Keltner,
depression or anxiety. A panic attack is an example of the       D. (2000), for example, discuss the interdependent
latter. Under these conditions, the threshold for escape is      relationship between thoughts and emotions. Memories,
much higher than for other situations. In a major                especially those associated with strong emotions, can form
depression, it is unlikely that the individual will be capable   new associations with external triggers. Unhealthy coping
of finding a diversion, other than perhaps sleep. Even this      mechanisms can result as one attempts to escape the
may require a heavy dose of medication. First thoughts           “mental hell”. Capturing this complex interaction will
that occur may still be significantly negative, e.g. “Why        require significant prototype enhancements.
   Exploration of additional or alternative representation        Mueller, E. 1990. Daydreaming in Humans and Machines:
and reasoning is an important area for exploration.               A Computer Model of the Stream of Thought, Norwood,
Significant challenges include: (1) determining the proper        NJ: Ablex Publishing.
level of abstraction for modeling thought streams, (2)
improving state change modeling e.g., from dysthymia to           Nagel, T. 1974. What is it Like to be a Bat? The
major depression, (3) additional study of the interaction         Philosophical Review LXXXIII(4): 435-50.
between anxious and depressive thoughts, and (4)
exploring other knowledge representation and reasoning            Riley, G. 2013. CLIPS: A Tool for Building Expert
strategies. For the latter, Bayesian Belief networks allow        Systems. http://clipsrules.sourceforge.net, accessed March
for more sophisticated representations of influences              14, 2013.
between propositions (sequences of thought topics in our
case). Markov Models stochastically represent the                 Safren, S. A.; Heimberg, R. G.; Lerner, L; Henin, A.;
progression of states within a system. These however, do          Warman, M. and Kendall, P. C. 2000. Differentiating
not capture the cyclic and cumulative features of the             Anxious and Depressive Self-Statements: Combined Factor
desired model. While human stream of thought appears              Structure of the Anxious Self-Statements Questionnaire
sequential, multi-agent or blackboard models may provide          and the Automatic Thoughts Questionnaire-Revised.
insights into the non-focused, seemingly “jumpy” nature of        Cognitive Therapy and Research, 24(3): 327–344.
our thoughts.
   Validation has been from a small number of written             Styron, W. 1990. Darkness Visible, New York: Vintage
retrospective reports and stream of thought diaries, and          Books (Random House).
much more is needed. Yet more tests are required and
therefore experimentation with the simulator’s temporal           Sun, R.; Wilson, N. and Mathews R. 2011. Accounting for
modeling is also needed. For example, one does not                Certain Mental Disorders within a Comprehensive
generally move from dysthymia to a major depression               Cognitive Architecture. Cognitive Computation, 3(2): 341-
episode over the course of a week. Additional sources of          359.
data may be useful for validation. The COGNO computer
system (Wiemer-Hastings, et al. 2004) has been used to            Webster, C. W. and Banks, G. 1989. Modeling Manic-
automatically classify dysfunctional thoughts. They found         Depression with Symbolic Logic. In Proceedings of the
that for a subcategory of dysfunctional thoughts, the rule-       13th Annual Symposium on Computer Applications in
based system classified most correctly. Sources like the          Medical Care. 325-329. Los Angeles: IEEE Press, 1989
Journal of Abnormal Psychology, in which researchers
employed patient transcripts, diaries, oral histories, are        Wiemer-Hastings K.; Janit A. S., Wiemer-Hastings P. M.;
available. Data mined from anxiety and depression web             Cromer S.; and Kinser J. 2004. Automatic classification of
sources (e.g. Google Groups alt.suicide.holiday) may also         dysfunctional thoughts: a feasibility test. Behavior
provide a rich source of data.                                    Research Methods. 36(2):203-12.
   Beyond the primary purpose of the work is the
application in training of mental health counselors. Those        William, J. 1890. Principles of Psychology, London:
counselors that have no personal experience with these            MacMillan.
mental illnesses could gain a better understanding of the
internal mental states of the illness and its progression. In a
humble reference to (Nagel 1974) “Consciousness has
essential to it, a subjective character”. Our simulation may
help immerse counselors into aspects of the mental
subjective experience of their patients. Even with the most
empathetic and experienced therapist, following the wild
ride of someone else’s thoughts and emotions can give but
snapshots of the experience.

                        References
Giambra, L. M. and Traynor, T. D. 1978. Depression and
daydreaming: An analysis based on self-ratings. J. Clinical
Psychology, 34: 14–25.

Lerner, J. and Keltner, D. (2000). Beyond valence: Toward
a model of emotion-specific influences on judgment and
choice. Cognition and Emotion, 14(4): 473-493.