
<aside> 💻 This project comprises both an in-depth study of the efforts and techniques used so far for the detection and prevention of hateful content and cyberbullying on the popular social network Twitter, as well as a proposal for a novel approach for feature analysis based on user profiles, related social environment and generated tweets. It has been found that the contribution of user characteristics plays a significant part on gaining a deeper understanding of hate virality in the network, so that this work has allowed to open the field of study and break the textual boundaries giving rise to future research in combined models from a diachronic and dynamic perspective.
</aside>

CodigoProyecto-20190605T102846Z-001.zip
¿Cuánto odio hay en Twitter? No mucho, pero es constante y hay para todos
Así se mide el odio en las redes sociales
Así se reparte el odio cuando hay elecciones en España
HaterNet a system for detecting and analyzing hate speech in Twitter
https://github.com/glorelvalle/socialhaterbert
<aside> 💡 This publication regards to HaterBERT, first part of SocialHaterBERT project.
</aside>
<aside> 💡 Model SocialHaterBERT as a GNN! Improve GraphSAGE with transformers:
</aside>

For more information, the dataset of tweets and users is attached below.
This case study has been conducted for three weeks on a group of high school students from IES Calavaleri, in which a series of verbal aggressions are developed through the Twitter social network. This class is formed by 18 people, which are represented in the strongly connected graph on the left, as well as the relationship of Follow type.
We collected 50 tweets from this group of people and all their relationships are visualized in SocialHaterBERT. This allows us to analyze the behavior within the social network and to understand how their profile can influence the cyberbullying detection.
In this case study we have three different types of actors:
Victims of gender identity, racism and several issues
Stalkers, bullies and aggressors
Impassive witnesses
Out of the 50 tweets downloaded, 22 bullying messages were detected. The tweets have been passed through SocialHaterBERT with the characteristics of the authors, obtaining the result in the tag bullying (0 not bullying, 1 bullying). The following is the analysis of these accounts and their relationships with each other.
$$ \begin{array}{lllllllllll} \text{\textbf{User name}} & \text{\textbf{Screen name}} & \text{\textbf{Rol}} & \text{\textbf{Stereotype}} & \text{\textbf{Received with hate}} & \text{\textbf{Total written}} & \text{\textbf{Written with hate}} & \text{\textbf{Written without hate}} & \text{\textbf{Received without hate}} & \text{\textbf{Retweeted with hate}} & \text{\textbf{Retweeted without hate}} \\ \hline \text{Clarita } & \text{cclaravgm } & \text{Victim } & \text{Nerd } & 16 & 1 & 0 & 1 & 0 & 0 & 1 \\ \text{Cristina } & \text{cristtinah } & \text{Victim } & \text{Trans } & 18 & 2 & 0 & 2 & 0 & 0 & 0 \\ \text{Kevin } & \text{kkkvazquez } & \text{Victim } & \text{Black} & 20 & 0 & 0 & 0 & 0 & 0 & 1 \\ \text{Natalishgold } & \text{natalishgold } & \text{Stalker/aggressor} & \text{Popular (main)} & 0 & 8 & 6 & 2 & 5 & 21 & 2 \\ \text{andreeLOOp } & \text{andree\_loop } & \text{Stalker/aggressor } & \text{Popular } & 0 & 6 & 2 & 4 & 1 & 15 & 8 \\ \text{Rocío Cuevas} & \text{\RociiooCuevas\} & \text{Stalker/aggressor} & \text{Popular} & 0 & 8 & 2 & 6 & 2 & 18 & 2 \\ \text{Albita} & \text{albita\_fit} & \text{Stalker/aggressor } & \text{Popular } & 0 & 6 & 2 & 4 & 3 & 17 & 5 \\ \text{Raul Gómez } & \text{RaulGme35632159 } & \text{Stalker/aggressor } & \text{Bully } & 0 & 5 & 2 & 3 & 1 & 10 & 3 \\ \text{Miguel Pérez Ortiz} & \text{MiguelPrezOrti2} & \text{Stalker/aggressor } & \text{Bully } & 0 & 4 & 3 & 1 & 3 & 9 & 6 \\
\text{Juanma } & \text{JuanmaElDele} & \text{Stalker/aggressor} & \text{Fascist} & 0 & 7 & 1 & 6 & 2 & 11 & 4 \\
\text{Carlos Redondo } & \text{carlinyos4 } & \text{Stalker/aggressor } & \text{Fascist } & 0 & 1 & 1 & 0 & 2 & 12 & 3 \\
\text{Manuu G } & \text{g\_\_manu7 } & \text{Stalker/aggressor} & \text{Fascist } & 0 & 1 & 1 & 0 & 0 & 16 & 5 \\
\text{Duegilito } & \text{diego\_jimenez5 } & \text{Stalker/aggressor } & \text{Fascist } & 0 & 2 & 2 & 0 & 4 & 13 & 6 \\
\text{Jandri } & \text{jandrita\sevilla} & \text{Impassive witnesses} & \text{Normal } & 0 & 0 & 0 & 0 & 0 & 5 & 2 \\
\text{Patri Pereira} & \text{ppereira12} & \text{Impassive witnesses} & \text{Normal } & 0 & 0 & 0 & 0 & 0 & 3 & 4 \\
\text{Camila Fernán } & \text{\camille21\ } & \text{Impassive witnesses} & \text{Normal} & 0 & 0 & 0 & 0 & 0 & 2 & 2 \\
\text{Santi Mos } & \text{santi\mos\ } & \text{Impassive witnesses }& \text{Normal } & 0 & 0 & 0 & 0 & 0 & 5 & 1 \\
\text{Gustavo Hernández} & \text{gustaaav\ } & \text{Impassive witnesses} & \text{Normal} & 0 & 0 & 0 & 0 & 0 & 6 & 1
\end{array}
$$
<aside> 📎 Note: due to the nature of the messages, Twitter deletes particularly offensive tweets (and/or accounts) within a day, which makes it difficult to monitor (especially with new accounts, as developers have devices that are especially vigilant, checking in case they are bots). This is why it is necessary to continuously monitor the entire "target" social network. That is, in the example, students are asked to report their social network accounts on a voluntary basis. While not all will report their accounts, or some will be deleted, etc. However, by observing relationships between accounts (follows, followers, mentions, retweets, etc.) it is possible to understand and visualize the environment of an entire class/school/group. If the aggressors were not connected to anyone in the class, nor did they mention any of its components, we consider that there is no case of aggression or bulling since the affected person has no way of receiving it. Although this event would not be captured as a phenomenon to be observed as part of SocialHaterBERT's monitoring and follow-up work, the good news is that we have observed that Twitter itself deletes these particularly conflictive messages. Note also that, if the tweets were not deleted, we would have more information to feed the social network so the algorithm would learn who is more likely to give and receive hate. In this case, as these accounts have been continuously monitored, there has been time to capture the content of these tweets.
</aside>
It can be seen that the tweets coming from the beginning of the course (week 1) are largely non-bullying, while as the course progresses, bullying is increasingly noticeable (week 2 and week 3).

It can be seen that the hatred feeds back among the network users, observing that the first week is less and that in the following weeks the harassment grows.

In addition, users interact with each other through retweets, favs, and posting tweets, in which it is extrapolated that the receiver of the tweet is the one who is mentioned with their account or by references to their person (see tweets dataset).
In the picture below we represent all user nodes found in Twitter for this case study, as well as follows among them.

Figure1: Total follows between the 18 user nodes. The Follow relationship is represented as a magenta arrow. User nodes are divided into 3 groups: victims (green), stalkers/bullies (red) and witnesses (orange).
We can see our different types of nodes separately, confirming that the stalker nodes have a much stronger connection than the others, so the algorithm is better able to distinguish the difference between users for bullying classification. We also notice that stalkers don't follow victims, however, the other way around, they do follow the rest of the class to a greater extent.

Figure 4: View of clustering from Figure 1. We represent with a star the popular subgroup, a circle to the fascist one and a triangle to the physical bullies.
Below we show the tweets nodes according to their classification (just half of the total tweets to obtain a cleaner graph), showing the author of the tweet in the thumbnail. In light pink we show those obtained by SocialHaterBERT as bullying and the turquoise blue ones as non-bullying. Moreover we show the relationship Retweet between tweets and users. We notice that bullying tweets are more retweeted than the others, relevant factor for the algorithm.

Figure 5: Relationship Retweet between tweets (25) and users represented as a blue arrow. User nodes are divided into 3 groups: victims (green), stalkers/bullies (red) and witnesses (orange).