Emotions are Recognized Patterns of Cognitive Activities


Emotions play a crucial role in human life. The research community has proposed many theories on emotions without reaching much consensus. The situation is similar for emotions in cognitive architectures and autonomous agents. I propose in this paper that emotions are recognized patterns of cognitive activities. These activities are responses of an agent to the deviations between the targets of its goals and the performances of its actions. Emotions still arise even if these activities are purely logical. I map the patterns of cognitive activities to emotions. I show the link between emotions and attention and the impacts of the parameterized functions in the cognitive architecture on the computing of emotions. My proposition bridges different theories on emotions and advances the building of consensus.

1 Introduction↩︎

Emotions play a crucial role in human life. They seem to compel us to pursue our goals, enhance or hinder our learning and decision-making, strengthen or weaken our communications and connections. Many theories have been proposed on how emotions arise, in the feeling, motivational and evaluative traditions ([1]). [2] argues that “An emotion is your brain’s creation of what your bodily sensations mean, in relation to what is going on around you.” [3] proposes that different combinations of 3 monoamine neurotransmitters generate 8 emotions. The research community is yet to reach consensus.

There is no difference for emotions in Cognitive Architectures. It’s debated whether cognitive architectures should have an emotion module so that autonomous agents can have emotions. [4] don’t include emotions in the standard model of the mind. Many computational models have been proposed, including Appraisal theories, Core affect theory, Somatic markers, and Primary-process affect ([5]). According to [5], Soar-Emote uses emotional appraisals to frame information before it is processed by the cognitive system; Sigma models low-level appraisals as architectural self-reflection; ACT-R/\(\Phi\) combines a model of a physiological substrate and the primary-process affect theory to augment the ACT-R cognitive architecture.

I propose in this paper that emotions are recognized patterns of cognitive activities. For humans or autonomous agents to have emotions, they don’t need a dedicated emotion module; they need meta-cognition to recognize the patterns of cognitive activities. These cognitive activities are linked to goals, actions and attention. I first use Soar cognitive architecture to demonstrate in Section 2 how surprise, nervousness and relief arise even when the cognitive architecture only performs logical reasoning. I then make the case for general cognitive architectures on an extended list of emotions in Section 3 and show how my proposition bridges different theories of emotions. I present the link between emotions and attention and the impacts of the parameterized functions in the cognitive architecture on the emotion quantification in Section 4. I conclude in Section 5 with discussions on the agent’s adaptation of goals and actions based on its emotions and on emotions in social situations.

2 Surprise, Nervousness and Relief in Soar↩︎

Sore is a long standing Cognitive Architecture ([6]). It has gone through multiple versions with gradually added modules and capabilities since its conception in the early 80s. One of its capabilities is responding to incomplete knowledge. Whenever the agent doesn’t have sufficient knowledge to select or apply an action, Soar labels this as an impasse. To resolve the impasse, it creates a substate with memories and processing powers and searches for a new action in the substate with all the processing available in Soar including planning, retrievals from semantic and episodic memory, and interaction with the external environment. Once a new action is found, Soar invokes a learning mechanism called “Chunking” to compile the processing in the substate into a new rule that it stores for future use.

Figure 1: Emotions in Soar when Impasse Arises

We can clearly see that Soar goes through several stages when it encounters and resolves an impasse and each stage has its distinctive cognitive patterns. When it encounters an impasse, this deviates from its goal. This deviation can be recognized as “Surprise”. It then creates a substate and searches for a new action. It uses additional memory and processing power. This can be recognized as “Nervousness”. Even though it’s not yet a feature in Soar, the agent can invoke more parallel processing when it has less time to find a new action. The intensity of “Nervousness” increases with the urgency. When a new action is found, Soar invokes chunking to learn a new rule and stores it for future use. This can be recognized as “Relief”. Figure 1 shows the cognitive patterns and corresponding emotions. For Soar to have emotions, it doesn’t need a dedicated emotion module; it needs a meta-cognition module that can recognize these cognitive patterns.

3 Emotions in General Cognitive Architectures↩︎

We can generalize the case of Soar to general cognitive architectures. In a general cognitive architecture, the agent can have general goals. A goal can be decomposed into multiple components. Each component is a goal at a lower level and can also be decomposed into multiple components. Figure 2 shows an example of this recursive decomposition. Each goal has its current value and a target value at a future time point. I use “target” to refer to a target value. It can also have interim targets at intermediate time points. The recursive decomposition of the goal continues until it reaches the level of executable actions.

Figure 2: Recursive decomposition of a goal

When the agent executes an action, it changes the value of a goal. The performance of an action is the new value of the goal. The agent receives information from its external and internal perception. It interprets the information and assesses whether the action performance equals the (interim) target of the goal. If there is a deviation between the performance and the target, this is recognized as “Surprise”. If the agent has a world model and carries out anticipatory thinking ([7]), the deviation can also be between the forecast performance and the target. The agent then assesses whether the deviation is better or worse based on whether the performance is better or worse than the target. Figure 3 shows the loop of detecting a deviation. The agent can have multiple parallel loops for different goals. The loops can have different time scales for goals at different levels.

Figure 3: Detect a deviation

The agent processes the deviation depending on whether it’s better or worse. If the deviation is worse, the agent mobilizes cognitive resources to find a new action that restores the target. This is recognized as “Nervousness”. If the deviation is large or the agent needs to find a new action in a short period of time, the agent needs to make a lot of parallel processing. This increases the intensity of “Nervousness”. If a new action is found, the agent compiles the processing and updates the action for the goal for future use. This is recognized as “Relief”. If no new action is found to restore the target but one is found to reach a lower value, the agent also updates the action for future use. At the same time, it revises the target of the goal down to this lower value and stores the new target. This is recognized as “Sadness”. If no new action is found to even reach a lower value, the agent removes the goal and updates the related goals at higher levels. This is recognized as “Grief”. This processing is shown in Figure 4.

Figure 4: Emotions when the deviation is worse

If the deviation is better, the agent mobilizes cognitive resources to find a new action to reach a higher value of the goal. This is recognized as “Excitement”. The agent usually has less urgency to find a solution comparing to the case of a worse deviation. The intensity is mostly determined by the size of the deviation. If a new action is found, the agent compiles the processing and updates the action for the goal for future use. At the same time, it revises the target of the goal up and stores the new target. This is recognized as “Joy”. If no new action is found, the agent keeps the existing action and target. This is recognized as “Disappointment”. This processing is shown in Figure 5.

Figure 5: Emotions when the deviation is better

In Table 1, I list the emotions and the cognitive activities they correspond to. For the emotions not listed in the table, they are recognized patterns of cognitive activities too. For instance, “Anger” is recognized when the agent deduces that the worse deviation is caused by another agent and decides it needs to use aggression to change the behavior of the other agent. A comprehensive list of emotions and their corresponding cognitive activities is left for future work.

Table 1: Emotions and Corresponding Cognitive Activities
Emotion Cognitive Activities
Nervousness Learn a new action when the deviation is worse
Relief Update the action that restores the target
Sadness Update the action and target when a lower value of the goal is obtained
Grief Remove the goal and update higher level goals
Excitement Learn a new action when the deviation is better
Disappointment Keep the action and target when a higher value of the goal is not obtained
Joy Update the action and target when a higher value of the goal is obtained

My proposition bridges different theories on emotions. [1] sort the theories of emotions into three broad traditions, namely the feeling tradition, the motivational tradition and the evaluative tradition. In my proposition, the cognitive activities are the motivational and evaluative aspects of emotions and the recognition of patterns are the feeling aspect. The agent evaluates whether there are deviations, whether the deviations are better or worse and whether the learning of new actions restores or improves the targets of its goals. It learns to find new actions including searching past experiences, logical reasoning, executing alternative actions to assess their performances, etc. It recognizes the patterns of cognitive activities as emotions.

My proposition provides more precise explanations on emotions. For instance, the appraisal theory considers emotions as the results of evaluations (appraisals) of information from an agent’s perception over a set of factors relevant to the agent’s well-being ([8]). My proposition maps emotions to specific cognitive activities. This explains where the appraisals themselves come from and why the relevance to the agent’s well-being impacts emotions.

4 Attention Module and Emotion Quantification↩︎

I combine the different processes in Section 3 together in Figure 6. The core mechanism in this combined module is to keep the performance to a target. Whenever a deviation arises, either the action or the target is changed to eliminate the deviation and maintain the accordance between the performance and the target. This can be viewed as an evolution of the homeostatic mechanism ([9]). This module is innate for the agent. It dictates the current goal the agent pays attention to and serves as the attention module of the cognitive architecture.

Figure 6: Attention Module

I greatly simplify the attention module for presentation. The real situation is a lot more complex and nuanced. First, the processes are depicted as open-ended in Figure 6. But they are actually loops: after a deviation is eliminated, the agent goes back to the part of detecting deviations. Second, the agent has multiple goals. When a deviation is detected in one goal and the agent’s attention is on another goal, it may choose to delay the processing of the deviation until it finishes the action of its current goal. Third, the agent may find a new action that temporarily restores the target and spread out the learning of a permanent new action over many disjoint time intervals. The learning of a new action doesn’t have to be done without interruption. Forth, an action can affect multiple goals. It can create deviations in multiple goals simultaneously. Some of the deviations may be better and others worse. Learning a new action is then more complicated because we need to trade off between different goals.

We can qualitatively identify emotions from the attention module: what type of emotions arise in which kind of situations. To quantitatively compute emotions such as its intensity and duration, we need the details of the parameterized functions of the cognitive architecture, in particular those on deviation detection, learning and updating. The functions vary from one cognitive architecture to another. But there are some commonalities.

The intensity of the surprise is determined by the size of the deviation. The agent doesn’t respond to small differences between the performance and the target. It has a distribution and rules on whether to label a difference of a certain size as a deviation. As an exmaple, Figure 7 shows a normal distribution and the rule that the differences larger than 3 standard deviations are outliers – deviations.

Figure 7: Detection of deviations – outliers – based on a normal distribution

The intensity and duration of the the nervousness / excitement is determined by the intensity and duration of learning. I have discussed in Section 3 the size of the deviation and the urgency of finding a new action impacts the intensity of learning. The agent has a function \(f\) (Equation 1 ) to convert the size and urgency into the intensity of learning. \[\text{Intensity} = f (\text{Deviation size}, \text{Urgency}) \label{eq:intensity}\tag{1}\] For the duration of the learning, the agent decides an initial duration from the deviation size and the urgency and extends the duration when it sees performance improvement. A function \(g^0\) (Equation 2 ) converts the size and the urgency to an initial duration. A function \(g\) (Equation 3 ) converts the amount of improvement into the amount of duration extension. The agent terminates the learning when it sees no improvement at the end of the duration. \[\text{Initial Duration} = g^0 (\text{Deviation size}, \text{Urgency}) \label{eq:duration0}\tag{2}\] \[\Delta \text{Duration} = g (\text{Improvement amount}) \label{eq:duration}\tag{3}\]

The intensity of the sadness / grief / joy is determined by the size of deterioration or improvement realized. The intensity of the relief / disappointment is determined by the size of deterioration or improvement not realized.

The agent learns the parameterized functions of the cognitive architecture – the distributions and functions and their parameters and rules – from its experiences. It adapts them based on new experiences. For instance, the agent can adapt the function \(g^0\) and \(g\) and increase the initial duration and duration extension if it finds doing this increases its chance of finding a new action noticeably. The parameterized functions can be specific to a goal or to a set of goal features. These parameterized functions manifest as personalities in humans.

5 Discussion↩︎

I propose that emotions are recognized patterns of cognitive activities. They are the products of the autonomous agent managing the deviations between the performances of its actions and the targets of its goals. For humans or autonomous agents to have emotions, they don’t need a dedicated emotion module; they need meta-cognition to recognize the patterns of cognitive activities. My proposition bridges different theories on emotions and advances the building of consensus.

If the agent has a well-understood goal and effective actions to fulfill it, it rarely experiences deviations and emotions from it. If the agent experiences frequently deviations and emotions from a goal, it’s an indication that the agent doesn’t understand the goal well or doesn’t have effective actions. The agent needs to review the goal and its actions: decide whether it should have the goal at all, review whether the target of the goal has a reasonable value, and revise how it makes decisions on actions. It should do this recursively on the components of the goal and on the higher level goals where the goal is a component.

Emotions are more complex in social situations. The meta-cognition can recognize the same patterns differently depending on the social goals in concern. For instance, “Shame” is actually nervousness on the goal “I’m a good person”. When we feel shame, we have the goal of being a good person and our current action has a performance short of the current target of the goal. This deviation triggers a series of cognitive activities. The meta-cognition recognizes this pattern as “Shame”. Emotions are used as signals in social communication. One agent can directly signal to another agent with words and emotions what goals and targets the other agent should have and how the performances of their actions deviate from the targets of the goals. The agent can distort these signals out of its own goals.

An accurate theory of emotions enables humans better understand and adapt their behaviors. Consensus on the theories of emotions fosters smooth collaborations to build fully functional autonomous agents. My proposition blows away the mist on the path forward. We can now forge ahead with these advancements with greater clarity.

References↩︎

[1]
Barrett, Lisa Feldman, Michael Lewis, and Jeannette M Haviland-Jones. 2016. Handbook of emotions. Guilford Publications.
[2]
Barrett, Lisa Feldman. 2017. How emotions are made: The secret life of the brain. Pan Macmillan.
[3]
Lövheim, Hugo. 2012. “A new three-dimensional model for emotions and monoamine neurotransmitters.”Medical hypotheses 78 (2): 341–348.
[4]
Laird, John E, Christian Lebiere, and Paul S Rosenbloom. 2017. “A standard model of the mind: Toward a common computational framework across artificial intelligence, cognitive science, neuroscience, and robotics.”Ai Magazine 38 (4): 13–26.
[5]
Larue, Othalia, Robert West, Paul S Rosenbloom, Christopher L Dancy, Alexei V Samsonovich, Dean Petters, and Ion Juvina. 2018. “Emotion in the common model of cognition.”Procedia computer science 145: 740–746.
[6]
Laird, John E. 2022. “Introduction to the soar cognitive architecture.” .
[7]
Jones, Steven J and John E Laird. 2023. “A cognitive architecture theory of anticipatory thinking.”AI Magazine 44 (2): 155–164.
[8]
Lazarus, Richard S. 1991. “Cognition and motivation in emotion.”American psychologist 46 (4): 352.
[9]
Lichtenberg, Joseph D and June L Hadley. 2013. “Empathy, motivational systems, and a theory of cure.” In Psychoanalysis and Motivation, pp. 295–336. Routledge.

  1. Yue Jin. Nokia Bell Labs France. Email: yue.1.jin@nokia-bell-labs.com.↩︎