# Text Classification Model Based on Graph Attention Networks and Adversarial Training
## 2 Materials and Methods
### Experiments
#### 2.2.4 Comparison Model  
This paper introduces several baseline sentiment analysis models, as follows:  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline System & Windows10 \\ Language & python \\ GPU & RTX 3070 \\ CUDA & 11.1 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Experimental environment.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Batch\_size & 64 \\ Learning\_rate & 0.001 \\ Learning decay rate & 0.01 \\ Max\_len & 128 \\ Drop\_rate & 0.4 \\ Epoch & 50 \\ Optimizer & Adam \\ \hline \hline \end{tabular}
\end{table}
Table 3: Parameter setting of model.  
In this paper, several text classification models are employed and assessed for their effectiveness:  
1. TextCNN [7]: This utilizes Word2 Vec to generate word vectors, followed by feature extraction through convolutional kernels of varying sizes. After passing through a max pooling layer, classification is performed using a Softmax function.
2. TextCNN+Att: After feature extraction using convolutional kernels of different sizes, the text passes through a weight adjustment layer that uses an attention mechanism to adjust weight values. This layer captures the dependency relationships between words based on the degree of influence of each word in the sequence on the text classification task and can learn the internal structural information of the sequence text.
3. TextRNN [8]: The use of RNN can effectively process sequence information and better extract contextual information features.
4. Transformer [28]: This comprises an encoder and decoder, using Word2 Vec for converting input text into feature vectors. The self-attention mechanism effectively addresses the problem of long-distance dependencies in classification tasks.
5. BiLSTM [8]: This generates word vectors using Word2 Vec and utilizes bidirectional LSTM layers to extract semantic information and dependencies in text, followed by classification through a fully connected layer.
6. HANs [29]: HANs is a Chinese short text classification model that uses CNN and BiLSTM to encode the character level and word-level features, respectively, and concatenates two-level features for classification.
7. CNN-highway + RNN [1]: This is a Chinese text classification model based on character-level features, where the sentence is encoded by highway-CNN and LSTM, respectively, and two outputs are concatenated for classification.
8. TextGCN [14]: Text-GCN constructs a heterogeneous graph based on the document and its words, and enables graph convolution networks to perform semi-supervised text classification.
9. Text-level-GNN [30]: Text-level-GNN is a text-level graph neural network model-based message passing mechanism, where a graph is constructed for each sentence and the words in the sentence are viewed as nodes.
10. RAFG [31]: RAFG is a Chinese text classification model that uses BiLSTMs to encode the Chinese radical information at character-level and word-level, respectively.
11. MACNN [32]: MACNN is a Chinese short text classification model to integrate character-level and word-level features by sentence-level attention mechanisms.
12. CW-GAT [33]: CW-GAT is a model that utilizes graph attention networks to effectively capture and integrate the interaction between character-level and word-level representations for improved Chinese text classification.
13. TextCNN+GAT+Att+FGM (TGAF): In this model, noise perturbation is added to the word embedding component for adversarial training. Adversarial samples are constructed during training to enable the model to correctly identify more adversarial examples, thereby enhancing the model's generalizability and robustness against adversarial attacks.