您的位置:山东大学 -> 科技期刊社 -> 《山东大学学报(理学版)》

《山东大学学报(理学版)》 ›› 2026, Vol. 61 ›› Issue (3): 44-53.doi: 10.6040/j.issn.1671-9352.1.2024.044

• • 上一篇    

基于预训练模型的仇恨言论检测

林原1,张亚1,于蒙1,许侃2*,林鸿飞2   

  1. 1.大连理工大学公共管理学院, 辽宁 大连 116024;2.大连理工大学电子信息与电气工程学部, 辽宁 大连 116024
  • 发布日期:2026-03-18
  • 通讯作者: 许侃(1981— ),男,高级工程师,博士,研究方向为信息检索. E-mail:xukan@dlut.edu.cn
  • 作者简介:林原(1983— ),男,副教授,博士,研究方向为信息检索、排序学习、数字治理. E-mail:zhlin@dlut.edu.cn*通信作者:许侃(1981— ),男,高级工程师,博士,研究方向为信息检索. E-mail:xukan@dlut.edu.cn
  • 基金资助:
    国家自然科学基金资助项目(61976036);国家社会科学基金资助项目(20BTQ074)

Hate speech detection based on pre-trained models

  1. 1. School of Public Administration and Policy, Dalian University of Technology, Dalian 116024, Liaoning, China;
    2. Faculty of Electronic Information and Electrical Engineering, Dalian University of Technology, Dalian 116024, Liaoning, China
  • Published:2026-03-18

摘要: 为准确检测和识别仇恨言论,通过微调大语言模型对数据集样本进行扩充与平衡,并基于预训练模型RoBERTa构建RoBERTa-Attention-GRU-TextCNN模型,将深度学习强大的特征捕获和提取能力应用到文本序列数据的分析、挖掘中。首先通过RoBERTa模型对文本数据进行特征提取;然后利用自注意机制获取单词间的依赖关系;最后将获取到的特征矩阵输入到GRU-TextCNN层中以捕捉更深层次的语义信息和局部特征。使用TweetEval提供的2个公开的数据集来评估模型效果,实验结果表明,该模型相较于传统的仇恨言论检测模型具有更好的检测效果。

关键词: 大语言模型, 仇恨检测, RoBERTa, 预训练模型, RoBERTa-Attention-GRU-TextCNN

Abstract: To accurately detect and identify hate speech, the dataset samples are expanded and balanced by fine-tuning the large language model. The RoBERTa-Attention-GRU-TextCNN model is constructed based on the pre-training model RoBERTa, leveraging the powerful feature capture and extraction capabilities of deep learning for the analysis and mining of text sequence data. Firstly, the RoBERTa model is used to extract features from the text data; then, the self-attention mechanism is used to obtain the dependencies between words; finally, the acquired feature matrix is input into the GRU-TextCNN layer to capture deeper semantic information and local features. Two publicly available datasets provided by TweetEval are used to evaluate the model effect, and the experimental results show that the model has a better detection effect compared to the traditional hate speech detection model.

Key words: large language model, hate detection, RoBERTa, pre-trained model, RoBERTa-Attention-GRU-TextCNN

中图分类号: 

  • TP391
[1] 杨纪元,马沐阳,任鹏杰,陈竹敏,任昭春,辛鑫,蔡飞,马军. 基于自监督的预训练在推荐系统中的研究[J]. 《山东大学学报(理学版)》, 2024, 59(7): 1-26.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!