Detection Method for Offensive Speech Based on Prompting and Parameter Fine-Tuning
With the rapid development of social media, the convenience of online communication has led to the frequent occurrence of offensive speech, posing a threat to the online social environment. Ensuring the safety, health, and friendliness of online platforms has made the automatic detection of offensive speech an urgent necessity. Despite the superior performance of large language models in natural language processing tasks due to their extensive parameter sets, their effectiveness in detecting offensive speech is limited by the complexity and diversity of language and the models' tendency to avoid sensitive content. The inherent biases and imbalances in existing datasets further constrain model performance. To address these issues, this paper proposes an offensive speech detection method that combines prompt engineering and parameter fine-tuning (ChatGLM-PPFT), aiming to improve the shortcomings of the large language model ChatGLM in such tasks. By designing strategies such as role-playing, few-shot prompting, and historical response referencing, ChatGLM-PPFT not only mitigates the problem of non-standard responses to offensive content but also enhances detection performance for Chinese offensive speech through lightweight fine-tuning using the LoRA method. On the TOXICN and SWSR datasets, ChatGLM-PPFT achieves state-of-the-art detection results.
Authors
- Yingchun Fu (ORCID: https://orcid.org/0000-0002-4052-1017)
- Xiaochao Fan (ORCID: https://orcid.org/0000-0003-4615-5131)
- Debbie M. Cheng (ORCID: https://orcid.org/0000-0002-2206-3059)
- Tian‐You Zhou (ORCID: https://orcid.org/0000-0001-7363-8644)
- Jiapeng Liu (ORCID: https://orcid.org/0009-0002-0249-908X)
Institutions
- Xinjiang Normal University (CN)
- Xinjiang Institute of Engineering (CN)
Publication Details
- Published
- 2025-04-25
- DOI
- https://doi.org/10.1109/icaid65275.2025.11034535
- Primary Topic
- Hate Speech and Cyberbullying Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Ministry of Education
- Xinjiang Normal University