基于预训练模型的仇恨言论检测
Hate speech detection based on pre-trained models
为准确检测和识别仇恨言论,通过微调大语言模型对数据集样本进行扩充与平衡,并基于预训练模型 RoBERTa 构建 RoBERTa-Attention-GRU-TextCNN 模型,将深度学习强大的特征捕获和提取能力应用到文本序列数据的分析、挖掘中。 首先通过 RoBERTa 模型对文本数据进行特征提取;然后利用自注意机制获取单词间的依赖关系;最后将获取到的特征矩阵输入到 GRU-TextCNN 层中以捕捉更深层次的语义信息和局部特征。 使用 TweetEval 提供的 2 个公开的数据集来评估模型效果,实验结果表明,该模型相较于传统的仇恨言论检测模型具有更好的检测效果。
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.
| [1] |
联合国大会. 促进宗教间和文化间对话与容忍,打击仇恨言论[EB/OL].(2021—07—22)[2024—10—09]. https://documents.un.org/doc/undoc/gen/n21/200/60/pdf/n2120060.pdf. |
| [2] |
|
| [3] |
|
| [4] |
MEHDAD Y, TETREAULT J. Do characters abuse more than words?[C]// Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue. Los Angeles: ACL, 2016: 299-303. |
| [5] |
|
| [6] |
|
| [7] |
|
| [8] |
|
| [9] |
|
| [10] |
|
| [11] |
|
| [12] |
|
| [13] |
|
| [14] |
|
| [15] |
|
| [16] |
|
| [17] |
|
| [18] |
|
| [19] |
|
| [20] |
王琰慧, 王小龙, 张顺香, |
| [21] |
|
| [22] |
刘旭东, 杨亮, 张冬瑜, |
| [23] |
|
| [24] |
|
| [25] |
|
| [26] |
HOULSBY N, GIURGIU A, JASTREBSKI S, |
| [27] |
|
| [28] |
|
| [29] |
|
国家自然科学基金资助项目(61976036)
国家社会科学基金资助项目(20BTQ074)
/
| 〈 |
|
〉 |