Table of Contents
Fetching ...

Few-shot Hate Speech Detection Based on the MindSpore Framework

Zhenkai Qin, Dongze Wu, Yuxin Liu, Guifang Yang

TL;DR

The paper tackles few-shot hate speech detection on social media by proposing MS-FSLHate, a MindSpore-based architecture that combines learnable prompt embeddings with a CNN-BiLSTM backbone and attention pooling, augmented by synonym-based adversarial data augmentation. On HateXplain and HSOL benchmarks, the method outperforms strong baselines in precision, recall, and F1, with ablation studies confirming the critical roles of prompts and augmentation. The work demonstrates that prompt-based learning and lexical augmentation can achieve robust generalization in data-scarce settings and that MindSpore enables scalable deployment on resource-constrained hardware. This approach offers a practical, efficient path toward robust hate speech moderation in real-world, low-resource environments.

Abstract

The proliferation of hate speech on social media poses a significant threat to online communities, requiring effective detection systems. While deep learning models have shown promise, their performance often deteriorates in few-shot or low-resource settings due to reliance on large annotated corpora. To address this, we propose MS-FSLHate, a prompt-enhanced neural framework for few-shot hate speech detection implemented on the MindSpore deep learning platform. The model integrates learnable prompt embeddings, a CNN-BiLSTM backbone with attention pooling, and synonym-based adversarial data augmentation to improve generalization. Experimental results on two benchmark datasets-HateXplain and HSOL-demonstrate that our approach outperforms competitive baselines in precision, recall, and F1-score. Additionally, the framework shows high efficiency and scalability, suggesting its suitability for deployment in resource-constrained environments. These findings highlight the potential of combining prompt-based learning with adversarial augmentation for robust and adaptable hate speech detection in few-shot scenarios.

Few-shot Hate Speech Detection Based on the MindSpore Framework

TL;DR

The paper tackles few-shot hate speech detection on social media by proposing MS-FSLHate, a MindSpore-based architecture that combines learnable prompt embeddings with a CNN-BiLSTM backbone and attention pooling, augmented by synonym-based adversarial data augmentation. On HateXplain and HSOL benchmarks, the method outperforms strong baselines in precision, recall, and F1, with ablation studies confirming the critical roles of prompts and augmentation. The work demonstrates that prompt-based learning and lexical augmentation can achieve robust generalization in data-scarce settings and that MindSpore enables scalable deployment on resource-constrained hardware. This approach offers a practical, efficient path toward robust hate speech moderation in real-world, low-resource environments.

Abstract

The proliferation of hate speech on social media poses a significant threat to online communities, requiring effective detection systems. While deep learning models have shown promise, their performance often deteriorates in few-shot or low-resource settings due to reliance on large annotated corpora. To address this, we propose MS-FSLHate, a prompt-enhanced neural framework for few-shot hate speech detection implemented on the MindSpore deep learning platform. The model integrates learnable prompt embeddings, a CNN-BiLSTM backbone with attention pooling, and synonym-based adversarial data augmentation to improve generalization. Experimental results on two benchmark datasets-HateXplain and HSOL-demonstrate that our approach outperforms competitive baselines in precision, recall, and F1-score. Additionally, the framework shows high efficiency and scalability, suggesting its suitability for deployment in resource-constrained environments. These findings highlight the potential of combining prompt-based learning with adversarial augmentation for robust and adaptable hate speech detection in few-shot scenarios.

Paper Structure

This paper contains 14 sections, 11 equations, 3 figures, 4 tables.

Figures (3)

  • Figure 1: Overview of the proposed MS-FSLHate framework for few-shot hate speech detection.
  • Figure 2: Performance comparison across models on HateXplain (left) and HSOL (right) datasets. Metrics include precision, recall, and F1-score. MS-FSLHate demonstrates consistent superiority across all metrics.
  • Figure 3: Ablation study on the HateXplain dataset. The line chart illustrates variations in precision, recall, and F1-score across different model variants of MS-FSLHate.