Few-shot Hate Speech Detection Based on the MindSpore Framework

Zhenkai Qin, Dongze Wu, Yuxin Liu, Guifang Yang
4/22/2025
cs.CLcs.CY

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{qin2025fewshot,
  title  = {Few-shot Hate Speech Detection Based on the MindSpore Framework},
  author = {Zhenkai Qin and Dongze Wu and Yuxin Liu and Guifang Yang},
  year   = {2025},
  eprint = {2504.15987},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.15987v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.15987.svg)](https://codeofpaper.com/paper/2504.15987)

Discussion