## 4 Experimental Research
### Experimental Results and Analysis  
#### 4.5.1 Contrast Experiment  
To verify the RB_BG_MHA model, a series of experiments were conducted and compared with other models. Simultaneously, the experimental results were analyzed in detail to showcase the efficacy of our model in identifying offensive language in the Chinese context.  
According to the comparative experimental results in Table 3, the accuracy of the RB_BG_MHA model on the test set was 82.931%, the precision was 82.257%, the recall was 83.436%, and the F1-score was 82.842%. Compared with other models, our proposed model shows better results in accuracy, precision, recall, and F1-score. The RoBERTa + TKE model also showed good performance, while the XLM-Rlarge model achieved high results in accuracy but a relatively low F1-score. However, the Baidu Text Censor model performs poorly on the whole, with low accuracy, precision, and recall, the latter displaying a rate of only 27.005%. Compared with Baidu Text Censor, the method based on deep learning has achieved better performance. A plausible rationale is that the online API's filtering mechanism predominantly depends on keyword dictionaries. As a result, it cannot effectively detect sentences that contain indirect offensive language. In summary, compared with other models, our proposed model can provide more abundant feature representation and can understand and express the semantics of sentences more accurately, thus achieving better results.  
Although the current performance is only slightly optimized compared to the RoBERTa + TKE method, we will consider carrying out the following the future to improve the performance of our method:  
Introducing lexical features: For offensive language detection tasks, it is relatively easy to detect direct offensive samples, but it is challenging to detect indirect offensive instances (such as stereotypes and sarcasm). Therefore, our future work will construct a dictionary containing implied insult and offensive words to introduce indirect offensive word features and obtain a weighted enhanced representation of each word so that the obtained sentence embedding will include implied offensive word features to improve the performance of offensive language detection;  
Data enhancement and diversity: We plan to collect more data on the Chinese offensive language and ensure the variety of the data set, which will help the model to better generalize to situations of various offensive languages.  
From Table 4 we can notice that the RB_BG_MHA model has a higher number of parameters and a longer running time with respect to the RoBERTa and RoBERTa + TKE models. This reflects the higher complexity of our model, which may lead to a waste of computational resources in some cases. However, we recognize this drawback and will further  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Accuracy (\%)** & **Precision (\%)** & **Recall (\%)** & **F1-Score (\%)** \\ \hline Baidu Text Censor 1  & 64.738 & 62.665 & 27.005 & 37.745 \\ COLDET [16] & 81 & 80 & 82 & 81 \\ RoBERTa [13] & 81.058 & 80.563 & 81.886 & 81.219 \\ XLM-Rlarge [27] & 81.87 & / & / & 79.09 \\ RoBERTa + TKE [29] & 81.908 & 82.233 & 81.908 & 81.740 \\ RB_BG_MHA (ours) & 82.931 & 82.257 & 83.436 & 82.842 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of offensive language detection performance across different models on our test set.  
optimize and reduce our model complexity to reduce the running time without harming performance to meet the dual requirements of performance and computational efficiency.