Seediscussions,stats,andauthorprofilesforthispublicationat:https://www.researchgate.net/publication/320685561
AnAdaptiveComputationalNetworkModelfor
Multi-EmotionalSocialInteraction
ConferencePaper·October2017
CITATIONS
0
READS
73
3authors:
Someoftheauthorsofthispublicationarealsoworkingontheserelatedprojects:
NoprojectViewproject
RamonaRoller
2PUBLICATIONS0CITATIONS
SEEPROFILE
SuzanQuirineBlommestijn
2PUBLICATIONS0CITATIONS
SEEPROFILE
JanTreur
VrijeUniversiteitAmsterdam
726PUBLICATIONS8,190CITATIONS
SEEPROFILE
AllcontentfollowingthispagewasuploadedbyJanTreuron28October2017.
Theuserhasrequestedenhancementofthedownloadedfile.
An Adaptive Computational Network Model for
Multi-Emotional Social Interaction
Ramona Roller1, Suzan Q. Blommestijn2and Jan Treur3
1University of Amsterdam, Computational Science, Email: ramona.roller@student.uva.nl
2University of Amsterdam, Computational Science, Email: suzanblommestijn@gmail.com
3Amsterdam University, Behavioural Informatics Group, Email: j.treur@vu.nl
Abstract. The study reported in this paper investigates an adaptive temporal-causal
network-model for emotion contagion. The dynamic network principles of emotion
contagion and the adaptive principles of homophily and Hebbian learning were used to
simulate the change in multiple emotions and social interactions over time. It is shown
that the model can be successfully initialised with Twitter data, while parameters
were optimised via simulated annealing. Moreover, an exploratory analysis for model
validation and applications provided insights in the model’s potentials and limitations.
The study advances the existing methodology of modelling the social contagion of
multiple emotions in a context where also the social network evolves over time.
Emotion Contagion, Network Oriented Model, Twitter, Homophily, Hebbian Learning,
Sentiment Analysis, Simulated Annealing.
1 Introduction
Emotion contagion describes the implicit spread of emotions among people [1]. I am
happy and smile at you, you will adopt my happiness without awareness, and perhaps smile
too. With the rise of social media in our lives emotion contagion has become a subject of
study. For example, Twitter users produced more positive or negative tweets if they were
exposed to an above average amount of either positive or negative Tweets [2]. In a similar
way, Facebook users expressed different levels of happiness depending on the content in their
News Feed [3]. Studies in large-scale online networks have shown that emotion contagion does
not depend on shared geographic location or culture [4], but is influenced by the thematic
context of emotion expression as an analysis of topic-specific review webblogs has shown
[5]. This previous research has, however, only considered either one single emotion or the
simplistic distinction between negative and positive emotions without further distinction.
The current study addresses this limitation by analysing emotion contagion using an
adaptive network-oriented model inspired by Twitter interactions. In this model Twitter
users are represented by nodes with connections among each other that are weighted by
the amount of retweets and user mentions. Directed edges provide causal information about
these interactions. Previous work on network-oriented models has mainly related emotion
contagion to the network’s topology. For instance, a node’s centrality increases the effects
of emotion contagion on this node [6] and happiness contagion differs between clusters since
people are more likely to connect to others with the same subjective well being [7].
In contrast, the current study uses network-oriented models to simulate the temporal
course of people’s emotions. These are propagated based on the changing connections be-
tween nodes in the network. For this purpose, the network principles ’homophily’ and ’Heb-
bian learning’ are used to drive the network evolution. Homophily states that the connection
between two nodes becomes stronger when they are more similar in state value [8]. The more
alike, the stronger the connection and vice versa. In Hebbian learning the connection be-
tween two nodes becomes stronger if the nodes are often simultaneously active, i.e. their
state values are non-zero at the same time [9]. By implementing the contagion principle and
the two adaptive network principles it is assumed that they are driving factors of emotion
contagion.
The model was used to simulate processes concerning emotion contagion with respect
to tweets about ’Zwarte Piet’, a black Christmas folklore figure who is subject to a racial
debate in the Netherlands. This thematic restriction allows to relate emotion contagion
results to real life situations. Data collection took place around the time of ’Sinterklaas’,
the holiday when Zwarte Piet and his master Sinterklaas distribute presents to the children.
A fine-grained emotional analysis was performed by extracting values for specific emotions
from the tweets. In this way the spread of, for example joy can be compared to that of anger
in the network. Since ’Zwarte Piet’ is a highly controversial character it was expected that
tweets about him provided emotional values of the whole value spectrum.
The goal of the current study is to explain emotion contagion by dynamic network
principles within an adaptive temporal-causal network model. A data-driven initialisation
of state and weight values is conducted based on Twitter data. Furthermore, an exploratory
attempt is presented to validate the model with Twitter data, by predicting future emotional
values and linking network principles back to real-world behaviour on Twitter.
2 Analysing the Example Domain
2.1 Data Collection and Cleaning
The Twitter space was crawled for tweets about ’Zwarte Piet’ over a period of eight
days. These Twitter data were collected with twitter’s search API [10] which collects tweets
from specified days in the past. The data collection days were chosen to be Monday, 28th
November through Monday, 5th December, because ’pakjesavond’, the evening when ’Sin-
terklaas’ distributes the presents, falls on 5th December. The discussion about ’Zwarte Piet’
was expected to peak in the days before ’pakjesavond’ resulting in an increasing number of
tweets about this topic. In order to exploit as much Twitter data from the ’Zwarte Piet’
discussion as possible, tweets were queried for several spelling variants of ’Zwarte Piet’, such
as ’zwarte piet’, ’Zwarte Piet’, ’zwartepiet’, and ’ZwartePiet’. Eight data sets were gathered,
one for each data collection day. The Python package tweepy [11] was used to connect to
Twitter’s search API [10].
The raw data consisted of eight day-specific data sets holding tweets about ’Zwarte Piet’
with tweet-specific attributes, such as ’user ID’ (who tweeted), ’retweet count’ (how often
was the tweet retweeted) and ’user mentions’ (IDs of other users who were mentioned in the
current tweet) [12]. These tweet-based raw data were re-organised to show the information
per user on a specific data collection day. This information included relevant attributes from
the raw data and engineered ones.
Since the focus of this study was on the temporal development of emotion contagion in
a social network, a fixed set of Twitter users was required who interacted with each other
over a certain period of time. Only those users who (re)tweeted daily over a longer period
(max. 8 days since data were collected over 8 days) were included in the analysis. The final
intersection set consisted of all 8 days with 20 users. This intersection was chosen because it
consists of a large enough network and a lot of value was given to the temporal information.
Based on this intersection set all users, their retweeters and their mentioned users who were
not part of this set were removed from the data.
2.2 Sentiment Analysis
IBM’s tone analyzer was used to extract five specific emotional scores from the data [13].
For each tweet and retweet unit interval values for anger, sadness, disgust, fear and joy were
computed from the text. A mean emotional score for each emotion per day was calculated
per user. This required averaging emotional scores across the tweets that a user wrote on a
specific day. If a user only tweeted once the emotional score from this single tweet was used.
3 The Computational Network Model
3.1 General description
An adaptive temporal-causal network model was built to describe emotion contagion
within an evolving network. People were modelled as nodes in the network, with node val-
ues for specific emotions. Nodes were connected via directed edges which represent causal
interactions with the environment. The strength of the impact of an interaction on a person’s
emotion was quantified by a weight value associated with an edge. Both the state and the
weight values are dynamic, meaning that emotions as well as the strength of the interactions
change over time.
Following the Network-Oriented Modelling approach described in [8], these temporal
changes are modelled by update functions. A node’s state value at time t+∆t depends
on the state values at tof the node itself and its neighbours as well as on the weights of
the neighbouring connections at t. A weight value at time t+∆t depends on its value at
time tand the state values of its connecting nodes at time t. Whereas state dynamics were
always modelled in the same way across all nodes, edges were updated according to either
the homophily or the Hebbian learning principle. Person-person interactions were always
updated with homophily. This principle was modelled in a way that the less two people differ
in their emotions, the more their connection will be strengthened. Due to this formalisation
in the model neighbouring nodes which are more alike in state value will increase their
connection weight.
Hebbian learning means that if nodes are simultaneously active their connection will
be strengthened. This was used to model the impact of the environment on a person’s
emotion. A stimulus node was added, representing the presence and therefore importance
of an emotion-trigger in the environment. In this study this emotion-trigger was associated
with a societal discussion about the topic ’Zwarte Piet’. The stimulus’ state value value was
always kept at one, representing an omnipresent ’Zwarte Piet’ discussion. Since the stimulus
was always one, the stimulus-person connection became stronger when the person’s emotion
expression was active.
Following [8], chapter 2, the connection between stimulus and user node was modelled
via specific nodes representing the connection weights. These were additional nodes whose
state values indicate by how much the stimulus-person connection had been learnt. That is,
an active stimulus should result in an active state of a person node and the strength of this
causal impact should increase over time due to learning. Thus, if the value of a Hebbian
node increases over time learning has been successful. Edges were added from the stimulus
to the Hebbian nodes, and from each Hebbian node to its corresponding person. To represent
the reinforcement of the Hebbian learning, an edge from the person nodes to their learning
states was added.
The following three model parameters define a temporal-causal network, and are part of
a conceptual representation of such a network model [8], chapter 2.
1. connection weight ωX,Y
ωX,Y
ωX,Y Each connection from a state X to a state Y has a connection
weight ωX,Y representing the strength of the connection, often between 0 and 1, but
sometimes also below 0 (negative effect).
2. combination function cY
cY
cYFor each state Y (a reference to) a combination function
cYto aggregate the causal impacts of other states on state Y. This can be a stan-
dard function from a library (e.g., a scaled sum or logistic function) or an own-defined
function.
3. speed factor ηY
ηY
ηYFor each state Y a speed factor ηYis used to represent how fast a
state is changing upon causal impact, usually in the [0, 1] interval
Based on the conceptual description, these difference equations of the model are [8]:
Initial user weights
ωX,Y = 0.5∗#rY,X −min(#r)
max(#r)−min(#r)+ 0.8∗#uY,X −min(#u)
max(#u)−min(#u)
(1)
Contagion :Y(t+∆t) = Y(t) + ηY∗(aggimpactY(t)−Y(t)) ∗∆t (2)
Aggregated Impact :aggimpactY(t) = alogistic
alogistic
alogisticσ,τc(V1, ..., Vk),
where Viis the impact ωXi,Y ∗Xi(t) of node Xion node Y.
(3)
Homophily :ωX,Y (t+∆t) = ω(t)+(α∗ω(t)∗(1 −ω(t))∗
(τh− |X(t)−Y(t)|)∗∆t
(4)
Hebbian learningωX,Y (t+∆t) = ω(t)+[ηl∗(X(t)∗Y(t))∗
(1 −ω(t)) −ξ∗ω(t)] ∗∆t
(5)
The homophily threshold τhindicates the maximal difference in state values necessary for
homophily to take place. The amplification factor αdetermines how strong the homophily
effect is. aggimpact is the combined impact of the neighbours of a node. In the logistic
combination function τcis the threshold, and σthe steepness. ηYis the speed factor for
state Y, the rate at which the state value can change from tto t+∆t.ηlis learning rate,
determining how fast the Hebbian nodes change. ξis the extinction rate, determining the
rate at which the growth in the weights is slowed down. #rY,X
#rY,X
#rY,X is the number of times Y
retweeted X, and u
u
urepresent the user mentions. max(#r)
max(#r)
max(#r) and min(#r)
min(#r)
min(#r) are the largest
and smallest number of retweets respectively from one user to another among all users in a
network.
3.2 Data-driven initialization
Initial values for weight and state values were based on the cleaned Twitter data. The
20 Twitter users were represented as nodes in the network-oriented base model and the
weights of their edges were quantified and directed by the amount of retweets and user
mentions between two users. For example, if user Y retweeted user X, X had an effect on
Y, so Y=ωX,Y ∗Y, where the weight ωis proportional to the amount of Y’s retweets
of X. All initial state values and weights in the base model, except for the user states and
the inter-user edges were randomly chosen. The learning state values were initialised with
0.009, the stimulus-learning state weights were set to 0.8, and both ways of the two-way
user-learning edge were set to 0.1. The stimulus-user weight was kept at 1.0 in order to
model the constant presence of ’Zwarte Piet’ in the societal discussion. In total, the model
had 41 nodes. The user-specific state values and weights were derived from the Twitter data
set of the first data collection day. For each emotion within these data the respective emotion
scores were used as initial state values of the user nodes. Inter-user weights were initialised
with a normalised weighted average of the number of retweets and number of user mentions.
In this way five emotion-specific models were derived from the base model. Figure 1 shows
a graphical representation of the model with the initial values.
Fig. 1: Schematic representation of the base model
3.3 Simulation
During the simulation state values and weights are updated according to the steps de-
scribed in algorithm 1. Equations 2, 3, 4, and 5 describe the dynamic update functions for
weight and node values.
Algorithm 1 Network update Pseudo code
1: procedure Update of node values and weights
2: while t<tmax do
3: update inter-user weights with the homophily equation (eq. 4)
4: update other weights with Hebbian learning equation (eq. 5)
5: update node values with advanced logistic function (eq. 3, 2)
6: reset stimulus node value back to 1
7: t++
Figures 2 and 3 show an example simulation result of the model. A random uniform seed
was used to initialize all state values and all weight values within one connection category.
It can be noticed that state values always converge. The Hebbian nodes increasing in value
over the course of the simulation show the increasing influence of the stimulus on the user
nodes. This is the case for users with a high initial value which is a) close to the stimulus
value and b) larger than the initial Hebbian node value. If the initial Hebbian node value
is large but is connected to a user whose state value greatly differs from the stimulus, the
nodes overestimate the impact of the stimulus on the user and adapts by decreasing its own
state value. This shows that initial state values for the Hebbian nodes have to be very small
in order for learning to take place. The user states also converge to the same value as the
Hebbian nodes.
User-user edges either increased over time, indicating that the corresponding user states
were more alike in value or decreased over time when users were more dis-alike. The stimulus-
learning weights first sharply decrease in value before converging to a non-zero value. This
is because the Hebbian nodes initially have a very low state value. Thus the emotion they
express is lower than the one the stimulus expresses at the same time. The reversed condition
for Hebbian learning is in place and the connection between the nodes decreases. Over time,
the weight decreases less sharply because the Hebbian node increases in state value and
therefore its difference with the stimulus decreases. The weight value levels off when the
Hebbian nodes have converged to their final value.
The connections between users and Hebbian nodes in both directions show the same
temporal pattern. After an initial increase they level off at a value between zero and the
final value of the stimulus-Hebbian node weight. The stimulus-user weight was always kept
at one and is therefore omitted in this and following figures.
Fig. 2: State values of model Fig. 3: Weight values of model
3.4 Parameter Tuning and Model Training
The parameters used in equations 4, 5, 3 and 2 were tuned in order to incorporate op-
timal values in the final model. For each of the five emotion-specific models the simulated
data were trained on the real emotional data of the following six data collection days (Tues-
day, 29th November until Sunday, 4th December). Training was accomplished via simulated
annealing and the resulting best model was used to predict real emotional scores of the
last data collection day (Monday 5th December). This algorithm was chosen because its
stochastic nature prevents getting stuck in local optima. Algorithm 2 provides the pseudo-
code with parameter initializations. Since user nodes and Hebbian nodes represent different
node categories, it was expected that they require different parameter values. Thus, two
separate parameter-update mechanisms were implemented each using a different stochastic
element. The cost function compared the simulated data for each user with the real emo-
tional data of the training days at six time points during the simulation. For this purpose, N
evaluation points were evenly spread across the total simulation time, where N refers to the
total number of data collection days, i.e. eight. The differences between the simulated and
the training data at t=n2, n3, n4, n5, n6, n7were used to calculate the mean squared error
(MSE) per user within a network. These MSEs were averaged across all users to receive one
global MSE for a simulation instance that was used to evaluate the cost function.
During testing the simulated data at t=n8was compared to the real data of the last
data collection day. Similar to parameter tuning, the prediction accuracy was evaluated
with the Wilcoxon Rank-Sum test, which is non-significant if two samples are not different.
Wilcoxon tests were also used to evaluate the fit of the simulated data with the data of the
Algorithm 2 Simulated Annealing Pseudo Code
1: procedure Simulated Annealing
2: tmax = 1, tmin = 10−5, t=tmax
3: initialize parameters, old cost
4: cooling rate = 0.9
5: iterations = 50
6: while t > tmin do
7: for i in range(0, iterations) do
8: get new parameters
9: sim data = network simulation(new parameters)
10: new cost = cost(sim data, real data)
11: if new cost <old cost then
12: old cost = new cost
13: best parameters = new parameters
14: else
15: if e−
(new cost−old cost)
t>random(0,1) then
16: old cost = new cost
17: best parameters = new parameters
18: i++
19: t= t*cooling rate
individual training days. The samples compared were simulated emotional scores of all users
at t=niand real emotional scores of all users at the i-th data collection day.
For each emotion-specific model, ten independent runs of simulated annealing were done,
each with a random uniform seed of the initial parameter values, a cooling rate of 0.3 and
10 iterations per temperature level. The set of parameters resulting in the best final cost
was then used to initialize parameter values for a long simulation with a cooling rate of 0.9
and 50 iterations per temperature level.
4 Results
4.1 Parameter Tuning
Tables 1 and 2 summarize the parameter values of the optimal networks and the eval-
uation of the training process respectively. It can be concluded that the parameter tuning
produced good results for Anger, Disgust and Sadness. This means that the proposed final
model for these emotions fit the real data well. This conclusion is based on the result that
those emotions have a non-significant test result for most of the days when comparing the
simulated with the real data. The reasoning behind this method is that it is expected that
the simulated and real data do not differ much from each other, and therefore should not
result in a significant Wilcoxon test.
Emotion
Parameter Anger Fear Disgust Joy Sadness
Speed η
η
ηY0.02397 0.009042 0.05075 0.2805 0.02859
Threshold τ
τ
τ0.6422 0.03981 0.2037 0.4802 0.8451
Persistence ξ
ξ
ξ0.5761 0.7424 0.6353 0.6207 0.3197
Amplification α
α
α8.8197 3.1410 8.1802 3.5402 2.7450
Steepness σ
σ
σ(user nodes) 44.5950 139.6412 171.2871 18.9524 88.5539
Threshold τ
τ
τ(user nodes) 39.8065 73.0825 36.2887 92.9445 97.7408
Steepness σ
σ
σ(Hebbian nodes) 76.03269 78.9939 176.06067 10.1035 113.8370
Threshold τ
τ
τ(Hebbian nodes) 46.3037 77.4851 38.3115 92.6565 99.5812
Table 1: Parameter values per emotion-specific network found with simulated annealing
Emotion Tue Wed Thu Fri Sat Sun
Anger Wilcoxon Z = 275 Z = 357 Z = 370 Z = 350
P-value 0.0654 0.469 0.585 0.413
Disgust Wilcoxon Z = 296 Z = 261 Z = 281 Z = 402 Z = 298
P-value 0.120 0.0420 0.0783 0.913 0.126
Joy Wilcoxon Z = 361 Z = 240
P-value 0.504 0.0203
Sadness Wilcoxon Z = 257 Z = 277 Z = 265 Z = 362 Z = 348
P-value 0.0368 0.0695 0.0478 0.512 0.397
Table 2: Wilcoxon test results for the simulated data versus the real data for all the non-significant
results (with alpha = 0.01). All other results were significant.
4.2 Verification Analysis
In order to check whether the model was implemented correctly the behaviour at sta-
tionary points was analysed. Stationary points were defined as nodes whose change in state
value was smaller than 10−3at time t.
Ystationary (t)⇔ |Y(t)−Y(t+∆t)|<= 10−3
Since the model assumed that states do not change very abruptly, stationary nodes were
expected to still have a change close to zero at tstationary +∆t, that is one time step after
the time when the stationary point occurred. The model was verified based on the following
condition for all stationary points:
verification accuracy = |aggimpact(t)−Ystationary (t)|
verification accuracy ≤10−1
The thresholds 10−3and 10−1were based on suggestions from [8] and were chosen in
consideration of the step size and total simulation time. The total simulation time was
chosen individually for all models so that the simulation converged and stationary points
occurred. Table 3 shows the numbers of stationary points in the respective networks together
with their mean verification accuracy. For all networks the above condition held, providing
evidence that the conceptual assumptions of the models are in place.
Anger Sadness Disgust Fear Joy
number of stationary points 40 40 40 40 40
mean verification accuracy 0.0009 0.0009 0.0009 0.0009 0.0009
total simulation time 3000 7000 700 7000 200
stepsize ∆t 0.2 0.2 0.2 0.2 0.2
Table 3: Results of parameter tuning for model prediction.
4.3 Descriptive simulation results
Figures 4 - 7 show graph visualisations for the initial and final networks of the joy and
anger simulation. Nodes are shown as circles and edges as links between them. The size of
a node is proportional to its degree and its colour represents its state value. The hue of the
edge depicts the weight.
As can be observed from the plots the state values of all the user nodes decrease for Joy.
For Sadness, however, this change is not observed. A possible explanation for this is that
Joy has higher state values to start with and the influence from the (initially low-valued)
Hebbian nodes is therefore stronger.
Figures 8 - 11 present examples of the state and edge values of the joy and disgust
networks. Since the other networks only differed in convergence time from the disgust net-
work but not in the general simulation pattern they were omitted here. In all networks the
stimulus is always present since its state value remains at one for the whole course of the
simulation. Furthermore, the Hebbian nodes increase monotonically, confirming the correct
implementation of Hebbian learning.
Fig. 4: Joy initial Fig. 5: Joy final Fig. 6: Sadness initial Fig. 7: Sadness final
The initial state values in the joy network converge to an average value (Figure 8),
whereas those in the disgust network eventually together level off at an increased value
(Figure 9). The user edges of both networks converge to a weight of 1, with the disgust
edges converging faster than the joy edges (Figures 9, 11). The other edges show the same
simulation pattern in both networks with the stimulus-Hebbian node edges converging to
an increased value and the user-Hebbian node edges levelling-off at a decreased value.
Fig. 8: State values joy Fig. 9: Weight values joy
Fig. 10: State values digust Fig. 11: Weight values disgust
4.4 Exploratory homophily and Learning analysis
It was hypothesised that users who are similar in emotional value expressed in tweets will
increase their interactions, i.e. retweet and mention each other more often. This homophily
principle was implemented in the model so that users in the network whose difference in
state value decreased increased their edge value over the course of the simulation.
Figure 12 provides a theoretical framework for the homophily analysis. The edge value
of two neighbour nodes is plotted against their similarity in state value. Neighbours were
identified in the network and their difference in state value was calculated at the start and
end of the simulation. If this difference decreased over the course of the simulation, the
nodes were more similar in their emotional state (positive x-axis), if the difference increased
they were more dissimilar (negative x-axis). For each of these neighbour pairs the edge
value was also retrieved at the start and end of the simulation. If the edge value increased
the connection between the neighbours became stronger (positive y-axis) otherwise weaker
(negative y-axis). According to the definition of homophily neighbour nodes can only lie in
the first or third quadrant of Figure 12. So either when neighbours are more similar and
their connection gets stronger or when they are more dissimilar and their connection gets
weaker.
Figure 13 checks this requirement for both the simulated and real data. Across all emo-
tions the simulated neighbour pairs fall into the first quadrant. This indicates that homophily
was correctly implemented in the model. In contrast, the real data fall into all four quadrants,
allowing cases that are not possible according to homophily. Any other form of clustering is
neither observed in the simulated nor the real data. Thus, there is no difference in homophily
between emotions.
The Hebbian learning implementation of the model could not be compared to real-world
data since data collection took place in December, when the ’Zwarte Piet’ discussion peaks.
Thus, the stimulus in the model was always present in reality. To validate the learning
another data set should have been collected in the summer or spring, at a time when Zwarte
Piet is not so actively present in societal discussions.
Fig. 12: Theoretical framework
Fig. 13: Relation between similarity in emotional state of two edge nodes and
corresponding weight
4.5 Exploratory prediction analysis
The networks derived from the first data collection day were used as seeds for the sim-
ulations, one for each emotion respectively. The parameters of the models were tuned with
simulated annealing in order to fit the simulated data to the real emotional data of the sub-
sequent six data collection days. These simulations were then used to predict the emotional
values on the last (8th) data collection day.
Results of the parameter tuning are summarized in Table 4. Findings revealed that only
the simulated data for anger and sadness could correctly predict the real emotional data of
the last day. Their cost functions were also the only ones decreasing over the course of the
simulation. These results are surprising since the simulated data do not differ much from the
real data as the low cost values across all emotions indicate. This shows that reduced costs
alone say nothing about the model performance during prediction. This is why statistical
tests were included in the analysis.
Simulation Initial cost Final cost Wilcoxon test
Anger 0.0289 0.0223 Z = 364.0, p = 0.5301
Sadness 0.0256 0.0219 Z = 292.0, p =0.1073
Disgust 0.0194 0.0247 Z = 195.0, p = 0.0033
Fear 0.0019 0.0040 Z = 94.0, p = 1.6126 ∗10−5
Joy 0.0387 0.0387 Z = 105.0, p = 3.1466 ∗10−5
Table 4: Results of parameter tuning for model prediction.
5 Discussion
The purpose of the current study was to build an adaptive temporal-causal network
model to relate emotion contagion to the adaptive network principles of homophily and
Hebbian learning. The model was used for data-driven simulation where initial state and
weight values were derived from Twitter data and included optimised parameters obtained
through simulated annealing. The results show that the data from social online networks
are suitable to initialise the network. Moreover, other kinds of social interaction data, such
as friendships within a school class, could be used for this purpose. This makes the model
very flexible and applicable in a variety of social contexts.
Simulation results showed that all emotional scores converged indicating that Twitter
users across the network eventually are similar in their feelings. Negative emotions (sadness,
disgust, anger, fear) increased in value whereas joy converged to an average value. This is
probably due to the initial scores whose range for the negative emotions was very small and
lay at the lower part of the possible value spectrum whereas for joy it span the entire part
of the spectrum. Since all negative emotions shared this pattern it might also be due to a
systematic error in the tone analyzer. The tool had problems with recognising abbreviations
which are often used in tweets and struggled with Dutch text.
In order to evaluate the model’s accuracy in representing the real system a validation
analysis has to be conducted. The difficulty here lies in exactly defining network principles
with real world behaviour. An attempt was made with the exploratory homophily analysis.
Results revealed a discrepancy between the simulated and real data. Whereas homophily
worked correctly in the simulation, the real data included cases that violated homophily.
For instance, neighbours might be more similar in state value while their weight decreased.
One likely reason for the lack of homophily in the real data is the low amount of interactions
in the network. The number of neighbours was small across all networks and interactions
between neighbours often only consisted of one retweet or user mention. Single retweets were
therefore given an enormous weight in the analysis, which over-estimated their real impact
on user interactions. A second reason might be the model itself. The assumption that weights
are solely defined by amounts of retweets and user mentions might be too simplistic.
In order to show possible applications of the model its predictive power was explored.
Similar to the homophily analysis this prediction exploration was not part of an exhaustive
experimental study. It rather provides some suggestions for model applications. The anal-
yses therefore are not fully optimized in order to provide evidence for or against certain
hypotheses. They are mere sources of inspiration.
The prediction analysis revealed that only the anger and sadness models were able to
predict emotional scores one day in advance. Theoretically, similar optimal solutions also
exist for the other emotion-specific models since simulated annealing always approaches the
global optimum if the cooling scheme is extended to infinity [14]. Thus, in this study the joy,
fear and disgust models required a higher cooling rate in order for prediction to be successful.
This requirement is probably needed since the model was made extra ecologically valid by
forbidding very quick changes in emotional scores since real-life changes do not happen very
abruptly either. This restricted simulated annealing in its efficiency because very sudden
changes might have revealed the optimal solution more quickly.
An important addition from this study to existing research is the use of statistical tests to
validate the parameter tuning. This study made use of the Wilcoxon Ranking test, because
the data violated the assumptions for parametric tests. Other studies could, for instance,
make use of the Anova or other regression methods if the assumptions are not violated. The
use of statistical tests to validate parameter tuning, but also prediction analysis, adds to
providing evidence for a model. In addition it is a tool commonly used in many other areas
of research and can therefore advance the field of network oriented modelling.
Besides these technical issues it is however questionable whether predicting mean emo-
tional scores is ecologically valid. Depending on topic, time of the day and other factors
some tweets have a higher impact on a person’s emotions than others. Merging all tweets of
a person per day disregards the temporal interplay between tweets, as at the end of a day
an evening tweet may influence emotions more than a tweet that was written hours ago.
In conclusion, the current study analysed emotion contagion in a network-oriented model.
The main goal of this study, namely explaining emotion contagion by dynamic network
principles within an adaptive temporal-causal network model, was achieved. The exploration
of validating emotion contagion based on homophily and Hebbian learning with real data
was not successful. This could be due to a simplistic definition of homophily in the model
and the time of data collection. Predicting emotional scores one day into the future was only
successful for the sadness and anger networks which is due to coarse parameter choices in
simulated annealing. This research provides a novel approach in modelling and predicting
emotion contagion. It enables predicting emotional shifts among users in online networks
which is an important step into understanding decision making and opinion forming in social
situations.
Acknowledgment
The authors would like to thank Eric Araujo for his support.
References
1. Cacioppo JT Hatfield E. Emotional contagion. Cambridge Univ. Press, 1994.
2. Zeyao Yang Emilio Ferrara. Measuring emotional contagion in social media. PLOS One, 2015.
3. Adam DI Kramer, Jamie E Guillory, and Jeffrey T Hancock. Experimental evidence of massive-
scale emotional contagion through social networks. Proceedings of the National Academy of
Sciences, 111(24):8788–8790, 2014.
4. Adam D. I. Kramer Cameron Marlow Massimo Franceschetti Nicholas A. Christakis James
H. Fowler Lorenzo Coviello, Yunkyu Sohn. Detecting emotional contagion in massive social
networks. PLOS One, 2014.
5. Matthew Wondra Hang Su ChengXiang Zhai Qiaozhu Mei, Xu Ling. Topic sentiment mixture:
Modeling facets and opinions in weblogs. Proceedings of the 14th international conference on
World Wide Web, Data Mining Track, 2007.
6. Nicholas A Christakis James H Fowler. Dynamic spread of happiness in a large social network:
longitudinal analysis over 20 years in the framingham heart study. BMJ, 2008.
7. Johan Bollen, Bruno Gon¸calves, Guangchen Ruan, and Huina Mao. Happiness is assortative
in online social networks. Artificial life, 17(3):237–251, 2011.
8. Jan Treur. Network-Oriented Modeling. Springer, 2016.
9. Donald Hebb. The Organisation of behavior. Wiley & Sons, 1949.
10. Inc. Twitter. The search api - twitter developers. https://dev.twitter.com/rest/public/
search.
11. Joshua Roesslein. Tweepy - an easy-to-use python library for accessing the twitter api. http:
//www.tweepy.org/.
12. Inc. Twitter. Api overview. https://dev.twitter.com/overview/api.
13. IBM. Tone analyzer discover, understand, and revise the language tones in text. https:
//www.ibm.com/watson/developercloud/tone-analyzer.html.
14. M.; Rasson J.-P. Granville, V.; Krivanek. Simulated annealing: A proof of convergence. IEEE
Transactions on Pattern Analysis and Machine Intelligence, 1994.
View publication statsView publication stats