Chinese offensive language analysis based on Bidirectional Encoder Representation Transformer (BERT)

Haomin Liu,Xiaozhou Wen,Kangkai Yan
DOI: https://doi.org/10.54254/2755-2721/45/20241268
2024-03-15
Abstract:Offensive language detection is important in maintaining civilized social media platforms and training language models. However, this task remains to be developed in Chinese due to the lack of datasets. For this reason, in this paper, we introduce the Bidirectional Encoder Representation Transformer (BERT) to construct a Chinese Offensive Language Detection (COLD) model. We find that the race category has similar representation features as the region category. We investigate both the lack of training set and data poisoning attacks. Specifically, first, specific labeled data is analyzed for its role in the dataset. In addition, the experiments investigate the effect of the type of attack on the results. Second, the BERT model is used to test the results. BERT is a context-based embedding model that generates word embeddings based on context. In addition, the encoder understands the context of each word through a multi-head attention mechanism. The experimental results show that the model has the ability to handle handicapped data. The training results for the defective data were not as good as for the original data, and the model was more unstable for the training set with racial labeling and the test set with regionality. This study evaluated the importance of theme as a detection label. Poisoning attacks in BERT by changing labels were found to improve the accuracy of the test. This study can provide valuable thoughts to the community.
What problem does this paper attempt to address?