SGHateCheck: Functional Tests for Detecting Hate Speech in Low-Resource Languages of Singapore

Ri Chi Ng, Nirmalendu Prakash, Ming Shan Hee, Kenny Tsu Wei Choo, Roy Ka-Wei Lee · DOI

Introduction

Hate speech (HS) detection models are predominantly trained on Western-centric, English-language datasets. This creates a significant performance gap when these models are deployed in linguistically diverse regions like Southeast Asia. Singapore presents a unique challenge with its four official languages—English, Mandarin, Malay, and Tamil—and the widespread use of "Singlish," a local creole with distinct grammatical structures and profanities.

Traditional evaluation methods rely on "held-out" test sets, which often mirror the biases of the training data. To address this, the authors of SGHateCheck introduce functional testing. This framework systematically evaluates specific model capabilities, such as identifying slurs, handling negation, or distinguishing between hateful profanity and non-hateful colloquialisms.

Methodology

The researchers developed SGHateCheck, a diagnostic suite comprising 21,152 test cases across Singlish, Mandarin, Malay, and Tamil. The process involved:

  1. Template Generation: Using LLMs like ChatGPT to translate and paraphrase English HS templates.
  2. Human Refinement: Native speakers and cultural experts ensured templates captured local idioms and targeted relevant vulnerable groups in the Southeast Asian context.
  3. Functional Categories: Tests were categorized into direct expressions of hate (slurs, threats), contrastive non-hate (neutral statements), and linguistic challenges (negation, question phrasing).

Benchmarking and Fine-Tuning

The study benchmarked five models: mBERT, LLaMA2-7B, Mistral-7B, SEA-LION (a regional model), and SeaLLM. Models were fine-tuned on two datasets: EngSet (English-only) and MultiSet (English, Mandarin, and Malay).

Performance comparison of models fine-tuned on English (EngSet) vs. Multilingual (MultiSet) data. Note the significant disparity between non-hateful (NH) and hateful (H) classification accuracy.

The results indicate a severe "non-hateful" bias. While models appear accurate overall, they frequently fail to identify actual hate speech, particularly when fine-tuned only on English data. Switching to the multilingual MultiSet improved average accuracy on hateful cases from 10.8% to 41.3%, though performance remains suboptimal.

Model Performance and Regional Nuances

A key finding was that general-purpose models often outperformed regional ones. Mistral-7B and SeaLLM emerged as the top performers, demonstrating better reasoning capabilities for complex social tasks compared to SEA-LION, which was specifically pre-trained on Southeast Asian languages.

Average performance of various LLMs across different protected target groups, highlighting the superior performance of general-purpose models like Mistral-7B.

Furthermore, models struggled with specific linguistic structures. For instance, "denunciations of hate"—where a user quotes hate speech to condemn it—were frequently misclassified as hate speech itself. Tamil remains the most challenging language for current models, reflecting its status as a low-resource language in the AI landscape.

Conclusion and Future Work

SGHateCheck reveals massive "blind spots" in state-of-the-art LLMs regarding regional hate speech. While multilingual fine-tuning helps, models still fail on nuanced functional tests like negation and question-based hate. Future research will focus on addressing code-switching (mixing languages) and improving model understanding of intent, particularly in distinguishing between generating hate and condemning it.

Summary updated

BibTeX
@inproceedings{ng2024sghatecheck,
  author = {Ri Chi Ng and Nirmalendu Prakash and Ming Shan Hee and Kenny Tsu Wei Choo and Roy Ka-Wei Lee},
  title = {{SGHateCheck: Functional Tests for Detecting Hate Speech in Low-Resource Languages of Singapore}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
}
Figure