Hate speechHow we built a tool that detects the strength of Islamophobic hate speech on Twitter

By Bertie Vidgen and Taha Yasseri

Published 3 January 2019

In a landmark move, a group of MPs recently published a working definition of the term Islamophobia. They defined it as “rooted in racism,” and as “a type of racism that targets expressions of Muslimness or perceived Muslimness.” In our latest working paper, we wanted to better understand the prevalence and severity of such Islamophobic hate speech on social media. Such speech harms targeted victims, creates a sense of fear among Muslim communities, and contravenes fundamental principles of fairness. But we faced a key challenge: while extremely harmful, Islamophobic hate speech is actually quite rare.

In a landmark move, a group of MPs recently published a working definition of the term Islamophobia. They defined it as “rooted in racism,” and as “a type of racism that targets expressions of Muslimness or perceived Muslimness.”

In our latest working paper, we wanted to better understand the prevalence and severity of such Islamophobic hate speech on social media. Such speech harms targeted victims, creates a sense of fear among Muslim communities, and contravenes fundamental principles of fairness. But we faced a key challenge: while extremely harmful, Islamophobic hate speech is actually quite rare.

Billions of posts are sent on social media every day, and only a very small number of them contain any sort of hate. So we set about creating a classification tool using machine learning which automatically detects whether or not tweets contain Islamophobia.

Detecting Islamophobic hate speech
Huge strides have been made in using machine learning to classify more general hate speech robustly, at scale and in a timely manner. In particular, a lot of progress has been made to categorize content based on whether it is hateful or not.

But Islamophobic hate speech is much more nuanced and complex than this. It runs the gamut from verbally attacking, abusing and insulting Muslims to ignoring them; from highlighting how they are perceived to be “different” to suggesting they are not legitimate members of society; from aggression to dismissal. We wanted to take this nuance into account with our tool so that we could categorize whether or not content is Islamophobic and whether the Islamophobia is strong or weak.

We defined Islamophobic hate speech as “any content which is produced or shared which expresses indiscriminate negativity against Islam or Muslims.” This differs from but is well-aligned with MPs’ working definition of Islamophobia, outlined above. Under our definitions, strong Islamophobia includes statements such as “all Muslims are barbarians”, while weak Islamophobia includes more subtle expressions, such as “Muslims eat such strange food.”

Being able to distinguish between weak and strong Islamophobia will not only help us to better detect and remove hate, but also to