HMS-BERT: Hybrid Multi-Task Self-Training for Multilingual and Multi-Label Cyberbullying Detection

Zixin Feng, Xinying Cui, Yifan Sun, Zheng Wei, Jiachen Yuan, Jiazhen Hu, Ning Xin, Md. Maruf Hasan · DOI

Cyberbullying is rarely a single, isolated behavior. A single toxic comment might simultaneously contain a threat, a racial slur, and an identity attack. Furthermore, as our digital world becomes increasingly global, these behaviors transcend language barriers. Most current detection systems, however, are "siloed"—they focus on one language at a time or treat abuse as a simple binary (bullying vs. not bullying).

In a new paper, researchers from Xi’an Jiaotong-Liverpool University introduce HMS-BERT, a framework designed to handle the messy, overlapping, and multilingual reality of modern online harassment.

TL;DR

HMS-BERT is a hybrid multi-task framework that detects cyberbullying across English and Chinese by combining deep learning (mBERT) with handcrafted linguistic features. It uses an iterative self-training strategy to overcome the lack of labeled data in low-resource languages, achieving a state-of-the-art macro F1-score of 0.9847 on multi-label classification.

What Problem Does This Paper Address?

The authors identify three major gaps in current cyberbullying detection:

  1. The Monolingual Trap: Most models are optimized for English, leaving languages like Chinese underserved due to a lack of labeled datasets.
  2. Single-Label Simplification: Real-world abuse is "multi-faceted." A model that only picks one label (e.g., "offensive") misses the nuance of overlapping categories like "insult" and "threat."
  3. Data Scarcity: High-quality, manually annotated data is expensive and slow to produce, especially for complex multi-label tasks.

Methods

HMS-BERT (Hybrid Multi-Task Self-Training BERT) uses a "divide and conquer" approach:

  • Hybrid Feature Fusion: The model uses a pre-trained multilingual BERT (mBERT) backbone to capture deep semantic meaning. However, it doesn't stop there. It also integrates "handcrafted" features—like punctuation frequency, emoji usage, and sensitive word indicators—to help the model catch subtle or culturally specific aggression.
  • Multi-Task Learning: The architecture features two parallel "heads." One performs a three-class main task (Hate, Offensive, or Normal), while the other handles fine-grained multi-label classification (detecting specific subtypes like religion, race, or gender-based abuse).
  • Iterative Self-Training with Confidence Decay: To solve the Chinese data shortage, the model uses a semi-supervised loop. It trains on labeled English data, predicts labels for unlabeled Chinese data, and adds the most "confident" predictions (initially >0.90 probability) back into the training set. Over time, it gradually lowers this threshold (down to 0.85) to learn from more difficult, "long-tail" examples.

Datasets

The study utilized four diverse datasets to test the model's mettle:

  • HateXplain: A gold-standard English dataset from Twitter/Reddit with 20k+ posts, used for primary training.
  • Cyberbullying Classification (Kaggle): 47k+ English comments used for pseudo-labeling and testing generalization.
  • SCCD (User & Comment): Two Chinese datasets (20k+ texts) from a mental health forum. While mostly unlabeled, the authors manually annotated a 2,000-sample subset to serve as a ground truth for multilingual evaluation.

Key Insights and Ideas

  • Subtypes Matter for the Main Task: One of the most important findings was that jointly training the model to recognize specific subtypes (like racial vs. religious abuse) actually improved its ability to distinguish between general "Hate" and "Offensive" content.
  • The "Surface-Level" Fallacy: The authors found that simple features like text length are insufficient for detecting abuse. For example, racial abuse often uses very specific, community-jargon slurs that require semantic understanding rather than just counting tokens.
  • Self-Training as a Bridge: The iterative self-training wasn't just a "nice-to-have"—it was the engine for cross-lingual transfer. It allowed the model to take the "knowledge" of what abuse looks like in English and successfully map it onto the informal, culturally embedded language of Chinese forums.

Key Results

HMS-BERT demonstrated a significant performance edge over established baselines like XLM-RoBERTa and LaBSE:

  • Multi-Label Mastery: It achieved a macro F1-score of 0.9847 on the multi-label task, vastly outperforming LaBSE (0.3563), which struggled with the complexity of overlapping labels.
  • Main Task Accuracy: It reached 0.6775 accuracy on the three-class task. While LaBSE scored slightly higher on this specific metric (0.7193), it failed to generalize to the more difficult multi-label requirements.
  • Error Reduction: In the regression task (predicting the probability of abuse), HMS-BERT achieved the lowest Mean Absolute Error (MAE) of 0.0234, indicating highly calibrated and stable predictions.

Limitations and Future Work

While HMS-BERT is a step forward, the authors acknowledge several areas for growth:

  • Modality: The current model is text-only. Future versions could incorporate images or audio to detect "multimodal" abuse (like offensive memes).
  • Language Scope: While it bridges English and Chinese, the framework needs to be tested on even lower-resource languages or dialects.
  • Explainability: The authors suggest that integrating "explainability" techniques would help moderators understand why a post was flagged, which is crucial for real-world deployment.

Paper Citation: Feng, Z., et al. (2026). HMS-BERT: Hybrid Multi-Task Self-Training for Multilingual and Multi-Label Cyberbullying Detection. arXiv:2603.12920v1 [cs.CL].

Summary updated

Abstract

Cyberbullying on social media is inherently multilingual and multi-faceted, where abusive behaviors often overlap across multiple categories. Existing methods are commonly limited by monolingual assumptions or single-task formulations, which restrict their effectiveness in realistic multilingual and multi-label scenarios. In this paper, we propose HMS-BERT, a hybrid multi-task self-training framework for multilingual and multi-label cyberbullying detection. Built upon a pretrained multilingual BERT backbone, HMS-BERT integrates contextual representations with handcrafted linguistic features and jointly optimizes a fine-grained multi-label abuse classification task and a three-class main classification task. To address labeled data scarcity in low-resource languages, an iterative self-training strategy with confidence-based pseudo-labeling is introduced to facilitate cross-lingual knowledge transfer. Experiments on four public datasets demonstrate that HMS-BERT achieves strong performance, attaining a macro F1-score of up to 0.9847 on the multi-label task and an accuracy of 0.6775 on the main classification task. Ablation studies further verify the effectiveness of the proposed components.
BibTeX
@misc{feng2026hms,
  author = {Zixin Feng and Xinying Cui and Yifan Sun and Zheng Wei and Jiachen Yuan and Jiazhen Hu and Ning Xin and MD. MARUF HASAN},
  title = {{HMS-BERT: Hybrid Multi-Task Self-Training for Multilingual and Multi-Label Cyberbullying Detection}},
  year = {2026},
  eprint = {2603.12920},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.12920},
}
Figure