Simulation of Misinformation Spreading Processes in Social Networks An Application With NetLogo
Simulation of Misinformation Spreading Processes in Social Networks An Application With NetLogo
Abstract—We introduce an agent-based framework (developed that can be used on a large scale to explore also slightly
in NetLogo, one of most relevant simulation platforms) to different and personalized versions of the model with the
simulate the diffusion of a piece of misinformation, according possibility to run the process on any topology.
to a known compartmental model in which the fake news and
its debunking compete in a social network. The tool allows to We strongly believe that this implementation can provide
set different values for the spreading rate of the news, the hoax a useful tool to realize what-if analysis [20] and represent
credibility, the probability of fact-checking and the forgetting rate various scenarios through agent-based simulations.
of the agents. Moreover, it is possible to run the process over any
given network. Since NetLogo is free and open source, our tool II. R ELATED WORKS
could be easily used and/or personalised by other researchers to
explore different scenarios of fake news spreading. A. Modeling information diffusion
Index Terms—Information Diffusion, Fake News Spreading, Representing information and rumor spreading through epi-
Fact-Checking, Agent-based modeling, NetLogo demic metaphors has a long tradition [21], [22]: a (fake)
piece of information, indeed, can be seen as a virus that
I. I NTRODUCTION
may potentially infect people. In particular, many works took
Misinformation spreading is currently one of the most inspiration from compartmental models in which there is a
discussed topics in our society, specially because, even if it population of agents connected among them, and each agent
is not a new problem, digital technology and new media can i at each time t can be in a state (compartment) si (t). The
foster its diffusion [1], [2]. Research about misinformation transitions are usually defined by simple equations ruled by
can be categorized on three main lines: automatic detection some probability rates. The most famous models of this cate-
of fake news and social bots [3]–[5], psychological aspects gory are the SIR (Susceptible-Infected-Recovered) and the SIS
and effects [6]–[8] and finally analysis [9], [10] and model- (Susceptible-Infected-Susceptible). Many SIR-based models
ing [11]–[15] of their diffusion to understand its spreading have been proposed to model rumor spreading [11], adding
dynamics. forgetting and remembering mechanisms [23], the presence
Here we focus on the third research line and we provide of skeptic agents [14], and competition among rumors [13].
an application to simulate an hoax spreading process with The SBFC model that we consider here [15] has three states
NetLogo [16]. In particular we target the model presented (Susceptible-Believer-FactChecker) and agents have the pos-
in [15] that follows the epidemic tradition in representing sibility to be infected either by the hoax or by its debunking,
rumor diffusion. The novelty of this model is that misinfor- to forget their belief or verify the news (see details in section
mation and fact-checking are competing actors in a population III-A).
of agents that can decide whether believe or not to the hoax
depending on the credibility of the hoax and on belief of B. Agent-based modeling and diffusion processes
their neighbors; they can also verify or forget about the news In this paper we explore an initial implementation step
with certain probabilities that are parameters of the model. of a misinformation spreading model with multi-agent sys-
From a pure theoretical point of view, through simulations tems, intended as a specific class of computational models to
and mean-field analysis, the authors provided a threshold for simulate actions and interactions of autonomous agents, with
the verifying probability that ensures the eradication of the the main goal of assessing their effects on the system as a
hoax. whole. In particular, ABMs can “provide a more fine-grained
We investigate here the adoption of the same diffusion model of the process, with many parameters that can impact
process in an Agent-Based Modeling (ABM) perspective [17]. the dynamics. We call such models, which explicitly model
ABM focuses on emergent phenomena [18] in complex adap- the individual agents, agent-based simulation models” [24]. In
tive systems [19]. Since the behavior of the chosen model has particular, we adopt NetLogo1 which is one of the most used
been extensively studied on scale-free and random networks,
the goal of this work is providing a tool developed in NetLogo 1 https://ccl.northwestern.edu/netlogo/
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on August 22,2021 at 20:58:40 UTC from IEEE Xplore. Restrictions apply.
ABM platforms, here in use both as a modeling-simulation and a forgetting rate pf ∈ [0, 1]. The transitions through the
tool and as a general purpose tool. states can be summarized in three phenomena. First of all
The salient features of NetLogo include the capability of there are two spreading transitions (S → B, S → F C) that
managing collection of instances of a class of agents, tradi- determine when a susceptible agent i decides to believe or
tionally named turtles2 ; the openness, being a Free and Open not to the rumor. These transitions are defined respectively
Source Software (FOSS) written in Java and Scala; the avail- by two spreading functions fiB and fiF C that depend on the
ability of libraries or extensions to the basic code, to connect belief of the neighbors of agent i, the spreading rate β and
R [25] or Python [26]; in addition, an easy to use graphical the credibility α:
representation of the agents’ world. The diffusion processes nB
i (t)(1 + α)
in social media have been already simulated by following an fiB (t) = β (1)
ni (t)(1 + α) + nF
B C
i (t)(1 − α)
ABM perspective [27]. The role of social networks to predict
FC
ni (t)(1 − α)
the diffusion process has been explored in the context of the fiF C (t) = β B (2)
introduction of new products in a market [28], as well as on ni (t)(1 + α) + nF C
i (t)(1 − α)
different real-world Twitter networks structures [29]. B|F C
where ni (t) is the number of neighbors of i that are in the
III. M ETHODS Believer/FactChecker state at time t. Second, there is a veri-
fying transition B → F C that let a Believer become directly
A. Formal Description of SBFC model
a FactChecker (because he realizes that the news is a hoax,
for instance) and it is simply ruled by the verifying probability
1 − fiB (t) − fiF C (t) pv . Third, agents in Believer and FactChecker states can forget
their belief towards the news and return to the Susceptible state
with a probability pf . These transitions happen following the
S triplet pi (t + 1) = (pSi (t + 1), pB FC
i (t + 1), pi (t + 1)) that
describe the probabilities that the node i, that is in a state
fiB (t) fiF C (t)
si (t) at time t switches to a state si (t + 1) ∈ {S, B, F C} at
pf pf time t + 1. Formally:
615
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on August 22,2021 at 20:58:40 UTC from IEEE Xplore. Restrictions apply.
to setup computations, i.e. graph metrics or count of agents (well described
ca also by a line-plot graph).
setup-var 4) Network extensions: The network of agents is generated
setup-turtles according to a specific library included in the very first row of
update-plot the code with the command extensions [nw]. The creation of the
reset-ticks network is defined by the type-of-network button in the Interface
end (“Barabási–Albert algorithm” by default).
The initial setup resets the world to an initial, empty state (clear- IV. ABM OUTPUT
all), before the initialisation of the main variables in a specific setup-
var procedure. In our case, just the shape of agents as well as the A. The Network representation
text to print in the output area. The procedure setup-turtles creates At the beginning of the simulation, the initial setup of the model
the agents and the network, before updating the visualisation of the creates a network whereas agents are mostly Susceptible (90%),
line plot to count different kinds of turtles. Finally, the reset-ticks instead of Believer (10%). As described in Figure 2 edges are gray. In
button reset the time counter to zero, sets up the initial state of the addition, some procedures improve the visualisation of the graph by
world in the plots. adopting a spring layout, as well as expanding the distances between
The main cycle go consists of the continuous increment of time nodes.
steps until the stop condition (300 time steps) is reached (ticks).
to go
tick
if ticks > 300 [stop] ; the stop condition
spreading
forgetting
verifying
(...)
end
The three procedures in the main cycle are spreading, forgetting
and verifying corresponding to the functions for agents’ changing
state, as previously detailed in section III-A.
We describe here the code of the procedures forgetting and
verifying, while spreading just corresponds to the computation of the
above mentioned equations. In particular, the forgetting procedure Fig. 2. Output representation of the network in NetLogo. Agents’ color
describes how each agent, regardless of belief state, forgets the fake- indicates the corresponding State. Arcs are gray and a Force-directed Spring
news with a fixed probability pforget. Similarly, each agent can layout improves the visualisation.
fact-check the hoax with a fixed probability pverify in the verifying
procedure.
B. Simulation results
to forgetting ; B -> S; F -> S The execution of the simulation can be firstly explored in the graph
ask turtles with [state="B" or state="F"][ of the Interface. The count of the three different state types of agents
if random-float 1 < pForget [ describes the evolution of the diffusion process.
set state "S"
]
]
end
to veryfing ; B-> F ;
ask turtles with [state = "B"][
if random-float 1 < pVerify [
set state "F"
]
]
end
Fig. 3. The Interface tab in NetLogo platform with buttons on the left, the
2) State of agents: Each agent includes a variable state to trace network of agents in the center and simulation results described with a line
the personal condition, identified by a character: Susceptible (“S”), plot and monitors.
Believer (“B”), or FactChecker (“F”).
turtles-own [ 1) Verifying simulation trends: The model behaviour obtained
state ; "B", "F", "S" by varying initial parameters with NetLogo are consistent with the
] ones obtained in the original paper by simulations with R program-
ming language and mean-field analysis [15]. In first experimental
3) Display: The diffusion process is represented with three settings, Barabasi-Albert (BA) and Erdos-Renyi (ER) networks are
different colors for each state changing over time. Susceptible nodes considered with the same number of nodes (1,000) and mean degree
are gray, Believer nodes are blue and FactChecker nodes are red. (6). These simulations maintain fixed the values of both the spreading
The output area in the NetLogo Interface visualizes the network of rate (0.5) and the forgetting probability pforget (0.1), with the aim
agents connected by curved gray edges. Several buttons control the to understand the influence of fact-checking activity by varying
simulation setting, while some monitors display the results of some only pverify and the credibility parameter. Similarly, we tested other
616
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on August 22,2021 at 20:58:40 UTC from IEEE Xplore. Restrictions apply.
configurations which clearly reveal the validity of resulting trends, as [4] K. Shu, A. Sliva, S. Wang, J. Tang, and H. Liu, “Fake news detection on
represented by the line plot in the Interface (see Figure 3). social media: A data mining perspective,” ACM SIGKDD Explorations
2) Verifying raw values: At the same time, we checked values Newsletter, vol. 19, no. 1, pp. 22–36, 2017.
[5] E. Ferrara, O. Varol, C. Davis, F. Menczer, and A. Flammini, “The rise
obtained by simulations. For instance, the above mentioned scenario
of social bots,” Communications of the ACM, vol. 59, no. 7, pp. 96–104,
converges to an amount of about 70% Fact-checker, 8% Believer 2016.
and 22% Susceptible agents. The results obtained here and the [6] B. Nyhan and J. Reifler, “When corrections fail: The persistence of
ones described in a similar work on hoax diffusion [15], [31] are political misperceptions,” Political Behavior, vol. 32, no. 2, pp. 303–
equivalent. By modifying network configurations as well as formula 330, 2010.
parameters, these convergence results constitute a verification of the [7] S. Lewandowsky, U. K. Ecker, C. M. Seifert, N. Schwarz, and J. Cook,
proposed agent-based simulation. “Misinformation and its correction: Continued influence and successful
debiasing,” Psychological science in the public interest, vol. 13, no. 3,
pp. 106–131, 2012.
V. C ONCLUSIONS AND FUTURE WORK [8] C. Silverman, “Lies, damn lies and viral content,” Tow Center for Digital
This paper introduced a tool to simulate agent-based diffusion Journalism, Columbia University, 2015.
processes of fake-news in a social network. We considered a known [9] M. Del Vicario, A. Bessi, F. Zollo, F. Petroni, A. Scala, G. Caldarelli,
H. E. Stanley, and W. Quattrociocchi, “The spreading of misinformation
model based on epidemic spreading process in which misinformation
online,” Proceedings of the National Academy of Sciences, vol. 113,
and fact-checking compete on a population of agents that can believe no. 3, pp. 554–559, 2016.
or not to the hoax, verifying or forget the news. The parameters of the [10] C. Shao, G. L. Ciampaglia, A. Flammini, and F. Menczer, “Hoaxy: A
model are the spreading rate, the credibility of the hoax, a forgetting platform for tracking online misinformation,” in Proceedings of the 25th
probability, a verifying probability, the population size and the initial international conference companion on world wide web, 2016, pp. 745–
seeds (number of believers at time t = 0). The behaviour has been 750.
already extensively studied on random and scale-free networks: here [11] Y. Moreno, M. Nekovee, and A. F. Pacheco, “Dynamics of rumor
we offer a tool to run the model on any desired topology tuning the spreading in complex networks,” Physical Review E, vol. 69, no. 6,
values of all the parameters. p. 066130, 2004.
[12] C. Budak, D. Agrawal, and A. El Abbadi, “Limiting the spread of mis-
The results of our implementation in NetLogo match with the
information in social networks,” in Proceedings of the 20th international
ones obtained by simulations in different platforms and analytical conference on World wide web, 2011, pp. 665–674.
computations. On the other hand, NetLogo offers the possibility of [13] D. Trpevski, W. K. Tang, and L. Kocarev, “Model for rumor spreading
a very intuitive framework to run personalised version of the model, over networks,” Physical Review E, vol. 81, no. 5, p. 056102, 2010.
and this opens the way to improve scenario analysis and dynamics [14] F. Jin, E. Dougherty, P. Saraf, Y. Cao, and N. Ramakrishnan, “Epidemi-
of simulations. In order to make the tool more usable, we shared the ological modeling of news and rumors on twitter,” in Proceedings of the
code of our model 3 , a large online collection of NetLogo models. 7th workshop on social network mining and analysis, 2013, pp. 1–9.
A first extension of this work would involve performing multiple [15] M. Tambuscio, G. Ruffo, A. Flammini, and F. Menczer, “Fact-checking
executions about the phenomena of interest with the same configu- effect on viral hoaxes: A model of misinformation spread in social
networks,” in Proceedings of the 24th international conference on World
ration to detect mean values and standard deviation for a consistent Wide Web, 2015, pp. 977–982.
number of executions. In particular, we plan to perform sensitivity [16] U. Wilensky and W. Rand, An Introduction to Agent-Based Modeling:
analysis on the top of the here described model. The exploration of Modeling Natural, Social, and Engineered Complex Systems with Net-
parameter sweep from simulation allows us to sweep the values in Logo. The MIT Press, 2015.
predefined increments over a specified range. This effort can be easily [17] S. F. Railsback and V. Grimm, Agent-based and individual-based
achieved by the adoption of BehaviorSpace4 , a specific tool integrated modeling: a practical introduction. Princeton university press, 2019.
in NetLogo. Such tool automatically performs multiple replications [18] E. Bonabeau, “Agent-based modeling: Methods and techniques for
(using multiple processor cores) for each of a number of different simulating human systems,” Proceedings of the national academy of
settings for the model input parameters. sciences, vol. 99, no. suppl 3, pp. 7280–7287, 2002.
[19] J. H. Holland, Signals and boundaries: Building blocks for complex
A second kind of future work includes the exploration of adding adaptive systems. Mit Press, 2012.
a specific behavior to agents. This approach paves the way toward [20] E. Sulis and A. Di Leva, “An agent-based model of a business process:
solving optimization problems, e.g., by the application of search The use case of a hospital emergency department,” in International
heuristic technique such as genetic algorithms [32]. In particular we Conference on Business Process Management. Springer, 2017, pp.
plan to check what happens with the introduction of movements and 124–132.
interactions with other agents (and patches) in a traditional agent- [21] D. J. Daley and D. G. Kendall, “Epidemics and rumours,” Nature, no.
based modeling perspective. 204, p. 1118, 1964.
[22] D. P. Maki and M. Thompson, “Mathematical models and applications:
with emphasis on the social life, and management sciences,” Tech. Rep.,
R EFERENCES 1973.
[23] L. Zhao, X. Qiu, X. Wang, and J. Wang, “Rumor spreading model
[1] D. M. Lazer, M. A. Baum, Y. Benkler, A. J. Berinsky, K. M. Greenhill,
considering forgetting and remembering mechanisms in inhomogeneous
F. Menczer, M. J. Metzger, B. Nyhan, G. Pennycook, D. Rothschild
networks,” Physica A: Statistical Mechanics and its Applications, vol.
et al., “The science of fake news,” Science, vol. 359, no. 6380, pp.
392, no. 4, pp. 987–994, 2013.
1094–1096, 2018.
[24] Y. Shoham and K. Leyton-Brown, Multiagent systems: Algorithmic,
[2] D. Lazer, M. Baum, N. Grinberg, L. Friedland, K. Joseph, W. Hobbs,
game-theoretic, and logical foundations. Cambridge University Press,
and C. Mattsson, “Combating fake news: An agenda for research and
2008.
action,” Harvard Kennedy School, Shorenstein Center on Media, Politics
[25] J. C. Thiele, “R marries netlogo: Introduction to the rnetlogo package,”
and Public Policy, vol. 2, 2017.
Journal of Statistical Software, vol. 58, no. 2, pp. 1–41, 2014.
[3] N. J. Conroy, V. L. Rubin, and Y. Chen, “Automatic deception detection:
[26] M. Jaxa-Rozen and J. H. Kwakkel, “Pynetlogo: Linking netlogo with
Methods for finding fake news,” Proceedings of the Association for
python,” Journal of Artificial Societies and Social Simulation, vol. 21,
Information Science and Technology, vol. 52, no. 1, pp. 1–4, 2015.
no. 2, 2018.
[27] W. Rand, J. Herrmann, B. Schein, and N. Vodopivec, “An agent-based
3 The model adopted in the current paper is available here: http://www.di. model of urgent diffusion in social media,” Journal of Artificial Societies
unito.it/∼sulis/diffusion-processes, as well as on Modeling Commons: http: and Social Simulation, vol. 18, no. 2, p. 1, 2015.
//modelingcommons.org/browse/one model/6403 [28] K. Lee, S. Kim, C. O. Kim, and T. Park, “An agent-based competitive
4 ccl.northwestern.edu/netlogo/docs/behaviorspace.html product diffusion model for the estimation and sensitivity analysis of
617
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on August 22,2021 at 20:58:40 UTC from IEEE Xplore. Restrictions apply.
social network structure and purchase time distribution,” Journal of
Artificial Societies and Social Simulation, vol. 16, no. 1, p. 3, 2013.
[29] Z. Chen, “An agent-based model for information diffusion over online
social networks,” Papers in Applied Geography, vol. 5, no. 1-2,
pp. 77–97, 2019. [Online]. Available: https://doi.org/10.1080/23754931.
2019.1619193
[30] M. Tambuscio, D. F. Oliveira, G. L. Ciampaglia, and G. Ruffo, “Network
segregation in a model of misinformation and fact-checking,” Journal
of Computational Social Science, vol. 1, no. 2, pp. 261–275, 2018.
[31] M. Tambuscio and G. Ruffo, “Fact-checking strategies to limit urban
legends spreading in a segregated society,” Applied Network Science,
vol. 4, no. 1, p. 116, 2019.
[32] E. Sulis, P. Terna, A. Di Leva, G. Boella, and A. Boccuzzi, “Agent-
oriented decision support system for business processes management
with genetic algorithm optimization: an application in healthcare,”
Journal of Medical Systems, vol. 44, no. 9, pp. 1–7, 2020.
618
Authorized licensed use limited to: Universidad de Sevilla. Downloaded on August 22,2021 at 20:58:40 UTC from IEEE Xplore. Restrictions apply.