Detecting hate speech online using machine learning models
Updated Nov 06, 2026
A model trained on one topic may behave differently when applied to another. Cagri Toraman, Furkan Şahinuç and Eyup Halit Yilmaz examine that problem in Large-Scale Hate Speech Detection with Cross-Domain Transfer.
What the researchers tested
They assembled 100,000 English and 100,000 Turkish tweets from 2020–21. Each language dataset contained 20,000 tweets for each of five topics: religion, gender, racism, politics and sports. Annotators assigned hate, offensive or normal labels.
Transformer models performed best overall among the tested approaches. The evaluation used class-weighted metrics, so overall performance should not be read as the success rate for detecting hate alone.
Transfer direction mattered. Gender was relatively difficult to predict using training from other topics. Conversely, a model trained on English gender-related tweets transferred well to other topics; that pattern was weaker in Turkish. Sports-trained models lost the most performance when moved to other topics. The error analysis also showed failures involving context and apparently positive wording. Read the LREC paper.
What this means for an education project
Our editorial recommendation is to define the intended use before testing a tool. Ask which kinds of mistakes are being counted, inspect examples of missed and incorrectly flagged comments, and evaluate the language and subject matter actually present in your material. Keep any procedure for reviewing sensitive comments explicit rather than treating a classifier's output as a decision about a student.
For ordinary feedback analysis, a separate question is whether the categories capture the issues you want to understand. The student comment analysis governance checklist can help structure that discussion. Record the test examples, the categories reviewers disagreed about and the changes made before the next review. The analysing-comments pathway connects that work with a clear reporting process.
Correction, 7 September 2026: This summary now distinguishes transfer into and out of a topic, clarifies the class-weighted evaluation and removes unsupported extensions to educational safeguarding.
Request a walkthrough
Book a free Student Voice Analytics demo
See all-comment coverage, sector benchmarks, and reporting designed for OfS quality and NSS requirements.
- All-comment coverage with HE-tuned taxonomy and sentiment.
- Versioned outputs with TEF-ready reporting.
- Benchmarks and BI-ready exports for boards and Senate.
UK-hosted · No public LLM APIs · Same-day turnaround