## 4 Experiments and Performance Evaluation
### Experimental Setup and Fine Tuning Analysis  
We demonstrated the applicability of our model ARABERT4 TWC using five datasets. For training our model, the dataset is divided in the ratio of 80:20 for training and testing, respectively. We have used the Pytorch-Lightning framework for fine-tuning the pre-trained BERT model. A word-piece tokenizer is used for tokenizing the entire text corpus using sub word tokenization algorithm. The training is carried out on a high-end system consisting of 27 GB of RAM and 16 GB of Tesla P100 GPU. The data used for training are fed into the model in mini-batches of Size 8. To enable parallel processing of data, we have split the data into parts by specifying the number of workers in the Pytorch Lightning Dataset module. Training in long-text datasets may include more than 512 token-size tokens, which must be reduced to comply with BERT's input length constraint. This is in contrast to the short-text dataset ArsenTD-LEV final. On all additional long-text datasets, we use the same sequence manipulation. The model also achieved higher accuracy and \(F1\)-score values when the learning rate was reduced to \(1\times 10^{-5}\) from the default level of \(2\times 10^{-5}\). The subsequent experiments are conducted on long-text datasets with a learning rate of \(1\times 10^{-5}\). As presented in Table 3, we presented the accuracy and \(F1\)-score outcomes of ARABERT4 TWC with various learning rates. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Datasets** & **No. of Classes** & **Average Length** & **MAX Length** & **Average Token Length** & **MAX Token Length** \\ \hline SANAD & 7 & 2.1 k & 33 k & 2790 & 40,497 \\ \hline HARD & 2 & 140 & 3387 & 171 & 4213 \\ \hline AJGT & 2 & 47 & 864 & 57 & 1085 \\ \hline ASTD & 4 & 86 & 5895 & 109 & 7421 \\ \hline ArSenTD-LEV & 5 & 157 & 218 & 144 & 207 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Statistical information about the dataset used. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Dataset** & **Learning Rate** & **Accuracy** & **\(F1\)-Score** \\ \hline \multirow{4}{*}{SANAD} & \(4\times 10^{-5}\) & 0.9789 & 0.9790 \\ \cline{2-4}  & \(3\times 10^{-5}\) & 0.9791 & 0.9799 \\ \cline{2-4}  & \(2\times 10^{-5}\) & 0.9810 & 0.9810 \\ \cline{2-4}  & \(1\times 10^{-5}\) & 0.9824 & 0.9824 \\ \hline \multirow{4}{*}{HARD} & \(4\times 10^{-5}\) & 0.9678 & 0.9678 \\ \cline{2-4}  & \(3\times 10^{-5}\) & 0.9697 & 0.9697 \\ \cline{2-4}  & \(2\times 10^{-5}\) & 0.9746 & 0.9746 \\ \cline{2-4}  & \(1\times 10^{-5}\) & 0.9749 & 0.9749 \\ \hline \multirow{4}{*}{AJGT} & \(4\times 10^{-5}\) & 0.9210 & 0.9210 \\ \cline{2-4}  & \(3\times 10^{-5}\) & 0.9270 & 0.9270 \\ \cline{2-4}  & \(2\times 10^{-5}\) & 0.9350 & 0.9350 \\ \cline{2-4}  & \(1\times 10^{-5}\) & 0.9405 & 0.9405 \\ \hline \multirow{4}{*}{ASTD} & \(4\times 10^{-5}\) & 0.8525 & 0.8579 \\ \cline{2-4}  & \(3\times 10^{-5}\) & 0.8585 & 0.8599 \\ \cline{2-4}  & \(2\times 10^{-5}\) & 0.8600 & 0.8602 \\ \cline{2-4}  & \(1\times 10^{-5}\) & 0.8610 & 0.8610 \\ \hline \multirow{4}{*}{ArSenTD-LEV} & \(4\times 10^{-5}\) & 0.5225 & 0.5225 \\ \cline{2-4}  & \(3\times 10^{-5}\) & 0.5270 & 0.5290 \\ \cline{1-1} \cline{2-4}  & \(2\times 10^{-5}\) & 0.5341 & 0.5350 \\ \cline{1-1} \cline{2-4}  & \(1\times 10^{-5}\) & 0.5370 & 0.5370 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Experimental results for the applied datasets. The evaluation matrices in these experiments are the accuracy and the \(F1\)-score, which are two metrics in machine learning to evaluate the model performance. As explained in Equation (4), the accuracy is a measure of the proportion of correct predictions of polarity terms \(t\) made by the model over the total number of predictions in the overall experiment. \[Accuracy=\frac{TP_{t}+TN_{t}}{TP_{t}+TN_{t}+FP_{t}+FN_{t}} \tag{4}\]  
where the \(TP_{t}\) stands for the number of accurate predictions of polarity terms, \(TN_{t}\) for accurate negative predictions, \(FP_{t}\) for accurate positive predictions, and \(FN_{t}\) for accurate negative predictions.