# On Simulating the Propagation and Countermeasures of Hate Speech in Social Networks
## 4 Our Multi-Agent Social Network: The Baseline Model
### Network Construction  
Initially, we create a very small predefined clique of two nodes. A clique is a maximal complete subgraph of a graph [38]. In this manner, the two distinct vertices in the clique are adjacent. Subsequently, we apply a network growth process iteratively, by connecting new nodes (i.e., agents/users) to an existing social network, which was grown in previous iteration steps. Following this process, nodes are created and connections are spawned to existing nodes according to some rule.  
In particular, we reproduce the structure of a social network by applying the _preferential attachment_ iterative method [39]. Figure 4 shows an example of the simulated network we build during this phase. Briefly, in each round, when joining the network, new users connect to existing users with a probability corresponding to the _node degree_ (amount of followers). So that users with many followers are more likely to receive new followers. Since this preferential attachment method does not distinguish between different user profiles, we extend it for considering hateful users.  
1. Firstly, we create, for every simulation round (tick), a new user node and assign it with a hate score that is sampled from the Gamma distribution \(\Gamma(10,25)\), the lavender (right-most) distribution depicted in Figure 5 (recall, from Section 3, that we do so to produce a proportion of about 1% of hateful users in the network). As a consequence of this hate score assignment, the new node becomes a normal user or a hate.
2. Secondly, for each tick, we also connect the newly created user node with some other users so to mimic their behaviour on Gab and Twitter as described in Section 2.1. Specifically, we proceed by defining several variables that help us tailor the network connections as follows: * When joining the network, a new hateful user creates twice new connections than a normal user. In our simulations, a hater sets \(c_{h}=2\) connections, whereas a normal user only establishes \(c_{n}=1\) connection (in the code, these limits are set with variables \(n\_following\_conn\_hater\) and \(n\_following\_conn\_normal\), respectively). We adhere to Twitter's terminology and refer to the new created node as the _follower_ and the node it connects to--i.e., the one being followed--as the _followee_.
* A normal user connects to an existing user within the network according to the preferential attachment method, without considering its hate score. Conversely, a hateful user will prefer to attach to haters. In particular, a newly created hateful user opts in to connect to another hateful user with a probability \(p_{h\to h}=0.9\) (the arrow \(\rightarrow\) in the notation indicates connection and, as for the code, this probability \(p_{h\to h}\) appears as \(p\_hater\_follows\_hater\)), and thus, it can still connect to a normal user with a probability of \(p_{h\to n}=0.1\). Preferential attachment is then used to choose the specific hater to connect to. As a response, the hateful followee spawn s a following connection with the same probability \(p_{h\gets h}=0.9\) (the arrow \(\leftarrow\) in the notation indicates following back and, as for the code, this probability \(p_{h\gets h}\) appears as \(p\_hater\_back\_follows\_hater\)).
* Hateful users receive less followers from normal users per time interval. Hence, following back by normal users is modelled with a probability \(p_{n\gets n}=0.8\) and \(p_{h\gets n}=0.4\). Lastly, haters will be less likely to follow back normal users with \(p_{n\gets h}=0.08\) (in the code, these probabilities appear as \(p\_normal\_back\_follows\_normal\), \(p\_normal\_back\_follows\_hater\), and \(p\_hater\_back\_follows\_normal\), respectively).