In brief
- Hate speech is on the rise: Reports of hate crimes have increased more than fivefold since 2012. Around 40% of these cases involve hate speech.
- Prevention aid: Researchers at NTNU are collaborating with Vestlandsforskning (Western Norway Research Institute), the police, and various municipalities to develop a tool that can help identify environments where preventive measures should be implemented.
- Mapping the spread of hate: The tool links individual statements in networks, enabling the ability to analyse how they influence one another and how conversations evolve over time.
- Using machine learning to assess hate speech: The algorithms have been trained on 14,000 Norwegian and English sentences. The tool evaluates factors such as ethnicity, gender identity, religion, and sexual orientation, while explaining the specific words and assessments that inform its classification.
- The goal is real-time analysis – with human oversight: Currently, statements must be entered into the system manually. The researchers aim to automate the data collection process, while humans will contribute to further development and quality assurance.
The number of reported hate crimesHate crime refers to violence, threats or hateful speech motivated by someone's skin colour, ethnicity, religion, gender identity or similar characteristics. has more than quintupled since 2012. Approximately 40% of them consist of hate speech.
The motive for hate speech is most frequently skin colour or ethnicity, followed by sexual orientation. Meanwhile, the Norwegian Police Security Service (PST) reports that politicians and public commentators, as a group, are also increasingly subjected to threats and harassment.
This has become particularly evident recently: earlier this year, Gaute Skjervø – who has since stepped down as leader of the AUF (Workers’ Youth League) – revealed that he must now carry a personal security alarm following prolonged abuse and repeated threats. More recently, SV (Socialist Left Party) deputy leader Marian Hussein announced that she would not seek re-election to her position, citing the same reasons (link in to story in Norwegian).
Driven by digital developments
Ehtesham Hashmi, a PhD candidate at NTNU in Gjøvik, argues that the recent rise in hate speech needs to be viewed in the context of the rapid evolution of social media and other digital platforms.
“The scale and speed of contemporary digital communication mean that hate speech can spread faster and reach more people than ever before,” he says.
Consequently, traditional methods for detecting and curbing such behaviour are no longer sufficient.
He has collaborated with NTNU professor Sule Yildirim Yayilgan, Vestlandsforskning (Western Norway Research Institute), the police, and various Norwegian municipalities to develop a tool designed to combat the problem.
UN special adviser: “Massacres always begin with small actions and language”
Although hate speech can be a criminal offense under Section 185 of Norway’s Penal Code, the researchers emphasize that this tool is not necessarily intended as a means to track down and prosecute specific individuals.
“It can also serve as a tool to identify which environments are most in need of targeted interventions. In this way, it can help the police and municipalities direct their resources toward preventive and awareness-raising measures where they are truly effective,” says Professor Yayilgan.
The tool includes a function that links individual instances of hate speech. The result is a visualized network of statements, showing how they have either given rise to one another or drawn inspiration from each other.
“This means we can see where hate speech originates, how it is picked up by others, and how the conversations it sparks evolve over time,” says Hashmi.
In their latest research paper, the researchers highlight the importance of detecting trends in hate crime at an early stage. They refer to Adama Dieng – the UN Special Adviser on the Prevention of Genocide – who reportedly warned that “big massacres always begin with small actions and language”.
A complex phenomenon
It has taken many years of research and fine-tuning to enable the tool to identify hate speech with the level of accuracy it possesses today.
This is partly because hate speech is a complex phenomenon. “What counts as hate speech from a legal perspective varies from country to country, and what is perceived as hateful also varies from individual to individual,” says Hashmi.
The researchers had to identify common denominators among the various definitions of hate speech. This led to a focus on four key characteristics.
It turns out that hate speech very often revolves around ethnicity, gender identity, religion, or sexual orientation.
“These four categories are central both in Norway and in the UN’s International Covenant on Civil and Political Rights,” says Hashmi.
The tool is therefore applicable and relevant even beyond the Norwegian context.
- You might also like: Robots improved student motivation and helped them perform better
Tool detects “toxic” speech
When the tool detects comments that fall into one or more of the four categories, it assesses the content according to three levels of “toxicity” – that is, the degree to which it is potentially offensive, hateful, or aggressive.
“A statement might trigger several of these parameters simultaneously. Conversely, if it triggers none of them, it is categorized as neutral,” explains Hashmi.
The tool’s ability to discern the parameters relies on machine learning algorithms trained on a total of 14,000 Norwegian and English sentences from platforms such as Facebook, Reddit, and Twitter.
Social scientists at Vestlandsforskning (Western Norway Research Institute) assisted in collecting and categorizing the dataset.
Explains its decisions
However, the researchers did not settle for technology that merely detects and categorizes hate speech; they also wanted it to function in a transparent and understandable way.
“When the tool categorizes a statement as hateful, it explains which words, phrases, and assessments it used to reach that decision. This is important so that everyone can understand what is problematic about the statement, and to maintain trust in the technology,” says Hashmi.
Traditional methods for detecting and stopping hate speech are no longer sufficient. Researchers Sule Yildirim Yayilgan and Ehtesham Hashmi are taking on the challenge by developing a new tool. Photo: Mads Wang-Svendsen, NTNU
The researchers are currently working on enabling the tool to detect hate speech in real time.
“As of now, the statements to be evaluated must be fed into the tool manually. In the future, the tool will be configured to automatically retrieve data from digital platforms on an ongoing basis,” says Yayilgan.
Beyond becoming more automated, the tool will therefore be in a state of continuous development.
“The tool’s design allows it to improve the more it is used. The more data it is exposed to, the more opportunities it has to fine-tune itself and increase its accuracy,” says Yayilgan.
In this sense, the tool has not yet reached its full potential.
However, the researchers emphasize that humans must always be involved in the ongoing development of the tool.
“The system will be able to continuously receive input and improve based on human feedback. This helps ensure that it remains reliable and ethically sound over time,” says Hashmi.
Research:
Ehtesham Hashmi, Sule Yildirim Yayilgan: Ethical and Socially Aware English–Norwegian Hate Speech Detection: A Systematic Design Framework, Machine Learning and Knowledge Extraction, 21 September 2026. https://doi.org/10.3390/make8090292

