Teaching Artificial Intelligence to Zap Hate Speech
May 29, 2026•13 min•Ep. 2
Episode description
How can spaces where people gather on the internet be safeguarded from trolls poisoning them with hate speech? Liam Hebert wondered if artificial intelligence could be trained to do the job.
So, he dived deep into the complex world of teaching machines to grasp what people truly intend when, in conversation, they use certain words that can have different meanings in different group contexts. After all, some words that can be used as a vicious insult in some settings can be harmless in another.
Hebert tackled the challenge as he pursued a PhD in computer science at the University of Waterloo in Ontario — and produced a hate-speech zapping deep learning model so effective that when he was done, Google hired him as a research scientist. Hebert has also received prestigious awards including the IEEE Canadian Foundation, the Nick Cercone Graduate Scholarship in Computer Science award and a Vanier scholarship from the Natural Sciences and Engineering Research Council of Canada.
We are two secondary school students who participated in a UBC research project that invited us to note our worries about the future and interview someone working to make things better. Racist and sexist speech online is something each of us encounter often, so we wanted to know if a technological fix might be invented. That led us to reach out to Hebert and talk to him about his project and why he pursued it.
Along the way, we also spoke with Takara Small, a Toronto-based journalist who covers technology and its social impacts for news outlets including the CBC and BBC. She reminds us that even if AI gets better at detecting and removing hate speech online, "a lot of the platforms that many people use are designed by private companies and their filters are designed to work based on what they feel is important, what words, what ideas, what topics they feel their audience should have access to or be able to talk about."
The people who run these "private entities decide what words, what language is allowed and it may differ from what the general public feels is acceptable, but it doesn't necessarily mean that they're not working how their builders want them to." One example that comes to mind is Elon Musk's X platform which is home to a lot of bigoted views.
But Small considers combatting hate speech online "an incredibly important topic because a lot of these online spaces are how young people and people of all ages primarily engage with the world. That is their window into learning about other cultures, other people, world news. It's not necessarily from fact-based reporters like myself. Sometimes it's from individuals who have no interest in truth telling and reporting on the real world."
So addressing hate speech online, Small adds, is "important not just because it forms how we engage with each other, but because it's become the primary place where people learn about what's happening around them."
Small notes that legal regulation of hate speech can be an important tool alongside any technological fixes. "If you look at racism and how hate speech is treated in Canada versus in other places, for example, the European Union, there's a real divergence," she notes.
"The European Union has stricter rules when it comes to that. There are actually quite hefty fines in some instances, and then the consequences can grow from there. I think it goes to show that governments can have a huge role to play when it comes to the type of speech we see online, the type of racism, and that it exists everywhere."
With Small's perspectives in mind, we conversed by Zoom with Hebert in San Francisco about the power and limits of AI in detecting hate speech, how atoms and molecules helped him figure out his approach, the rough experiences as a kid that still motivate him, and more. This conversation has been edited for length and clarity.
Dr. Hebert, can you tell us a bit about how you became interested in doing something about online hatred?
I grew up when the internet was pop...
So, he dived deep into the complex world of teaching machines to grasp what people truly intend when, in conversation, they use certain words that can have different meanings in different group contexts. After all, some words that can be used as a vicious insult in some settings can be harmless in another.
Hebert tackled the challenge as he pursued a PhD in computer science at the University of Waterloo in Ontario — and produced a hate-speech zapping deep learning model so effective that when he was done, Google hired him as a research scientist. Hebert has also received prestigious awards including the IEEE Canadian Foundation, the Nick Cercone Graduate Scholarship in Computer Science award and a Vanier scholarship from the Natural Sciences and Engineering Research Council of Canada.
We are two secondary school students who participated in a UBC research project that invited us to note our worries about the future and interview someone working to make things better. Racist and sexist speech online is something each of us encounter often, so we wanted to know if a technological fix might be invented. That led us to reach out to Hebert and talk to him about his project and why he pursued it.
Along the way, we also spoke with Takara Small, a Toronto-based journalist who covers technology and its social impacts for news outlets including the CBC and BBC. She reminds us that even if AI gets better at detecting and removing hate speech online, "a lot of the platforms that many people use are designed by private companies and their filters are designed to work based on what they feel is important, what words, what ideas, what topics they feel their audience should have access to or be able to talk about."
The people who run these "private entities decide what words, what language is allowed and it may differ from what the general public feels is acceptable, but it doesn't necessarily mean that they're not working how their builders want them to." One example that comes to mind is Elon Musk's X platform which is home to a lot of bigoted views.
But Small considers combatting hate speech online "an incredibly important topic because a lot of these online spaces are how young people and people of all ages primarily engage with the world. That is their window into learning about other cultures, other people, world news. It's not necessarily from fact-based reporters like myself. Sometimes it's from individuals who have no interest in truth telling and reporting on the real world."
So addressing hate speech online, Small adds, is "important not just because it forms how we engage with each other, but because it's become the primary place where people learn about what's happening around them."
Small notes that legal regulation of hate speech can be an important tool alongside any technological fixes. "If you look at racism and how hate speech is treated in Canada versus in other places, for example, the European Union, there's a real divergence," she notes.
"The European Union has stricter rules when it comes to that. There are actually quite hefty fines in some instances, and then the consequences can grow from there. I think it goes to show that governments can have a huge role to play when it comes to the type of speech we see online, the type of racism, and that it exists everywhere."
With Small's perspectives in mind, we conversed by Zoom with Hebert in San Francisco about the power and limits of AI in detecting hate speech, how atoms and molecules helped him figure out his approach, the rough experiences as a kid that still motivate him, and more. This conversation has been edited for length and clarity.
Dr. Hebert, can you tell us a bit about how you became interested in doing something about online hatred?
I grew up when the internet was pop...
For the best experience, listen in Metacast app for iOS or Android
