An emotion-driven virtual counselling system in computer-mediated communication

We present and evaluate a virtual counselling system that is devoted to improving user awareness of emotional situations in computer-mediated communication and making informed decisions on actions to recommend to the users involved in a conversation. Starting from elements such as the moods and emotions of the users involved in a conversation, the system constructs the emotional signatures of individuals and groups that are used to characterize a situation. It then uses an approximate reasoning mechanism based on three-way decisions to classify recognized situations with respect to particular emotional dynamics based on emotional contagion. A prototype of the system has been experimented on in a real context based on collaboration between university students for the realization of project work. The distinctive features of the system have been evaluated with accuracy measures, and the results are promising.


Introduction
Communication is a complex subject that can be affected by numerous factors, including emotions. Two people may perceive very different meanings and attitudes regarding the choice of words and/or body language during a communication act. Furthermore, the same participant (in the communication activity) could interpret two different meanings from a message when she/he is in two different emotional states, i.e., she/he has two different moods. This phenomenon is amplified when communication is computer-mediated. In particular, the overwhelming use of online social networks (OSNs) has changed the perception of communication among individuals. All of us experience every day how computer-mediated communication (CMC) through OSNs is sometimes more difficult than face-to-face (F2F) communication. In this latter setting, nonverbal cues are a great part of communication; see, e.g., Knapp et al. (2013), though in CMC, it has been shown that emotions are not absent and are not even difficult to communicate (see Derks et al. 2008). Along this direction, Eligio et al. (2012) analysed the impact of moods on human activities and affirmed that individuals participating in computer-mediated collaboration sessions benefit from receiving information that helps them understand one another. In other words, the awareness is improved.
The contribution of this paper is the definition and preliminary evaluation of a system devoted to increasing the awareness of users involved in a CMC scenario to help them make informed decisions: the virtual counselling system (VCS). The objectives of the VCS are twofold: (1) to improve awareness of the emotional situation in a CMC scenario and (2) to recommend actions to users. A key concept to achieve these objectives is that of emotional signatures of an individual and a group that we frame in the cognitive framework of situation awareness (SA).
The term counselling usually refers to professional guidance using psychological methods and techniques and to the development of online or web counselling systems devoted 1 3 to addressing issues such as mental health diseases (Kato et al. 2011;Shiono et al. 2009) or general online psychotherapeutic interventions (Palaniappan and Jun-E 2006). In this paper, we borrow the term counselling to focus its application domain on any interactive process, such as CMC. The definition we consider is that of the European Association for Counselling (EAC). 1 This definition emphasizes the role of the counselor in relation to the ability to address issues that require decision support, increased situational awareness, and to help individuals in critical and conflict situations.
The cognitive framework underlying the work proposed in this paper is that of SA developed through the formal setting of fuzzy set theory. Endsley (1995) defines SA as "the perception of elements in the environment within a volume of time and space, the comprehension of their meaning, and the projection of their status in the near future". SA is a cognitive construct devoted to supporting humans and agents in making informed decisions. SA helps to interpret and understand information in the context of a larger concept called situation, which is an abstract state of affairs related to specific applications. The situations that the VCS must identify are related to the emotional dynamics, individual and group, in a CMC scenario. Fuzzy set theory Zadeh (1996) offers us a formal tool for modeling and reasoning about such situations. The advantage offered by this machinery consists of the fact that it allows us to consider the fuzziness related to emotional dynamics and moods that do not always appear to be classifiable in a precise way.
As done for the term "counselling", we clarify what we refer to by emotional signature. According to Champion (2016), the concept of emotional signature is a development of the earlier concept of emotional scheme (Greenberg and Paivio 2003) that is defined as "a set of organizing principles constructed from the individual's innate response repertoire and past experience that interact with the current situation and generate current experience". The emotional signature of an individual is therefore constructed by considering his past behaviours in relation to particular situations, and in general, the study of emotional signatures aims at understanding dysfunctional behaviours. We consider this concept of emotional signature and generalize it for use in CMC processes. The concept of emotional signature is of interest to us because it photographs the behaviour of the individual in different situations. For example, it can help us understand that an individual in situations of anger has nevertheless had positive interactions with other individuals. The emotional signature, to some extent, provides information about how others perceive an individual. An emotional signature helps individuals increase their SA, and by aggregating the emotional signatures of individuals, a measure of the group SA can be obtained.
Even if the VCS model is generic enough to apply to different contexts, in the paper, we limit ourselves to the identification of emotional dynamics based on the phenomenon of emotional contagion. This is a phenomenon in which user emotions and related moods activate or influence, directly or indirectly, similar emotions and moods in other people. To some extent, this effect can extend beyond the limits of individuals and characterize a group or team (Barsade 2002;Kelly and Barsade 2001). The reason that led us to start with the study of these dynamics is the possibility of influencing, through the advice and recommendations of the VCS, the group emotional dynamics towards the achievement of empathy that can be advantageous in different application sectors. There is, in fact, a relation between empathy and emotional contagion, with the latter being the inner level of an empathetic model according to the Russian Dolls model of empathy (De Waal 2007). Thus, according to this model, establishing emotional contagion among individuals involved in communication is required to achieve empathy.
The paper is organized as follows. Section 2 reports background information, analyses related works and compares these works with our proposal. Section 3 describes the VCS model. Section 4 presents the architecture of the VCS and describes the current state of the implementation. Section 5 describes the experimentation devoted to validating the capabilities of our prototype to recognize emotional situations and recommend corrective actions. The section also discusses the results achieved. Section 6 concludes the paper and presents future works. A separate Appendix in Sect. 7 reports an illustrative example.

Background and related works
This section reports background information on theories of emotion, some related works on recognition of emotional dynamics and, finally, background information on the concept of the fuzzy user signature developed in Yager and Reformat (2012) that is used to derive the emotional signature.

Theories of emotion
There are two main schools for the theory of emotions. The first, which includes authors such as Russell and Barrett (1999), hypothesizes that emotions can be classified on a dimensional scale. For example, Russell (1980) proposes a circumplex model with a two-dimensional polar space, whose axes are the valence (the level of pleasure) and arousal (the level of arousal). The second models emotions in a discrete way. The best known case relates to Plutchik's Wheel of emotions (Plutchik 2001) which places emotions on petals, where the distance between two leaves (emotions around the circle) somehow measures similarity to adjacent emotions that are more similar than distant emotions. This model allows the combination of primary emotions to create secondary or even tertiary emotions (TenHouten 2006). In this paper, we use both the circumplex model (to map discrete moods on the positive, neutral and negative elements of a circumplex model) and discrete emotions from Plutchik. Specifically, the outputs of a wearable device devoted to detecting moods are mapped on the circumplex model. Then, an emotional signature correlates these moods with emotions derived from text analysis. This process is described in Sect. 4.1.
In addition to these two main lines, other theories of emotion are emerging. Two of these that leverage situational awareness are of interest for our work. The first is appraisal theory, which hypothesizes that emotions result from people's interpretations and explanations of their circumstances even in the absence of physiological arousal (Aronson et al. 2010). In the absence of arousal, according to this theory, an individual decides how to feel about a situation after having interpreted and explained the phenomena in a way that may be similar to the three levels of an SA model. The second is the emotional contagion (Hatfield et al. 1993), which states that one person's emotions and related behaviours directly trigger similar emotions and behaviours in other people. In Cheshin et al. (2011), this theory is examined in the context of textual cues and to assess the effects of emotion in virtual teams. This objective is close to ours to the extent that the VCS intends to recommend actions to improve emotional dynamics in groups with the aim of supporting the creation of empathetic groups.

Recognition of emotional dynamics in conversation
In this subsection, we report a brief overview of some recent works that focus on the recognition of emotional dynamics (such as shifts and variations) in conversations and share some commonalities with our approach. We avoid comparing our work with the numerous research results that focus on the detection of emotions from text, as this is not our aim, and it is not our research objective to find new methods and algorithms for this purpose. A recent research work that pursues a direction similar to ours is Ghosal et al. (2020a), where the authors leverage common-sense knowledge to develop a framework that incorporates different elements of common sense such as mental states, events, and causal relations. The goal is to learn interactions between interlocutors participating in a conversation to predict emotion shifts and understand differences between closely related emotions. The same research group, in another recent work Ghosal et al. (2020b), explores the role of context and employs perturbations to distort the context of a given utterance to study its impact. These works share numerous aspects with ours. First, the use of commonsense knowledge provides, to some extent, a description of the emotional situation, as it allows us to understand elements such as intention and reaction as well as emotion. Furthermore, the modeling of the situation that can be provided with this approach is, to a certain extent, even more descriptive than the one we use in the VCS, which is based on fuzzy logic and the concept of the fuzzy emotional signature. On the other hand, the approach we propose is computationally more tractable, as it requires the use of relatively complex similarity measures for reasoning purposes. Another added value of our approach is the possibility of using the models of the signatures to carry out actions such as searching for users with similar or dissimilar emotional states.
Another interesting work that aims at identifying shifts in emotional patterns is Servi and Elson (2014). Their objective is to identify emotional levels, detect influence and forecast emotions as part of a larger process whose goal is to explain the meaning of shifts. For this purpose, Servi and Elson (2014) propose a mathematical model based on the concept of breakpoints. The forecasting is rule based. Additionally, in this case, a common aspect is the aim of providing meaning to the variation of emotional dynamics. The VCS does this through a situational analysis and is not based on a mathematical model. The reasoning supported by the VCS is of an approximate type and, in fact, relies on techniques with three-way decisions that have the aim of providing rapid decision making with reduced cognitive effort.
As discussed, the concept of the emotional signature appears to be a distinctive aspect of our work. A study that uses a similar concept is Mokryn et al. (2020), where the emotional signature is defined to characterize movie-derived emotions via reviews. In that case, the emotional signature for the film characterizes the emotions that it tends to evoke in viewers. Once derived, the purpose of these emotions is to leverage them in affective recommender systems and affective multimedia retrieval. We use the concept of (fuzzy) signatures to characterize a user in a conversation, and in our case, the signatures serve to support informed decision making with the VCS. However, in addition to the differences in the formal settings adopted to model signatures, we see the contribution of the signature in the wider context of the recognition and comprehension of emotional situations. The contextualization of this concept in the SA decision-making process differentiates our use of emotional signatures.

Fuzzy signature
The fuzzy user signature was proposed by Yager and Reformat (2012) to analyse and process user tagging activities on the social web. The fuzzy user signature is a fuzzy representation of the activities of a user. Specifically, following the nomenclature and formalism proposed in Yager and Reformat (2012), the user signature of Eq. (1) is a fuzzy relation between two fuzzy sets: a set representing resource attractiveness and a set representing tag popularity.
To clarify how a signature can be constructed, let us consider with where i = 1, 2, … , n and n equals the total number of resources.
In a similar way, the fuzzy set TagPop(t) is defined as: with where j = 1, 2, … , m and m equal sthe total number of tags.
These two fuzzy sets provide information about the activities of a single user, specifically the degrees of interest in # of tags used for r i max # of different tags used for a single resource # of times t j is used max # of resources tagged with a single tag resources and degrees of usage of labels. To consider both aspects and characterize a user, the concept of user signature is defined in Eq. (1). For a single resource r i and a single tag t j , the value of the relation is: For the example shown in Fig. 1, the values of the relations are reported in Fig. 2. In Yager and Reformat (2012), the concept of fuzzy user signature is used to determine a level of like-mindedness between users using a similarity measure, a signature of a group of users using aggregation operators and a level of like-mindedness between a single user and a group of users. Interested readers can refer to Yager and Reformat (2012) for further details.

The virtual counselling system
The VCS is a system able to determine the emotional signatures of the users involved in a CMC scenario and, on the basis of these signatures, to recognize emotional situations and to recommend actions to the users to pursue an objective. The starting point for VCS is the ability to detect moods and emotions of users involved in a conversation. As reported in Beedie et al. (2005), the distinction between mood and emotion is "clouded, in part, because an emotion and a mood may feel very much the same from the perspective of an individual experiencing either". Duration seems to be a differentiator in the sense that moods are considered more persistent than emotions which, on the other hand, have extreme volatility. For our objectives, moods are discrete elements representing emotional states that affect the experience and behaviour of a person (Scherer 2000), and emotions are elements defined according to discrete models such as Plutchik's discrete emotion model (Plutchik 2001). The technologies we use to detect moods and emotions will  (2012)) be explained in Sect. 4. For now, consider a conversation between two users A and B. For each message sent by a user, we collect the mood that is detected while sending the message and the emotion that is extracted from the written text message. The VCS uses these moods and emotions to build emotional signatures. The initialization of the VCS occurs during the first communication session [0, T]. In this period, the VCS collects the information necessary to characterize individuals A, B and a group (A and B) from an emotional point of view. We will focus on dyadic interaction behaviours by analysing relationships between pairs of participants. In Fig. 3, we considered discrete time sessions and depicted individual emotional signatures with emojis.
The VCS, once the emotional signatures of individuals have been determined, classifies a situation with respect to an objective or a strategy that must be pursued. As we will see later, we experiment with a tripartite classification method of situations. Moreover, the objectives and actions that the VCS takes after identifying the situations are described with an expert-based method based on goaldirected task analysis (GDTA) (Endsley 2016), which is a requirement elicitation method allowing the identification of goals and critical decision-making tasks as well as the information requirements needed to make decisions.
With reference to Fig. 3, the VCS at the end of the first communication session (T) classifies the situation as safe with respect to its objectives and perceives a positive emotional contagion between the two users since they present similar positive emotions. The VCS can decide not to intervene in the communication, suggesting for B to send a message to A. After a second communication session (2T), the VCS detects a change in the emotional signatures of A and B and in the situation. It can then decide to suspend communication between users who appear very dissimilar since A is less happy and B is angrier and in the context of an unsafe situation. The VCS can thus suggest for user A to have a conversation with a user C that has an emotional signature more similar to A.
To perform these tasks, the VCS has to be able to build individual and group signatures, perform some operations on signatures and, finally, classify a situation to decide actions according to the GDTA. The following subsections describe how the VCS works to execute the above mentioned operations. An illustrative example that shows how the VCS derives emotional signatures, comprehends situations and makes decisions is reported in the Appendix.

Emotional signatures
An emotional signature, ES, provides a snapshot of a user's emotional state during a communication session. This signature consists of ⟨mood, emotion⟩ pairs that characterize a user. To determine the emotional signature of a user, we use the concept of the fuzzy user signature defined by Yager and Reformat (2012) and briefly described in Sect. 2.3.
We consider two users, A and B, involved in a conversation and a time interval, [t, t + ] . T A→B ⊆ T A is the set of messages that A has sent to B during the time period under consideration. M A→B ⊆ M A and E A→B ⊆ E A are the sets of moods and emotions associated with the messages that A has sent to B. We define two fuzzy sets: where: for i = 1, … , k is the membership degree of the element e i , and for j = 1, … , l is the membership degree of the element m j , and |T A→B | is the cardinality of the set T A→B . This cardinality value is the total number of messages that A sent to B.
We define the emotional signature of user A when interacting with B as: where the value of the relation for a couple ⟨e i , m j ⟩ is the minimum. The adoption of the minimum for the evaluation of Eq. (11) comes from the fact that the signature is a binary relation between two fuzzy sets. Given two sets, A and B, we evaluate the Cartesian product that, in fuzzy logic, is the set of all pairs from A and B with the minimum associated memberships.
Tables 1 and 2 help us understand how we can derive an emotional signature. Table 1 shows the moods and emotions that belong to the subsets M A→B and E A→B . For each intersection, we count the number of messages from which we have detected the specific mood and emotion. Next, we build the fuzzy sets Ẽ and M as in Eqs. (7) and (8) and derive the value of Eq. (11). The results are shown in Table 2.
Emotional signatures can be aggregated by the VCS to obtain the complete behaviour of a user from partial behaviours or group signatures. Signatures can also be compared with similarity measures to identify users with similar or dissimilar emotional behaviours and/or to evaluate how the emotional situations of users and groups evolve over different communication sessions.

Aggregation of emotional signatures
We can use an aggregation operator to obtain: (1) the overall emotional signature of a user and (2) a group signature: where U is the set of users belonging to a group and ⨀ is an aggregator operator.
Equation (12) aggregates the partial signatures of a user to obtain an overall emotional signature. Equation (13) aggregates the signatures of all the users involved in a communication session. The aggregation operators can be more or less complex and vary from simple averages to more complex ordered weighted averaging operators like OWA (Yager 1993) that also work on the basis of linguistic quantifiers.

Comparing signatures with similarity measures
As proposed also in Yager and Reformat (2012), we can use a similarity measure to identify similar users. Considering ES A and ES B as the emotional signatures of users A and B, we define the absolute similarity between A and B: and relative similarity between A and B: where || is a cardinality measure and we model ∪ and ∩ respectively with max and min t-norms and conorms. 2 There are differences between Eqs. (14) and (15). In this last case, in fact, we compute the common elements (i.e., the common ⟨mood, emotion⟩ pairs) between A and B and refer to this value as the elements of A. Strictly speaking, Eq. (15) is not a similarity measure, because Sim Rel (A, B) ≠ Sim Rel (B, A) , and provides information on how much user B presents the same emotional elements as those in A.
The two measures of Eqs. (14) and (15) have different objectives: the first allows the VCS to recognize emotional situations characterized by similar states between two subjects involved in communication. The second allows the Equations (14) and (15) can also be used to compare group signatures. For instance, Sim Abs (GS t , GS t+ ) compares the group signature at time t with that at time t + and allows the VCS to understand if there have been significant emotional variations in a group between two time sessions.

Situation identification and recommendations
The analysis of the emotional signatures supports the phase of identification of the situation by the VCS.
A situation is defined as a tuple Sit = (S, R, {ES S→R )}, GS) where: -S ⊆ U is the set of senders; -R ⊆ U is the set of receivers; -{ES S→R } is a family of emotional signatures related to the sender-receiver interactions; -GS is the emotional signature of the set S ∪ R As already mentioned, the individual and group emotional signatures are developed starting with a subset of moods and emotions detected. Limiting our study to dyadic interactions, with reference to Fig. 4, we can show two cases of templates for a situation: case (a) refers to a rare case in which there is no overlapping of roles during a communication session. This includes, for example, an asynchronous communication situation wherein the recipient generally reacts over a longer period of time and may take time to reflect. Case (b) is a more general situation wherein the sender and receiver can exchange roles during a communication session.
Based on this definition, it is clear that if the VCS has a comprehension of the constituent elements, then it can correctly identify the situation. Thus, based on the comprehension of the emotional signatures and, based on a specific strategy, it can classify a situation and take action. The following subsections describe these two aspects.

Comprehension of the emotional signatures
One way to comprehend and label an emotional signature is to use the fuzzy sets -cut concept. In short, given a fuzzy set, the use of an -cut allows us to eliminate from the set all the elements for which the degree of membership is less than a fixed threshold, say . Thus, for example, suppose = 0.3 and consider the signature of Table 2. With this cut, we remove all ⟨mood, emotion⟩ pairs that have a membership degree lower than 0.3, allowing us to easily classify the signature as ⟨M3, E4⟩ (e.g., ⟨Excited, Sad⟩ ). Such simplicity, however, comes at the cost of a very coarse-grained description of a user's emotional behaviour. Again with reference to Table 2, let us observe that with a slightly reduced value of (e.g., 0.25), elements relating to the emotion E2 emerge with all the moods detected. In this case, the labeling is not immediate, but what is most important for the VCS is to understand the behaviour described by the signature, which can be formulated as follows: when the mood is M1, the user feels the emotion E2 or E4; when the mood is M2, the user experiences only the emotion E2; and when the mood is M3, the user more often experiences the emotion E3 than E2. In this way, the VCS gains an improved awareness of the emotional behaviour of a user that can be used to classify situations.
From the behavioural description mentioned above, it is easy to understand that the VCS already has the ability to predict that if the user is in the M2 state of mind, the message he will send to one of his interlocutors will carry the E2 emotion. Recommending sending this message or not recommending it depends, however, on the strategy and the objectives of the VCS.

Situation classification and decision making
When the VCS has a good understanding of the elements of a situation, it makes a classification and proposes actions. For this purpose, the VCS makes use of a GDTA as defined by Endsley (1995). A GDTA is a form of cognitive task analysis, key to acquiring a good SA, and focuses on the goals the human operator must achieve and the information requirements that are needed to make appropriate decisions. In a GDTA structure, a decision is associated with a sub-goal. For each sub-goal, the GDTA clearly reports the Fig. 4 Templates of a situation information to acquire at the perception, comprehension and projection levels of a situation. The use of the GDTA has an advantage related to the reuse of the VCS in other domains (e.g., education), which can be made without changing the methodology but considering only other domain expert knowledge acquired, possibly also with machine learning techniques.
In the example reported in the Appendix of Sect. 7, we show how the VCS can make decisions related to a sub-goal such as "avoiding conflict situations". First, however, we clarify the methodological approach underlying the classification of an identified situation.
The classification mechanism is based on the three-way decisions approach (Yao 2016). The fundamental idea is to divide a universal set into three pairwise disjoint regions, or more generally a whole into three distinctive parts, and to act upon each region or part by developing an appropriate strategy. The tripartition is based on the comparison of an evaluation function with two thresholds: and . In three-way decision models, the determination of the thresholds is of fundamental importance. Several approaches have been proposed based on Shannon entropy (Deng and Yao 2012), the Chi-square statistic (Gao and Yao 2016), and game theory (Herbert and Yao 2011). If the value of the function is greater than or equal to , the situation is classified in a positive region. If the value of the function is less than or equal to , the situation is classified in a negative region. Otherwise, the situation is classified in a boundary region.
Our purpose is to classify situations with respect to the objectives of the VCS (e.g., SAFE or UNSAFE with respect to the goal of avoiding conflicts) and to the emotional contagion dynamic (e.g., to enforce empathy in a group).
Consider the template of situation (b) of Fig. 4. The VCS can label this situation with the GS. For instance, applying an -cut to GS, the VCS can label this situation as ⟨M1, E5⟩ , e.g., ⟨Calm, Joy⟩ , which may indicate a SAFE situation with respect to a specific sub-goal. Of course, there are other group characterizations that can be considered SAFE for this specific objective, such as ⟨Excitement, Joy⟩ and combinations of these pairs. Let us call SafeSit the set of these situations. Now, the VCS must determine how to classify this situation with respect to the dynamics of emotional contagion and, to this purpose, apply a three-way decision. The VCS uses the similarity between emotional signatures of sender and receiver, Sim Abs (ES S→R , ES R→S ) , as an evaluation function. For the sake of simplicity, let us label as SAFE the situation characterized by GS = (⟨Calm, Trust⟩) . This yields the following subsets: where SafeSit is the set of all situations characterized as SAFE, i.e., having a GS that can be labeled as SAFE.
In general terms, the expert decides which combinations of pairs ⟨mood, emotion⟩ in the GDTA can be considered SAFE for a particular goal (i.e., the set of SafeSit). Similarly, the GTDA provides information on combinations of pairs that can be considered UNSAFE and DOUBT. With the evaluation of the similarity between the individual emotional signatures, the VCS applies three-way decisions. Thus, the set of all possible situations SAFE, UNSAFE or DOUBT is partitioned into three regions (POS, NEG, BND) by comparing the emotional signature similarity against two thresholds. It is possible to determine in which region the current situation falls and act consequently to the indication of the GDTA. An example related to our experiment is shown in Table 3 of Sect. 4.2.
The expressions of Eqs. (16), (17) and (18) are meaningful to our classification purposes. Equation (16) in fact highlights that the similarity between the emotional signatures of the individuals involved is high. Considering Eq. (14), this means that the two emotional signatures have many elements in common related to all possible elements, so the pairs ⟨mood, emotion⟩ of the users are aligned during the communication session being examined. The VCS can infer that there is an assonance between the emotional dynamics of individuals. Similar reasoning can be adopted for Eq. (17). In this case, the similarity is low, and therefore, the pairs ⟨mood, emotion⟩ of the users are different, indicating distance in the emotions and moods expressed in the communication session. The VCS in this case infers that a strong difference between the emotional dynamics of individuals exists. The third case of Eq. (18) refers to a boundary situation in which the VCS cannot make a proper decision about the classification with respect to the emotional dynamic.

The prototype of the virtual counselor system
In this section, VCS implementation is described according to two perspectives: technological and behavioural. The first presents an overview of the architecture and technological assets used to implement the prototype. The second describes the behaviour of the prototype. A constraint of this work is to design a low-cost solution for the users. Furthermore, the current prototype implementation has been conducted with the objective of evaluating the distinctive features of our approach, which are the construction of individual and group emotional signatures, situation identification and classification with the three-way decisions approach, and decision making. Figure 5 shows the architecture of the VCS. The VCS is deployed as a web service on a remote server and provides its functionalities by exploiting components able to detect emotions from text messages (i.e., a sentiment analysis tool) and to detect moods by accessing the API in the cloud for reading data traced by the users' wearable devices (i.e., a smart watch). The main role of the VCS is to generate emotion-driven advice to the users in a specific communication channel. Such advice is expressed as emotional awareness information represented and visualized in the communication tool plug-in to provide users with higher levels of emotional awareness and greater impact on the communication quality.

Technological perspective of the VCS
To implement these functions, we need to employ technological assets to detect emotions and moods. The first asset is the IBM Watson Tone Analyzer 3 service (Tone Analyzer), which uses linguistic analysis to detect emotional and language tones in written text. The Tone Analyzer service is accessed through an SDK provided by IBM, and we used a pretrained model provided by IBM. The second asset (for mood detection through a low-cost wearable device) is the VYVO smart watch accessible through VYVO APIs.
To represent moods and sentiments, it is important to also consider what the selected components (Tone Analyzer and VYVO API) offer. In particular, with respect to moods detected by VYVO wearable devices, the adopted dictionary includes three different values: DEPRESSION, EXCITE-MENT, and CALM. The VYVO API provides a representative value for each quadrant of the arousal-valence schema of the Circumplex Model of Affects (Russell 1980), except for EXCITEMENT for which it is not possible (through the VYVO approach) to understand if such a mood is positive or negative (see Fig. 6).
Furthermore, the possible output of Tone Analyzer is represented by the values ANGER, FEAR, JOY, SADNESS, and DISGUST plus an additional neutral value NONE. Such values can be easily mapped on the basic emotions provided by Izard (2009) and on Plutchik's discrete emotion model (Plutchik 2001).  The values of to implement an -cut for signature classification are given as external parameters. Similarly, the values of and to classify the recognized situations are external parameters in the current implementation of the prototype. These three parameters allow the VCS to perform analysis at different levels of granularity for the classification of signatures (e.g., as already mentioned, high values of simplify the classification, but at a coarse grain level) and with variable precision for the classification of a situation.

Behavioural perspective of the VCS
In this version of the prototype, the situations are labeled as SAFE, UNSAFE and DOUBT. Taking into account the set of moods and emotions we are able to detect with our technological choices, the situations described in Sect. 5 will be labeled as follows: Using three-way decisions, each of these cases can be further classified as POS, NEG and BND. Therefore, we have 9 classes, and we have to recommend actions for these classes  Recommend sending the message if the mood and emotions detected are positive. Otherwise, recommend not to send on the basis of a GDTA. Table 3 reports the corresponding actions for the objective "avoiding conflict situations". The common strategy underlying the actions reported is to support the dynamics of positive emotional contagion leading towards empathy. In the column relating to POS situations, the similarity of emotional behaviour of the users is high. In the case of SAFE situations, it is decided to allow sending the message, while it is recommended to temporarily suspend the conversation in the case of UNSAFE. The general strategy underlying the BND column is to reflect A in both SAFE and UNSAFE situations before sending the message. The reflection takes place downstream of the explanation of the emotional state of B to prevent the emotional dynamics from turning towards a negative type of influence (in the case of SAFE) or to promote a possible positive influence (in the case of UNSAFE). The VCS may also suggest reformulating the message at the end. The actions proposed in the NEG column consider the differences between the emotional states of the two users. In all cases, a better assessment is recommended, showing the emotional state of B. With respect to the DOUBT row, the VCS tries to pass this classification as SAFE by recommending the sending of positive messages when the distance between the emotional states of the users is not large.
We recall that the development of GTDA for VCS is an expert-based task and that the set of actions reported above has been defined only for evaluation purposes.

Experimentation
This section describes the experimentation carried out through our prototype of the VCS. The experimentation was conducted by involving 40 international students following the Decision Model Course, held in English, at the DISA-MIS department of the University of Salerno. The students were divided into pairs to face exam project work. To this end, they worked 1 day at the beginning of September 2020.

Experimental prototype
To execute the first experimentation activity, an app for Microsoft Teams was developed. The students involved in the experimentation have skills in using this application, which is known to them because it is used for distance learning at the University of Salerno. Once the app is installed in the Teams environment, users have to sign up for the counselor service in a given channel. Then, the users are provided with a new button (perfectly integrated into the Teams user interface) to submit their messages into the chat tool of Teams. The click on the aforementioned button activates an action command that serializes the current text message and information about the sender, receivers and channel into a JSON payload. This payload is sent to the web service that invokes the two components and executes its inner behaviour. More precisely, in the complete next release of the software, the sender will be provided with a dialog box in which suggestions generated by the Web Service are visualized. In particular, the sender will be notified that the message was sent or, for example, that reflection is required given some specific motivations related to the emotional signature of the other user. The release used for this experimentation activity does not provide any feedback to the sender, but it traces and stores input, intermediate and output data into a log file (represented in the CSV format).

Methodology
The 40 students were divided into 20 groups of 2 users. Each group had an objective (project work related to the topics of the course) and worked for 4 h. The 4 h consisted of three communication sessions of 1 h each, with two breaks of 30 min each (see Fig. 8).
During each session, the VCS worked as explained. At the end of the first session, the VCS created the individual and group signatures and classified a situation. This information was updated at the end of the second and third sessions. The system prototype traced data and produced a CSV file with the following columns: -sender ID -receiver ID -content (text message) -senderSignature (a pointer to the individual sender signature) -receiverSignature (a pointer to the individual receiver signature) -advice (generated by the Virtual Counselor) -groupSignature (a pointer to the group signature) During the 30-min break, the students were asked to (1) complete an Excel table that reproduces the table of the  emotional signatures (see Table 2) by indicating the moodemotion pairs they perceived during the session, (2) assess how they perceive the given advice (i.e., if the given advice

Results
We have a total of 60 situations, 40 recommendations and 120 individual emotional signatures to assess. The parameters are as follows: = 0.3 for the cut of the signature and = 0.3 and = 0.6 for the three-way decisions. The value of the -cut allows removal of the signature pairs with low values, which would reduce the understanding of the signatures. The trade-off, as discussed, is the removal of some ⟨mood, emotion⟩ pairs.
The ground truth derived from the students for the situations is reported in Table 4. The predictions of the VCS are reported in Table 5. The confusion matrix and the values of the accuracy measures evaluated with the R caret 4 package are shown in Tables 6 and 7. In the confusion matrix of Table 6, each row represents the instances in a predicted class (prediction), while each column represents the instances in an actual class (truth). The classes are labeled with abbreviations consisting of the first letters (e.g., N-S stands for NEGATIVE-SAFE, P-S stands for POSITIVE-SAFE, and so on). The accuracy measures evaluated are sensitivity (which is equal to recall), specificity, positive     predicted value (PPV, which is equal to precision), negative predicted value (NPV), F-measure and balanced accuracy (BA). From the analysis of Table 4, we can observe that there is only one unsafe situation belonging to the N-U class. This is motivated by the fact that the students were friends and course colleagues who knew each other well and decided to carry out a collaborative project. This limited the presence of Unsafe situations. From the confusion matrix of Table 6, it is also observed that for this unique N-U class, the VCS has made a mistake in the prediction by classifying it as B-U. The VCS was therefore wrong regarding the tripartition and not wrong in the comprehension of the group signature. The accuracy measurements are good for the other classes, with BA values higher than 0.9.
Regarding the recommendations, 29 were (approximately 72.5%) correct overall and 11 were incorrect. The distribution of correct and incorrect recommendations with respect to the correct classification of the situation (i.e., the ground from the student) is represented in Tables 8 and 9. For a better discussion of this result, we also report in Table 10 the ground for sessions 1 and 2 (without the 20 sessions 3 that do not foresee a recommendation). We can also observe that most of the NEG cases belong to the third session. The motivation is that, for some groups, 3 working hours may not have been enough to successfully finish the project, and thus, some misalignment between the emotional signatures emerges.
It can be observed that the recommendations proposed in the SAFE-NEG situation are always wrong. This is also due to the limitation of the current prototype that does not allow visualization of a dialog box with explanation, so the users do not understand the motivation for a better assessment. Additionally, the situation DOUBT-BND presents 3 out of 5 incorrect recommendations. In this case, the recommended action is the same as that in the DOUBT-POS, which has a large number of corrected recommendations. The motivation may be that the BND is characterized by different emotional states of the user (lower similarity compared to the POS); thus, the user does not agree with the recommendation of sending because s/he perceives this different emotional setting with her/his interlocutor.   Finally, we report considerations of the individual emotional signatures. We evaluated the similarity between the signatures detected by the VCS and those compiled by the students. Figures 9, 10 and 11 report the similarity values. The captions also report the average value in each session. In all cases, the average similarity value is approximately 0.6.

Conclusions
We have presented the first implementation of a system to enhance CMC by improving the situational awareness of the emotional dynamics of individuals and groups. VCS has concrete applications in social networks, working or learning environments that leverage CMC. In particular, the study carried out focused on the ability of the system to acquire a certain awareness of the emotional dynamics characterized by emotional contagion, in which emotions and behaviours of a person can trigger similar emotions and behaviours in other people.
The current implementation of the VCS presents some limitations. Specifically, it presents limitations with respect to (1) the way in which users are informed about their emotional state, (2) how multiple actions can be suggested on the basis of an individual emotional state, and (3) the ethical effects that such a system can have on the privacy of communication.
With respect to the first issue, the best way to visualize the emotion-mood couples in a user interface in light of the entire emotional process is being studied. An increase in emotional awareness can be obtained; in fact, when the whole process includes a trigger event for the emotion, the emotion itself and the action consequent to the emotional state are represented in an intuitive way. A correct visualization of the emotional signature must therefore be contextualized in the communication process to support individuals' awareness of affective information linked to their activities.
With regard to the recommendation of multiple actions, the study of multicriteria decision analysis methods is ongoing. In particular, the dominance-based rough set approach (Greco et al. 2007) seems to be a good candidate since it works on the basis of a dominance relation. With this approach, a set of actions described with different attributes (that also need to include emotional aspects) can be ordered according to the dominance relation, and thus, the VCS may recommend a set of multiple actions ordered by a priority ranking. However, an order of preference must be established for the emotional-affective attributes so that the dominance relationship can be applied.
With respect to ethical and privacy issues, this is an open research topic. It is easy to understand that emotional data differ from other "my data", and the former poses additional constraints on traditional privacy problems. These constraints relate to the ethical implications of detecting and elaborating personal emotions. Preserving certain privacy levels of user information can be done by integrating VCS privacy models and techniques such as Blundo et al. (2017). On the other side there are no ethical negative effects on the use of individual decisions based on emotions since these decisions are always advices that the user receives, but the final decisions are always up to she/he.
The path taken is, however, promising, and the results of the preliminary experimentation, with all the limitations discussed, allow us to hope for the achievement of a broader goal: the possibility of directing communications towards emotional empathy whose effects we also intend to evaluate in previously investigated domains such as the enterprise workplaces (Gaeta et al. 2012). For instance, we are investigating the combination of FOAF schemes of Gaeta et al. (2012) and the fuzzy signature. In brief, Gaeta et al. (2012) report some results achieved in the domain of enterprise learning and, specifically, in the definition and validation of semantic models to represent enterprise resources and knowledge. Among these models, Gaeta et al. (2012) present a "Worker Model" based on FOAF, SKOS and other ontologies. This worker model contains a representation of the tasks and competencies of a worker. We believe that the VCS can have important applications in the working environment, but we need to correlate the emotional signatures of users/workers with concrete operational tasks and competencies required to achieve the tasks. Our current research extends the models of Gaeta et al. (2012), allowing reasoning on operational tasks and emotions.

Appendix: illustrative example
This appendix describes an illustrative example with two users involved in a conversation (see Fig. 12). We assume that a message produced by user Sara is influenced, to some extent, by her mood and emotion, which can be detected in different ways, such as the use of wearable devices and text analysis of the messages exchanged during the conversation. The mood of a receiver, such as Bob (see Fig. 12a), may or may not be influenced by the message received; consequently, the receiver may change his emotional state (mood-emotion pair). In a similar way, Rose may be influenced by Sara even if in a different way with respect to Bob (see Fig. 12b), and so on.
During a conversation, each individual is therefore subject to stimuli that can modify her/his emotional state through different variations of the mood-emotion pair. Measuring and photographing these variations allow for the determination of the emotional behaviour of the individual: that is, for signature creation. The signature of an individual, such as Sara, is given by the most representative ⟨mood, emotion⟩ pairs of the user, which in some way characterize the user.
The role of the VCS in the scenario is shown in Fig. 12c). The first goal of the VCS is to determine an emotional signature, ES, of the individuals involved in a conversation. It is evident that an individual can have interactions with several individuals, such as Sara having interactions with Bob and Rose, and may, therefore, be characterized in a different way in relation to the individual with whom she is compared. The VCS determines an emotional signature in an aggregated way starting from partial behaviours of a user. In particular, for a generic user A involved in a multiparty CMC scenario, the VCS: -computes partial emotional signatures for user A, e.g., ES A→B , where B ∈ U − {A} , with U being the set of all the users, -aggregates these partial signatures to obtain the overall signature, e.g., ⨀ is a proper aggregation operator.
Using similarity measures, the VCS can gain awareness of the following aspects: Fig. 12 A CMC scenario -whether the emotional state of user A is homogeneous or presents differences when interacting with particular users, allowing us to recognize emotional contagion situations or situations characterized by contrasting or opposing emotional states; -users having similar or dissimilar emotional signatures, as determined by comparing ES X signatures. These users may be recommended by the VCS to be included (or not) in a communication scenario; -the overall emotional situation of the group, which we call GS determined by aggregating the emotional signatures of the individuals.
This information allows the VCS to make decisions on a set of actions that can be useful to achieve a given goal and implement a strategy. For instance, if the VCS aims at avoiding conflicts among the participants, it can decide to take actions only when it recognizes an escalation of tension in the conversation. This situation can be classified  as unsafe with respect to its objectives, and in this case, VCS may recommend some simple actions to the participants, such as reflecting before sending a message, to a more articulated flow of tasks devoted, for instance, to help participants find an agreement or establish a relationship. The identification of actions to be recommended by the VCS is an expert-based task.

Evaluation of signatures
We suppose Sara is communicating with both Bob and Rose, while Bob and Rose are not communicating with each other. The emotional signatures of the users involved in this scenario are shown in Fig. 13 with the support of histograms. In the figure, the value of each couple ⟨mood, emotion⟩ is the membership degree of the couple with respect to the signature. The absolute similarity (i.e., Eq. (14)) among these signatures is reported in Table 11. By aggregating Sara's partial signatures, it is possible to obtain Sara's emotional signature shown in Fig. 14 (where the average was used as the aggregation operator).
From the analysis of the signatures, the VCS starts to acquire an improved awareness of the emotional dynamics in the period under examination. Analysing the similarity values, the VCS can infer that Bob and Rose exhibit dissimilar emotional behaviour in their relationship with Sara. From the analysis of the signatures (see Fig. 13), Bob appears to be characterized by the emotions E1 and E2 in the period under examination, and only minimally by the E3 and E5. Sara, on the other hand, is mainly characterized by E3 and E5 and very little by E2. Analysing the overall behaviour of Sara (Fig. 14) and the partial behaviour towards Bob and Rose (Fig. 13), it emerges that, towards Bob, Sara is characterized by the m1 and m2 moods. With respect to Rose, on the other hand, Sara's mood is more varied, including m3.

Situation recognition and decision making
Suppose the main goal of the VCS is to moderate a discussion while avoiding escalation of tension in the conversation. The VCS can make several decisions based on the particular recognized situation. Consider Fig. 15. Let also M = {M1, M2, M3} = {Calm, Depression, Excitement} and E = {E1, E2, E3, E4, E5} = {Anger, Fear, Joy, Sadness, Trust} . I n Fig. 15, GS is the group signature evaluated with an average operator (only the most representative pairs are shown).
Consider case (a) of Fig. 15. Bob is characterized by a Calm mood, but his emotions vary between Anger and Fear. Sara, on the other hand, is characterized in this section by the Sadness emotion and by variations in moods between Calm and Depression. The group situation is characterized by a Calm mood with emotions between Anger and Sadness. The emotions that characterize the group can lead to a growth of misunderstandings and tensions in communication. The characterization of the group belongs to a situation that can be considered UNSAFE because of negative emotions. Analysing the similarity value between Bob's emotional signatures towards Sara and Sara towards Bob, it is observed that Sim Abs (ES Bob→Sara , ES Sara→Bob ) = 0.45 , so the emotional dynamics of the two subjects are not exactly similar. We fix = 0.3 and = 0.6 , and we can classify the situation as BND. Now, when Bob is sending a message to Sara, VCS can raise an early warning indicating that Bob appeared calm but that his emotions are negative and could affect Sara, who has been experiencing moments of sadness and sometimes appearing depressed. VCS thus recommends more thought before sending the message.If depression and sadness continue to be detected when Sara is sending a message, VCS can recommend stopping the conversation momentarily. All these actions are devoted to avoiding a shift from BND to POS 5 that could be characterized by the emergence in Sara of other negative emotions such as despair that can emerge from the combination of fear (which Sara can receive from Bob's messages) and sadness (which can be seen from Sara's characterization) (TenHouten 2006). Now, consider case (b) of Fig. 15. Rose appears characterized by emotions such as Joy and Trust and Calm and Excitement moods. Sara expresses Trust but also Anger as principal emotions. When the mood of Sara is Depression, specifically, the emotion associated is mainly Anger. The group situation is characterized by a combination of Calm and Excitement moods with Trust emotion. It belongs to the set of SAFE situations, and the similarity between the emotional signatures of the users is 0.59, so the situation is classified as POS. 6 The VCS has to maintain equilibrium in this dynamic. One example of an action to maintain the situation in a POS area can include: Sara reflecting before sending a message to Rose if the mood detected is Depression (since the VCS can infer an emotion such as Anger that is not aligned to the emotional signature of Rose).
Before concluding, let us remember the importance of a clear GDTA structure that reports the correct actions even with respect to the context of the conversation. For example, if the conversation of case (b) happens in workplaces, Anger can also be considered a good emotion since it involves moving toward a goal (TenHouten 2014).
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.