Research Article

Large Language Model Used to Improve the Ability of Detecting Cyberbullying

Haoyuan Wang*
ChengDu JinJiang JiaXiang Foreign Languages High School, ChengDu, SiChuan, China, 610000

* Corresponding author: [email protected]

Abstract

For cyberbullying detection in online platforms, balancing computational efficiency and contextual accuracy remains a critical challenge. Traditional machine learning (ML) models often lack deep semantic understanding, while standalone large language models (LLMs) suffer from prohibitive latency in real-time applications. To tackle this, we propose a two-stage hybrid framework: Stage 1 employs SVM or Random Forest for rapid filtering, and Stage 2 uses a lightweight DistilBERT for contextual analysis. Evaluated on a 50,000-sample English dataset from the Cyberbullying Research Center, comprising 40,000 training, 5,000 validation, and 5,000 test samples with a class distribution of 5% bullying (2,500 samples) and 95% non-bullying—the framework achieves an F1-score of 0.89, outperforming traditional ML (0.80) and standalone LLMs (0.87), while delivering 83% faster inference than full LLM processing. Preprocessing involved lowercasing, SpaCy tokenization, and NLTK stopword removal. Key strengths include real-time scalability and enhanced detection of implicit bullying. However, limitations persist: dependency on Stage 1 filtering accuracy and challenges in interpreting sarcasm (contributing to 22% of errors) and novel slang, which necessitate further research.

Keywords: Cyberbullying Detection; Two-Stage Framework; DistilBERT; Real-Time NLP; English Social Media
Published: July 24, 2025
DOI: 10.54254/2755-2721/2025.LD25417
Volume: ACE Vol.165
pp. 126-130
Download PDF

References

  1. Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-Based Model for Sentiment Analysis. ACL.
  2. Ogunleye, B. & Dharmaraj, B. (2024). The Use of a Large Language Model for Cyberbullying Detection. arXiv.
  3. Ying, Z H, et al. (2025). Reasoning-Augmented Conversation for Multi-Turn Jailbreak Attacks. arXiv.
  4. Wang, J X, et al. (2025). LANGUAGE MODEL ALIGNMENT IN MULTILINGUAL TROLLEY PROBLEMS. ICLR.
  5. Cirillo, S. et al. (2025). Exploring LLMs for Cyberbullying Detection via Prompt-Based ML. Information Processing & Management.
  6. Cyberbullying Research Center. (2023). English Social Media Posts Dataset.
  7. Wei, C K, et al. (2024). LMSanitator: Defending Prompt-Tuning Against Task-Agnostic Backdoors. NDSS.
  8. Chen, Y Q, et al. (2025). ToxicDetector: Efficient Detection of Toxic Prompts in LLMs. ASE.
  9. ShanghaiTech University (2025). DistillSeq: Safety Alignment Testing via Knowledge Distillation. ISSTA.