Evaluation of emotional dynamics in social media conversations: an approach based on structures of opposition and set-theoretic measures

The paper presents the results related to the definition and adoption of structures of opposition, built with set-theoretic measures, to evaluate emotional dynamics that arise during conversations on social media. Specifically, a graded hexagon of opposition is used to compare the emotional profiles of individuals involved in a dyadic conversation. Set-theoretic measures, based on fuzzy logic, are used to construct the hexagon whose analysis allows us to understand the tendency of the conversation toward empathy or lack of empathy. The results can be useful in the context of the current trend of social media sensing and, in particular, to support social media providers in receiving early warnings related to the analysis of emotional dynamics that could lead to or degenerate into information disorder. The results have been evaluated with conversations extracted from the Empathetic Dialogue dataset.


Introduction
Social media sensing is a recent trend that leverages on the adoption of algorithms and tools to analyze social media and acquire information on users' opinions, interests and social behaviors. A serious problem that the big players of the social web are facing is that of the amount of false, discriminatory, inappropriate content circulating on social media and which can also have extreme consequences for users. Broadly speaking, this phenomenon goes by the name of Information Disorder (Wardle and Derakhshan 2017) that, however, is mainly concerned with the investigation and comprehension of the nature of information disorder (e.g., classification of mis-dis-or mal-information) and of the intentions of the agents (e.g., harmful or not). In this broad framework of research, a niche of investigation relates to the analysis of emotional dynamics.
It is known, in fact, that social media platforms act as amplifiers of the information disorder for various reasons B Angelo Gaeta agaeta@unisa.it 1 Dipartimento di Scienze Aziendali -Management & Innovation Systems (DISA-MIS), Università degli Studi di Salerno, Via Giovanni Paolo II, 132, 84084 Fisciano, Italy whose analysis goes beyond the objectives of this paper. To contrast information disorder, social media providers can leverage on technological tools to: (i) recognize instances of information disorder (e.g., fake news, stances), (ii) understand if emotional dynamics tend toward phenomena of disorder that can lead to inappropriate user behavior (e.g., hate campaigns).
The paper focuses on the second of the two aspects mentioned above and the distinctive feature of the presented results is the adoption of a structure of opposition to recognize emotional dynamics in a social media conversation.
Structures of opposition have a long history starting from the logical square of opposition defined by Aristotle. Their use is profitable when it comes to comparing objects or propositions to understand if they are contradictory, contrasting or contrary. In the paper, a particular structure of opposition is used. It is the graduated hexagon defined in Dubois et al. (2020) and built with set measures (such as Jaccard and symmetrical difference) to evaluate the identity, diversity, similarity, dissimilarity between two objects represented as sets. In the application of this structure to the study of emotional dynamics, the objects compared are the emotional profiles of a Speaker and a Listener involved in a social conversation. Emotional profiles are modeled as fuzzy sets. Empathy was chosen as a model for the study of emotional dynamics. Although, in fact, it is possible to study emotional dynamics by also considering other models, such as appraisal theory (Scherer 1999), empathy appears to be the most appropriate model for verifying the tendency of a social conversation toward phenomena of information disorder. Appraisal theory hypothesizes that emotions arise from interpretations and explanations of people's circumstances even in the absence of physiological arousal and, therefore, appears useful as a model to explain how emotions can develop. Empathy, on the other hand, leverages on the concept of Emotional Contagion which states that one person's emotions and related behaviors directly trigger similar emotions and behaviors in other people. This last aspect appears to be of interest for the research objectives of this paper.
The results presented in this paper are such to bring significant benefits to editors and social media managers. Technological advancements in artificial intelligence, in fact, allow to recognize and classify emotions and marketing strategies are able to monetize emotions but, as it is discussed in section 2, few research studies are devoted to evaluate emotions to mitigate the risks related to social communication when there is emotional dissonance among the participants.
The paper is organized as follows. Section 2 reports related works on recognition of emotional dynamics. Section 3 reports background information on the structures of opposition. Section 4 describes the approach used to analyze emotional dynamics in social media conversations with a hexagon of opposition. Section 5 reports the results of the experimentation done on conversations from the dataset empathetic dialogue (Rashkin et al. 2018) and section 6 draws conclusions and presents future works.

Related works
Among the research works related to recognition of emotional dynamics in conversations, very few are focused on their analysis in order to understand emotional trends toward empathy or lack of empathy that can bring to information disorder phenomena.
A first type of related works consists of researches aimed at finding shifts in emotional dynamics. These shifts can be, in fact, considered as precursors of disorder. Servi and Elson (2014) propose an approach that combines text analysis with a mathematical algorithm to analyze influence in social media, derive trends in the levels of emotions expressed and detect breakpoints when those trends change. Their concept of breakpoints aims at identifying variations in emotional patterns and, therefore, comes close to our idea of understanding contradictions (e.g., oppositions) with structures of opposition.
A second type of related works leverages computational models to model emotions and represent a conversational situation in emotional terms. A recent survey on computational models for emotions is Smith and Carette (2022) that analyses the models according to three tasks: Emotion Recognition, Emotion Generation and Emotion Effects on Behavior. Some recent papers that define computational models specifically devoted to analyze the dynamics of conversations are Gaudine and Thorne (2001) and Ghosal et al. (2020) that use a common sense knowledge to develop a framework that is such to consider elements such as mental states of individuals, events, and causal relations in a conversation. Tu et al. (2022) propose Sentic GAT, a context and sentiment aware framework, to analyze emotional dynamics. Also in this case, a common-sense knowledge is represented by context and sentiment aware graph attention mechanisms. An approach based on the adoption of Sentic-Net and sentic-pattern-based algorithm to process emotions derived from text analysis is proposed in Serrano-Guerrero et al. (2022). The emotions processed are then aggregated using ordered weighted averaging (OWA) operators to establish a polarity on users' mood. Another research work that makes use of aggregators is Karczmarek et al. (2022) that aims to find the bet integrand of a Choquet integral to solve issues in emotional classification (such as lack of sharp boundaries between separate emotional states) for speech emotion recognition problem. Fuzzy logic is also adopted to model conversations and/or communications in emotional terms. In Arguedas et al. (2018) a fuzzy classification model is defined to infer affective behavior in educational discourse allowing tutors to comprehend students' emotions. In Wen et al. (2023) a new method of information fusion is proposed to work on multimodal data and, specifically, to define a multi-view multimodal fusion framework that retains more interactive information.
A third type of works, lastly, uses the concept of empathy to understand if emotional dynamics take a wrong direction and, in some cases, to recommend actions during a conversation. This type is closer to the purpose of this paper. A recent work sharing some commonalities with this paper is Adikari et al. (2022) that, however, is focused in the healthcare domain. Adikari et al. (2022) describe an empathetic conversation agent to model emotions and behaviors of patients and to be used as a co-facilitator in automating patient communication. Their approach is based on finite state machines to model emotion and Markov Chains to estimate emotional state transitions for prediction of emotions. Augello (2022) uses narrative structures and knowledge and behaviors typical of social practices to construct empathetic dialogues with robots. Social practices are formalized with a set of actions and developed in the ACT-R model. Campos et al. (2022) propose a fuzzy model to detect verbal violence in social media conversations. The model is a Mandami inference model that, according to the authors, is dynamic since it can change the form of the variables (i.e., trapezoidal to triangular) depending on the requirements.
The results of this paper have some commonalities with the analyzed works. The focus of this paper is the recognition and analysis of emotional dynamics during a conversation to understand if variations can lead to disorder and, as described in section 4.2, empathy is used as emotional model. What distinguishes the results presented in this paper is the adoption of a hexagon of opposition allowing to reason on and compare emotional profiles of the actors of a conversation. In this context, the paper defines a relatively simple and computationally tractable method for assessing the tendency of a social media conversation toward empathy or lack of empathy and understand the degrees of sympathetic concern among individuals involved in the conversation.

Structures of opposition
Structures of opposition were introduced as a support to logic. The most famous is the logical square of opposition (Parsons 1997) which dates back to Aristotle and is used to support the syllogism. The square is shown in Fig. 1. The traditional Aristotelian square consists of the universal affirmative (A), the universal negative (E), the particular affirmative (I) and the particular negative (O). A and E are contraries (they cannot both be true but they can both be false), A and O are contradictory (they cannot both be true or both false) as well as E and I. I and O are sub-contraries (they cannot both be false but can both be true) and, finally, the pairs A-I and E-O are called subalterns. (A proposition is a subaltern of another if and only if it must be true if its superaltern is true, and the superaltern must be false if the subaltern is false.) On the right-hand side of Fig. 1, the hexagon of opposition is shown which is an extension of the square. The meaning of the points A, E, I and O and their relations are the same as the square of opposition. To these four vertices, other two points are added: i) the point Y which represents the conjunction of I and O and ii) the point U which represents the disjunction of A and E. A brief description of some applications of structures of opposition can be found in Moretti (2012). Blanché (1957) uses structures of opposition to model general concepts such as utility and emotion. Beziau (2018) proposes the analogical hexagon that is based on the dichotomy Identity vs. Difference. The study of structures of opposition has seen the interest of researchers and scholars active in the field of rough sets, fuzzy sets, and orthopairs such as Ciucci et al.  Boffa et al. (2021) and Dubois et al. (2020), graded extensions of structures of opposition are described and constructed using quantifier-based operators that are fuzzy quantifiers. A graded hexagon of opposition for similarity and related concepts is presented in Dubois et al. (2020). This hexagon is at the base of the method described in this paper (see section 4) and is shown in Fig. 2.
The hexagon is constructed using set-theoretic measures based on cardinality and it is devoted to compare two objects, X and Y , in order to evaluate their identify, similarity, difference and related concepts. Let us analyze the points of the hexagon to understand their meaning. The labels of the six points (i.e., A, E, I, O, U, Y) are the same of Fig. 1.
Vertex A of Fig. 2 is a Jaccard index that is a measure of Fig. 2 is a normalized symmetric difference between X and Y . Considering the properties of the symmet- , the sets are disjoint). As for the vertex A, there can be different degrees of difference. Vertex E of Fig. 2 is an opposition index inside X , with respect to Y . Let us better explain this index.
if and only if X = ∅ and Y = ∅. The opposition of X with respect to Y is maximum when X is something and Y nothing. This opposition, on the other hand, is minimal when Vertex I of Fig. 2 is pseudo-similarity index because it is not symmetrical and informs us how much the elements of For vertex Y of Fig. 2, the same considerations made for vertex E can be done. This is an opposition index inside Y with respect to X .
For vertex U of Fig. 2, the same considerations made for vertex I can be done. It is pseudo-similarity index which informs us how much the elements of X are included in X ∪Y .

The hexagon of opposition for the analysis of emotional dynamics
This section presents the application of the hexagon of opposition of Fig. 2 to analyze emotional dynamics in a conversation. For this analysis, the sets X and Y represent the emotional profiles of two individuals involved in a conversation and the semantics of the vertices inform us about the degrees of identity, difference, similarity and opposition between the two emotional profiles. The comprehension of the emotional dynamics must take place within the framework of an emotional model. In the paper, the model is the Russian Doll defined by De Waal in De Waal (2007), De Waal (2008).
The following three subsections describe, respectively, how to construct an emotional profile with fuzzy sets, the Russian Doll model of empathy defined by De Waal and the adoption of the hexagon for the analysis of emotional dynamics in a conversation.

Modeling emotional profiles with fuzzy sets
A fuzzy set is defined as "a class of objects with a continuum of grades of membership. Such a set is characterized by a membership (characteristic) function which assigns to each object a grade of membership ranging between zero and one" (Zadeh 1965). Traditional set operations are extended to fuzzy set theory. Formally, a fuzzy set F can be denoted To clarify how the traditional set operations can be extended to fuzzy set theory, let us introduce some fuzzy logic operators such as t-norm, t-conorm and negator (Radzikowska and Kerre 2002).
A t-norm is a function T : [0, 1] 2 → [0, 1] that is monotone, commutative, associative and satisfies the boundary condition, i.e., T (x, 1) = x. Most common t-norms are the minimum, T (x, y) = min{x, y}, and Lukasiewicz, Based on the above definitions, set operations between fuzzy sets can be defined. Let A and B be two fuzzy sets so that A ⊆ U , B ⊆ U and let u be an item of the universe U , i.e., u ∈ U . The standard complement of A is defined as: The intersection, union and complement can be defined in terms of t-norm, t-conorm and negator.
Let us define an individual emotional profile in terms of a fuzzy set. Let us consider the case of an individual involved in a social media conversation, e.g., Bob. Let E = {e k } be the set of emotions recognized from the analysis of the social activities or from wearable data sensors of Bob in a time windows. e k for k = 1, 2, . . . are categorical values representing basic emotions (e.g., those of the Plutchik's discrete emotion model (Plutchik 2001) 1 shows a matrix where the rows represent the activities executed by Bob in a time window and the columns refer to discrete emotions detected during the activities. The values count the occurrence of cues (e.g., words in a message, facial expressions, biometric signals) that are associated with an emotion during an activity. Let us define c(e k ) as the total number of cues associated with the emotion e k . The value of membership degree for the emotion e k can be evaluated as For the case shown in Tab To simplify the classification of this profile, it is possible to adopt an α − cut that removes all the elements whose membership is lower than α. So, with α = 0.25, the emotional profile becomes: B = { 0.29 anger , . . . , 1 f ear } that can be more easily associated with a negative emotional state characterized by fear and anger.

The Russian doll model of empathy
De Waal proposes an evolutionary process of empathy. In De Waal (2008), the Russian Doll model is developed in parallel with that of imitation starting at the innermost layer from emotional contagion and motor mimicry that are both based on perception-action matching (PAM). At the second layer, the Russian Doll model considers the sympathetic concern which is the ability to evaluate the other person's situation and to try to understand why he or she feels that way and, at the outermost layer, the perspective taking which refers to the ability to identify with the other to make his point of view one's own. The evolutionary process which leads to empathy can be represented as in Fig. 3. As De Waal emphasizes, PAM is at the core of the emotional contagion. PAM theory states that users perceive the environment and events within it in terms of their ability to act. In Prochazkova and Kret (2017) is clarified the process by which emotional contagion can arise from PAM and, here, we only emphasize how "emotional contagion can be produced by a complex social stimulation (e.g., a mother giving a verbal compliment/criticism to her child), or a more innate nonverbal stimulus (e.g., mother's positive/negative facial expressions toward her infant)" (Prochazkova and Kret 2017). The target of the stimulus (e.g., the child) has to perceive the elements of the above-mentioned complex social stimulation that can involve heterogeneous signals such as combination of verbal and nonverbal cues and give a meaning to these cues.
Sympathetic concern is a step beyond the emotional contagion. It requires the ability of an individual to understand the emotional state of the other also with reference to one's own emotional situation. Perspective taking is the highest level of empathy and indicates that an individual is able to internalize the perspective of the other and, therefore, is able to predict to some extent the reactions and emotional state of the other.

Analysis of emotional dynamics
Let us suppose that X and Y are the fuzzy sets that model the emotional profiles of two individuals involved in a conversation and let us analyze the meaning of the vertices of the hexagon of opposition represented in Fig. 4. Figure 4 shows the vertices of the hexagon colored differently to highlight with red and black points, respectively, the tendency of conversations to empathy or lack of empathy.

Emotional dynamics tending toward empathy
Let us analyze the vertices highlighted with red points in Fig. 4.
Vertex A can provide information on the level of emotional contagion between the two individuals. Emotional contagion is the innermost level of the Russian doll model and can be considered as a degree of equality between the emotional profiles of the individuals involved in the conversation. The 10898 A. Gaeta

Fig. 4 Hexagon of opposition for emotional dynamics
Jaccard index that evaluates vertex A can give indications on how, along different time windows, spread of emotions and emotional convergence can happen from one individual to another. Vertices I and U inform about the degree of sympathetic concern of an individual toward another.
Let us consider vertex I. The index that measures this vertex is a pseudo-similarity that reaches its maximum value when the emotional profile of Y contains the emotional profile of X . In fact, |Y | |X ∪ Y | = 1 if X ⊆ Y or X = ∅ with the second case that can be considered a degenerated case (where there is a lack of emotions for the individual X ). Vertex I gives information on the sympathetic concern of Y toward X and informs on how much the individual Y is able to comprehend and internalize the emotional state of the individual X . A similar reasoning can be made for vertex E with the necessary modifications in relation to the individuals involved.
It can be observed from Fig. 4 that there is a subaltern relation between A and I as well as between A and E. With set-theoretic formalism, these relations can be expressed as: , v(I ) the values of the indexes associated with the vertices, the previous relations can be reformulated as follows: v(a) ≤ min{v(E), v(I )} meaning that the value of emotional contagion is less than or equal to the minimum of the values of sympathetic concerns. This corresponds to the graphical representation of the Russian Doll, with emotional contagion being a smaller doll with respect to sympathetic concern. Furthermore, this relation indicates that: i) high levels of emotional contagion cannot lead to low levels of sympathetic concern (regardless of the role of individuals), and ii) low levels of emotional contagion can lead to high lev-els of sympathetic concern at least for one individual toward the other.

Emotional dynamics tending toward lack of empathy
Let us now analyze the vertices highlighted with black points in Fig. 4, The analysis is simpler and more immediate if we consider the relationships that exist between these vertices and those shown with the red points.
Vertex O is contradictory with respect to vertex A. While the latter provides an estimation of the emotional contagion through a measure of identity, the vertex O provides a measure of the difference between the emotional profiles of the individuals involved. The measure associated with vertex O reaches its maximum when the emotional profiles of X and Y are disjoint, that is, they have no emotions in common. This means that no phenomenon of emotional contagion is perceived during the conversation between X and Y .
Vertex E is contradictory with respect to vertex I. While the latter provides an estimation of the sympathetic concern of Y toward X through a measure of pseudo-similarity, the vertex E gives information on how much the emotional profile of X is opposite (diverges) from that of Y .
A similar argument can be made for vertex U which is contradictory to vertex Y.

Reasoning with the hexagon
Using the cardinality measures associated with the vertices of the hexagon, a social media provider can gain insight into the trend of the emotional dynamics of a conversation. If the measures associated with the red points are high, the conversation tends toward empathetic dynamics in which a good level of emotional contagion is reached among the participants and sympathetic concern is detected among them. If, on the other hand, the measurements associated with the black points of the hexagon are greater, the tendency is toward a conversation that lacks empathy and which could degenerate into phenomena of information disorder. In this situation, the social media provider can take actions to mitigate the risk.
Before concluding, let us note that inside the hexagon there are several squares and triangles (Moretti 2012). One of these triangles is the one shown in Fig. 5 which represents a complete tri-partition of the emotions of the dyadic conversation between X and Y . It is a tri-partition as it divides the emotional universe into three disjoint parts, as can be seen from the Venn diagram at the bottom of Fig. 5 which shows the numerators of the three indices associated with the points.

Experimentation
This section reports the results of the experimentation executed on conversations extracted from the empathetic dia-  (Rashkin et al. 2018). The dataset consists of about 25k conversations grounded in emotional situations such as sentimental and guilty. Each conversation includes a speaker (S) and a listener (L) and consists of 4-7 interactions between them. Each situation is classified with respect to the emotional situation of S. The dataset contains also an attribute (i.e., the selfeval attribute) reporting human evaluation of the conversation. The authors of the dataset ran crowd-sourcing tasks and asked participants about three aspects of the conversations: Empathy/Sympathy, Relevance and Fluency. The rating are on a Likert-scale from 1 (not at all) to 5 (very much). For additional information, refer to Rashkin et al. (2018).
The objective of the experimentation was to evaluate the correctness of the indices used in the hexagon of Fig. 4 to understand if the emotional dynamics in a conversation involved empathy or lack of empathy.
The test partition of the dataset was used for experimentation. For each conversation, the emotional profiles (fuzzy sets) of S and L, and the cardinality measures reported in Fig. 4 have been evaluated. With respect to the formalism expressed in Fig. 4, X is the speaker S and Y is the listener L. Emotions are extracted from the text of the conversation through the syuzhet R package 2 that uses the NRC Emotion lexicon and fuzzy set operations are executed with the sets R package. 3 The experimentation has been executed in two phases. First, a qualitative assessment of some conversation has been 1 https://github.com/facebookresearch/EmpatheticDialogues. 2 https://cran.r-project.org/web/packages/syuzhet/vignettes/syuzhetvignette.html. 3 https://cran.r-project.org/web/packages/sets/index.html. done. Next, an evaluation of the results with performance metrics has followed.

Qualitative assessment
The qualitative assessment was carried out by analyzing the text of the conversations to understand whether a conversation tended to be empathetic or not. The analysis of the text was then compared with the numerical results of the indices. Two examples are given below. Table 2 reports the results for two conversations of the dataset.
The values in Table 2 indicate that the trend of hit:37conv:74 shows a general lack of empathy (vertex O has a high value). However, it seems that this is due to the particular situation of the speaker. Let us analyze the couple of vertices I-E. The listener seems to have a good degree of sympathetic concern toward the speaker (high value of vertex I) and the speaker seems to have a low degree of opposition toward the listener. Analyzing the couple of vertices U-Y, it seems that the speaker has not reached a proper level of sympathetic concern toward the speaker (low value of vertex U).
In this conversation, S feels alone and L tries comforting and encouraging him. The conversation extracted from the dataset is reported below: S1: ""I there_comma_ dont know what to do_comma_ jst broke up with my girlfriend_comma_ we were 8 years together." L1: "sorry to hear! do you have any idea about the break up? did you think about it ?" S2: "Yes we decided together with our minds_comma_ and know i come home and feel so distant from the world." L2: "sorry again! hope you'll get relief from this sadness. Please concentrate on your interests to divert your mind from this." To better understand the dynamics, we have extracted the emotional profiles of S and L after each message. Figure 6 shows the profiles.
It can be observed that after the first interaction (S1-L1), L just appears surprised of the news. The emotional profile of S constructed after the analysis of the S2 text, however, highlights that the response of L reported in L1 did not affect S's emotional profile. Downstream the analysis of the last interaction, it appears that L is able to perceive S's sad-  In the second conversation of Table 2, S is hopeful about her/his chances to complete college and L seems to be enthusiastic about her/his friend. The conversation extracted from the dataset is reported below: S1: "I have only a few more semesters in college. I feel very hopeful about my chances of finishing." L1: "That's awesome. What are you majoring in?" S2: "Environmental engineering! I enjoy it_comma_ but I wouldn't say it is my passion in life." L2: "Sometimes it's good to have something you enjoy make money so you can pursue your passion without worrying about it." From the values reported in Tab. 2, the conversation seems to have an empathetic trend. Vertex A, I and U have high values indicating that speaker and listener achieved a good level of emotional contagion and sympathetic concern.
Also for this conversation, the emotional profiles of S and L after each message are evaluated. Figure 7 shows the profiles. Observing the profiles at the end of the conversation, S2 and L2, it is clear that during the conversation a phenomenon of emotional contagion was triggered.

Performance evaluation
Following the qualitative assessment, an assessment was made with respect to performance measures. In total, 1385 conversations were evaluated covering almost the entire body of conversations in the test partition of the data set with the exception of a few of them for which the function for extracting emotions from text did not provide results.
The selfeval attribute is used to establish a ground truth for the correct classification of the conversations. As mentioned at the beginning of this section, the selfeval attribute is evaluated using a Liker scale to assess three characteristics of a conversation. For each conversation, the ratings have been averaged and the conversations have been considered as tending toward empathy (Emp) if the average calculated in this way is higher than the overall average of all conversations. Conversely, the classification is lack of empathy (noEmp).
The prediction of the cases is based on the value of vertex I. There is a motivation behind this choice. The conversations of the dataset are representative of the emotional situation of the speaker. Therefore, in terms of empathetic tendency, it is useful to understand the degree of sympathetic concern achieved by the listener with respect to the speaker. This degree is given by vertex I. A case is predicted as Emp if val(I ) > 0.5.
The evaluation has been done using the confusion matrix and performance measures implemented in the R caret package. 4 The confusion matrix is reported in Table 3 and the values of performance measures are reported in Tab. 4

Discussion
The qualitative assessment made it possible to evaluate the vertices of the hexagon by comparing them with the text of the conversation. The weakness of this evaluation lies in the fact that the interpretation of the development of the conversation (whether or not it tends toward empathetic dynamics) is left to human judgment. However, it remains useful as it has allowed to verify in many conversations a correspondence between the values of the vertices of the hexagon and the human evaluation of the conversation. The evaluation through confusion matrix and performance measures is more objective but it is affected by the binary classification of conversations which, in the context of emotional dynamics, is too restrictive. The criteria adopted to define the ground and the predictions appear reasonable for our study. They are based, respectively, on the use of the attribute available in the dataset for the human rating and on the use of the value of vertex I which, as explained in the previous section, represents the concern of the listener. However, the fact remains that the conversations of the dataset cover a fairly broad spectrum of emotional situations (with over 30 emotional situations such as sentimental, lonely and guilty) that are difficult to correlate to the two classes analyzed.
Let us now discuss the results presented in Table 3 and Table 4, The sensitivity (or recall, or also true positive rate) is quite good but is counterbalanced by a low specificity (or true negative rate) value. We recall that the positive class is Emp and these values indicate a good capacity to predict conversations that tend to empathy. This means that point I, used to discriminate empathetic conversations, works quite well with regard to the prediction of empathetic conversations but should be combined with other indicators to improve the ability to predict non-empathetic conversations. The different prediction capacity can be noticed by comparing the true positives and the true negatives from the confusion matrix of Tab. 3.
A further confirmation of this is obtained by analyzing the precision value and the corresponding F1 measure value.

Conclusions and future works
The paper has presented an original method to analyze emotional dynamics of social media conversations to understand their trends toward empathy or lack of empathy. The method is based on the adoption of a graded hexagon of opposition constructed with set-theoretic measures.
The results have been evaluated on conversations extracted from the empathetic dialogues dataset that presents a limitation consisting of the few (from 4 to 7) number of utterances that, in most cases, does not allow to follow a real emotional dynamic. However, the preliminary results showed the potential of using the proposed measures to evaluate emotional dynamics. A point in favor of the proposed approach is that the adopted cardinality measures are computationally inexpensive and this makes them suitable for different social environments. Secondly, from the analysis of the results, they seem in many cases to be easily understandable.
Future works will proceed in two directions. The first aims to overcome the weakness of the method for the correct prediction of non-empathetic conversations through further experimentation that combines multiple vertices of the hexagon for the prediction phase. To this purpose, also additional dataset consisting of different types of conversations (including also hate speeches and offense) will be investigated The second direction consists in the integration of this method with some previous results such as Gaeta et al. (2021) in which it is proposed the development of a software agent, the Virtual Counselor, to recommend actions during social conversations. The method proposed in this paper can provide the Virtual Counselor with the awareness of emotional dynamics and help during the decision-making phase. In doing so, privacy and ethical issues will be investigated. With respect to the first point, emotional data differs from other data since it reports the most intimate information of a human being. Privacy by design and privacy methods (McStay 2020) have to be used if any emotional information processing (such as that one of the paper) must be implemented in real applications. With respect to ethical issues, ethics can be an issue only if some decisions are taken in an autonomous way. Also, in this case, some guideline to perform ethical decision making (Gau-dine and Thorne 2001) has to be considered and can be applied.
Funding Open access funding provided by Università degli Studi di Salerno within the CRUI-CARE Agreement.

Data Availability Statement
The raw data elaborated during the current research are publicly available.

Conflict of interest
The author declares that he has no conflict of interest.
Ethical approval This article does not contain any studies with human participants performed by any of the authors.
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://creativecomm ons.org/licenses/by/4.0/.