# Text Classification Model Based on Graph Attention Networks and Adversarial Training
## 3 Results and Discussion  
### Sentiment Analysis Model Performance Evaluation  
Firstly, the text sentiment analysis model proposed in this paper and the baseline models are evaluated from a quantitative analysis standpoint, using the evaluation metrics described in Section 2.2.5. All the models are trained for 40 epochs, and the best performances are recorded for a benchmark comparison. The specific experimental results of each model are shown in Table 4.  
Clearly, the TGAF model performs better than all comparison models on several datasets. Specifically, on the larger THUCNews and Toutiao datasets, compared to the baseline model TextCNN, TGAF increased by 2.57 and 2.82 percentage points, respectively. TGAF also shows excellent performance on small-volume multi-classification datasets, such as the SougouCS dataset, which has improved by 3.75 percentage points compared to the baseline model TextCNN and 1.67 percentage points compared to the binary Weibo dataset, demonstrating the strong learning ability of the model. When comparing Models 7 and 13, although CNN-highway + RNN utilizes both CNN and RNN for character feature extraction, it performs poorly in text experiments. This is because Chinese characters are polysemous, and the model fails to capture the word-level meanings within the characters, leading to inaccurate interpretations of the input sentences. When comparing Models 6 and 11, which combine word-level features, we observed improved accuracy. This is because mixing hierarchical features enhances semantic information in Chinese, leading to better text comprehension. However, our model, through the use of graph attention networks (GATs), facilitates interaction between character and word information, resulting in a better understanding of the input text representation. By integrating the contextual semantics of the text and combining this information with the original input, our model deepens its analysis of the intrinsic meaning of the text. When comparing Models 8 and 12, while CW-GAT and TextGCN utilize graph networks for feature extraction from input text and excel in capturing local features, they fail to fully leverage contextual information and integrate additional auxiliary features due to their structural characteristics. This limitation affects their performance in complex text classification tasks. Comparing Model 1 and Model 2, TextCNN did not consider contextual features and did not introduce any auxiliary features, resulting in insufficient ability to capture features and poor classification performance. After adding an attention mechanism, the TextCNN+Att model showed a certain degree of improvement in performance. This is because the attention mechanism can enable important information in the text to receive higher classification decisions. Compared with Model 2 and Model 13, the introduction of a graph attention network in the model further improves the classification performance. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **THUCNews** & **Toutiao** & **Weibo** & **SougouCS** \\ \hline TextCNN & 0.9044 & 0.8530 & 0.9707 & 0.7976 \\ TextCNN+Att & 0.9129 & 0.8644 & 0.9815 & 0.8123 \\ TextRNN & 0.9102 & 0.8572 & 0.9736 & 0.8044 \\ Transformer & 0.9092 & 0.8661 & 0.9310 & 0.7553 \\ BiLSTM & 0.8515 & 0.7661 & 0.9767 & 0.7418 \\ HANs & 0.9159 & 0.8554 & 0.9647 & 0.8152 \\ CNN-highway + RNN & 0.8810 & 0.8053 & 0.9694 & 0.7117 \\ TextGCN & 0.9071 & 0.8713 & 0.8400 & 0.8105 \\ Text-level-GNN & 0.7995 & 0.8371 & 0.8354 & 0.7779 \\ RAFG & 0.8636 & 0.7805 & 0.9627 & 0.6795 \\ MACNN & 0.9214 & 0.8620 & 0.9650 & 0.8187 \\ CW-GAT & 0.9220 & 0.8738 & 0.9830 & 0.8262 \\ TGAF & 0.9301 & 0.8812 & 0.9874 & 0.8351 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Accuracy results of experimental algorithms. Three auxiliary features are introduced in the TGA model, making the model have better feature learning ability. Additionally, our model introduces adversarial training to enhance performance and robustness.