# On Simulating the Propagation and Countermeasures of Hate Speech in Social Networks
## 4 Our Multi-Agent Social Network: The Baseline Model
### Opinion Diffusion by Content  
The connections created in the network become the paths for opinion diffusion, since, if a user post some content, their followers will receive it and, as a result, may change their opinion. In the bounded confidence models described in Section 2.2, the influence of users is limited to its followers. However, in social networks such as Twitter, the content created by users can be reposted and, thus, arrive to and influence further audience.  
Here we reuse the concept of confidence level, a threshold for opinion difference, defined in the Hegselmann-Krause (HK) model [29] and introduced in Section 2.2. Following the ideas of the heterogeneous HK model, we define the threshold \(\tau_{i}\) for accepting the opinion of other users tailored for every user \(i\) depending on their hate score. The assumption is that: (i) extreme users tend to have rather fixed opinions, which cannot be changed by any influence; and (ii) alternatively, those with a middle hate score may be more open to accept opinions that differ from their own, and in fact could be still dragged to one of the extremes. Figure 6 depicts the function used for the threshold: extreme left and right sides of the possible hate score values exhibit fixed opinion (i.e., with a threshold of 0) whereas median users have a threshold of 0.49.  
Figure 4: Representation of the network during the growth phase. Blue circles represent normal users, red circles correspond to hateful users. Arrows signal influence relations.  
Figure 5: Alternative hate score probability distributions modelled with \(\Gamma(\alpha,\lambda)\) distribution.  
Additionally, we borrow the formula of opinion adaption from the Deffuant-Weisbuch (DW) model [30] (see Section 2.2), but apply it to the author's opinion carried within a post. Thus, a post of user \(j\) will influence the opinion of user \(i\) by a factor \(\mu=0.05\) at the round \(k\), if the difference of both opinions is below a confidence level \(\tau_{i}\):  
\[x_{i,k}=x_{i,k-1}+\mu\cdot(x_{j,k-1}-x_{i,k-1}),\quad\text{iff}\quad|x_{i,k-1}- x_{j,k-1}|<\tau_{i} \tag{1}\]  
where \(x_{i,k}\) represents the opinion of user \(i\) at time \(k\) and the \(\tau_{i}\) threshold is modelled as the previous triangular function on the users' opinion (hate score) in Figure 6.  
As aforementioned, in our simulations of content diffusion, we consider that followers' opinions may change when the followees post new content but also when they repost. In particular characterise our diffusion model as follows:  
* Hateful users are very active and post at every round (i.e., with a publication probability \(p_{h\_pub}=1\)), whereas normal users only post with probability \(p_{n\_pub}=0.2\) (in the code, these probabilities appear as \(p\_publish\_post\_hater\) and \(p\_publish\_post\_normal\), respectively).
* A post cannot be reposted twice by the same user. However, it can be reposted with some low probability even if the opinion does not correspond to reposter's own opinion. We align here with the retweet statistics provided by [PERSON] et al. [21] and set reposting probabilities between normal (\(n\)) and hateful (\(h\)) users to \(r_{n\to n}=0.15\), \(r_{h\to h}=0.45\), \(r_{n\to h}=0.05\) and \(r_{h\to n}=0.15\) (here, the arrow \(\to\) indicates content flow and, in the code, these probabilities appear as \(p\_normal\_reposts\_normal\), \(p\_hater\_reposts\_hater\), \(p\_normal\_reposts\_hater\), and \(p\_hater\_reposts\_normal\), respectively). In this manner, a hater will repost a normal post with the lowest probability.
* In order to model different users' activity profiles, we limit the amount of reposts that a user can perform per round by setting variables to _max_reposts_by_normals_ = 2 and _max_reposts_by_haters_ = 6.