Skip to main content
QUICK REVIEW

[Paper Review] A Federated Approach for Hate Speech Detection

Jay Gala, Deep Gandhi|arXiv (Cornell University)|Feb 18, 2023
Hate Speech and Cyberbullying DetectionComputer Science4 citations
TL;DR

This paper proposes a federated learning (FL) framework for hate speech detection that enhances privacy by training models on decentralized user data without transmitting raw text, achieving up to a 6.81% improvement in F1-score over centralized models. The approach uses FedProx and FedOpt with five diverse architectures across eight benchmark datasets, demonstrating that privacy-preserving training can simultaneously improve model robustness and performance.

ABSTRACT

Hate speech detection has been the subject of high research attention, due to the scale of content created on social media. In spite of the attention and the sensitive nature of the task, privacy preservation in hate speech detection has remained under-studied. The majority of research has focused on centralised machine learning infrastructures which risk leaking data. In this paper, we show that using federated machine learning can help address privacy the concerns that are inherent to hate speech detection while obtaining up to 6.81% improvement in terms of F1-score.

Motivation & Objective

  • To address the critical gap in privacy preservation within hate speech detection, where centralized training risks exposing sensitive user content.
  • To evaluate whether federated learning can maintain or improve model performance while protecting user data from leaks during training.
  • To investigate the effectiveness of FL with diverse architectures (e.g., Bi-LSTM, RoBERTa, FNet) across multiple hate speech detection benchmarks.
  • To assess model generalization under challenging conditions such as spelling variation, pronoun reference, and adversarial phrasing using the HateCheck evaluation suite.
  • To explore the trade-off between privacy and performance, showing that FL can yield performance gains rather than losses.

Proposed method

  • The study employs Federated Learning (FL) to train models on client devices without transmitting raw data, instead sharing only model weight updates.
  • Two FL optimization algorithms—FedProx and FedOpt—are used to handle non-IID data and improve convergence, with FedProx adding a proximal regularizer to stabilize training.
  • Five machine learning models (Bi-LSTM, FNet, DistilBERT, RoBERTa, and others) are trained using FL and compared to their centralized counterparts.
  • The framework is evaluated on eight publicly available hate speech datasets, including Comb, Binary, and Multi-class datasets from Vidgen et al. (2021), under non-IID client data partitioning.
  • Performance is measured using F1-score and evaluated via the HateCheck benchmark, which tests robustness across 29 functional tests, including derogatory language, spelling variation, and counter-speech recognition.
  • All models are fine-tuned using FL with FedProx and FedOpt, and results are aggregated across multiple rounds to assess convergence and stability.

Experimental results

Research questions

  • RQ1Can federated learning improve the F1-score of hate speech detection models while preserving user privacy?
  • RQ2How do FL-based models perform on robustness benchmarks like HateCheck, especially under adversarial variations in language?
  • RQ3Does the use of advanced FL optimizers like FedOpt and FedProx lead to better convergence and performance compared to standard FedAvg?
  • RQ4How do different model architectures (e.g., BERT-based vs. Bi-LSTM) compare in performance and robustness when trained via FL?
  • RQ5To what extent do FL models generalize to non-hateful expressions, counter-speech, and subtle hate language forms?

Key findings

  • Federated learning models achieve up to a 6.81% improvement in F1-score compared to centralized models, demonstrating that privacy-preserving training can enhance performance.
  • The Bi-LSTM and FNet models trained via FL show 3–5% improvement on HateCheck functional tests, particularly in detecting derogatory language and spelling variations.
  • RoBERTa and DistilBERT models perform best on slurs and non-hateful group identity, likely due to their large-scale pre-training on diverse text.
  • All models, including federated ones, underperform on counter-speech detection, indicating a persistent challenge in distinguishing hate responses from hate speech.
  • The federated DistilBERT and RoBERTa models show a slight performance dip (0.5–1%) on some HateCheck tests, suggesting that large language models may be more sensitive to data distribution shifts in FL.
  • Despite the risk of model update leakage, the overall results show that FL provides a viable path to both improved privacy and better model generalization in hate speech detection.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.