# An Explainable Artificial Intelligence Model for Detecting Xenophobic Tweets
## 1 Introduction  
Xenophobia has been a social behavior present in people since the beginning of humanity. Fear and rejection of the different have led many people to distrust, belittle, and even hate other people who belong to a different social environment [1]. For example, recently, the uncertainty and lack of information about COVID-19 have generated acts of Xenophobia toward people of Chinese origin [2]. These xenophobic acts are more intense using social networks because people can show this discriminatory act non-physical, even with fake profiles or using bots [3, 4]. As of March 2021, 5.1 billion people have access to the Internet, representing 65.6% of the world's population [5]. With the growth of the Internet, many social networks were created, which provide a virtual space for people to communicate through them by sharing posts, pictures, and videos [6]. Some of the most popular social networks today are Facebook, YouTube, WhatsApp, Twitter, LinkedIn, among others [7]. With the spread of social networks for interacting on the Internet, and the use of fake theories, hate posts towards other peoples have been increasing as social media expands. Consequently, these posts cause not only the use of offensive language but even lead to acts of physical violence [8]. Increasingly, social media plays an essential role in amplifying and accelerating violence in the real world. The violent behavior present in social networks such as Twitter, Facebook, among others, has considerably increased the probability of committing acts of violence in the real world, which can be fatal [9]. The next examples of violence preceded by comments on social networks were extracted from _Citizens Crime Commission of New York City_[9]:  
* SUMMARY (Date: 23 July 2017, Place: Nashville, TN, USA, Platform: Facebook): _\"A 20-year-old man and their 37-year-old mother were shot and killed in their home hours after the 20-year-old posted on Facebook multiple photos of himself with large wads of cash, jewelry, and shopping bags.\"_
* SUMMARY (Date: 6 October 2016, Place: St. Louis, MO, USA, Platform: Twitter): _\"An 18-year-old man fatally shot a 33-year-old police officer who was responding to a disturbance call. The shooter had repeatedly threatened violence on their Twitter page for months before the shooting.\"_  
With the aim of stopping the hatred, racism, and Xenophobia present on the Internet, many web pages have rules for their users that prohibit these types of behavior. However, a post with violent content is visible until it is detected as brutal by some administrator user or a system that does not work in real-time, creating a wave of violence. In contrast, it is still posted [4]. Facebook has announced that there is no place for hate speech on their social network, and they would battle against racism and Xenophobia. However, the solution proposed by Facebook and Twitter indicates that the problem depends on human effort, leaving the users the responsibility of reporting offensive comments [10]. According to [PERSON] et al. [11], detecting offensive posts requires a great deal of work for human annotators, but this is a subjective task providing personal interpretation and bias. As [PERSON] et al. [12] mentioned, the need to automate the detection of abusive posts becomes very important due to the growth of communication among people on the Internet. Each social network has its privacy policy, which could or could not allow developers to analyze the publications that users make on their platforms. For example, Facebook does not recognize the extraction of comments from publications, except that these comments are from a page that you manage [13]. Although there are pages such as _export comments_[14] that allow this information to be obtained. However, Facebook only allows downloading publications with less than 485 comments for a price of USD 11. On the one hand, Twitter natively has an API that enables developers to download their users' publications through Twitter Streaming API, and Twitter REST API [15].