# Targeted Sentiment Classification Based on Attentional Encoding and Graph Convolutional Networks
## 4 Experiments
### Hyper-Parameters  
In the experiments, for AEGCN-GloVe, the word embeddings were initialized from GloVe with a dimension of 300, and the learning rate was 0.001. The parameter of the regulation was set as 0.00001. The coefficient of the batch size was 32. In order to prevent over-fitting, the dropout rate was 0.5. For AEGCN-BERT, the embedding dimension was set to 768. The learning rate was set to \(2\times 10^{-5}\). Regulation was set as 0.001. Dropout was 0.1 and batch size was 16. For both AEGCN design models, the number of multi-head attention heads was 3, the number of GCN layers was set as 2, and the model weights were initialized by uniform distribution. The hidden layer dimension was 300. In addition, the AEGCN models utilized the Adam optimizer.  
Hyper-Parameters Analysis  
1. The Number of Heads in MHA This paper explores the influence of the number of heads \(k\) on the experimental results. The results over dataset lap14 are shown in Figure 6, and similar results were achieved on the other four datasets.  
From Figure 6, it can be observed that the value of accuracy and F1-score fluctuated with increasing \(k\). But when \(k=3\), the highest accuracy and F1 values appear. Then the values of accuracy and F1 decrease with the rising \(k\). We speculate that due to the increase of \(k\), the integration of semantic information from too many context words produces unnecessary interference, confusing the representation of the current words. Therefore, the performance of the model was better when \(k=3\).
2. Impact of GCN Layer Number The number of GCN layers is also an important parameter that affects the performance of our model. We tested this on the lap14 dataset with different number of GCN layers \(R\). The results are shown in Figure 7.  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Datasets**} & \multicolumn{2}{c}{**TWITTER**} & \multicolumn{2}{c}{**LAP14**} & \multicolumn{2}{c}{**REST14**} & \multicolumn{2}{c}{**REST15**} & \multicolumn{2}{c}{**REST16**} \\ \cline{2-11}  & **Train** & **Test** & **Train** & **Test** & **Train** & **Test** & **Train** & **Test** & **Train** & **Test** \\ \hline Pos. & 1561 & 173 & 994 & 341 & 2164 & 728 & 912 & 326 & 1240 & 469 \\ Neu. & 3127 & 346 & 464 & 169 & 637 & 196 & 36 & 34 & 69 & 30 \\ Neg. & 1560 & 173 & 870 & 128 & 807 & 196 & 256 & 182 & 439 & 117 \\ Total & 6248 & 692 & 2328 & 638 & 3608 & 1120 & 1204 & 542 & 1748 & 616 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Details of the benchmark datasets.  
Figure 6: Impact of \(k\) over the lap14 dataset.  
From the above results, it can be seen that the model achieved the best performance when the number of GCN layers \(R=2\). However, when \(R\) was greater than 2, the performance of the model worsened with increasing GCN layers. The possible reason for this is that as the number of GCN layers \(R\) increases, the model parameters grow, causing the model to be more difficult to train, and leading to overfitting. In order to avoid too many training parameters and overfitting, this paper set the GCN layer number as 2.