# Data Mining of Students' Consumption Behaviour Pattern Based on Self-Attention Graph Neural Network
## 4 Result and Analysis
### Result Analysis  
From the perspective of cross entropy loss decreasing process in Figures 2 and 3, compared with other models, the improved self-attention model had higher cross-entropy loss in the initial stage of training, while with certain fluctuations, it could decrease and converge rapidly in both classification tasks. The initial cross-entropy loss and training processes of the other three graph neural network model variants were similar in two-category classification, which may be related to the fact that these models treated the nodes indiscriminately during each iteration. However, the loss of SAGEConv GNN maintained the downward trend in three-category classification. Judging from the model's prediction accuracy and other performance, we could speculate that although the loss declined, the model might have been over-fitting, which led to poor performance on the test set. In addition, the training process of both our improved model and SAGEConv GNN demonstrated larger fluctuations, which revealed that they might be more sensitive to label distribution. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Model** & **Accuracy** & **Precision** & **Recall** & **F1-Score** \\ \hline Improved self-attention graph neural network & 79.43\% & 97.20\% & 79.43\% & 87.28\% \\ \hline Topology adaptive graph convolutional network (TAGConv GNN) [57] & 64.71\% & 62.44\% & 64.71\% & 62.99\% \\ \hline GraphSAGE convolutional network (SAGEConv GNN) [58] & 66.06\% & 65.91\% & 65.86\% & 65.43\% \\ \hline Simplified graph convolutional network (SGConv GNN) [59] & 67.00\% & 63.51\% & 67.00\% & 64.56\% \\ \hline Logistic regression [60] & 48.29\% & 72.80\% & 48.29\% & 53.49\% \\ \hline KNN [61] & 79.14\% & 68.93\% & 79.14\% & 68.00\% \\ \hline Decision tree [62] & 68.05\% & 67.16\% & 68.09\% & 68.17\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The three-category classification results on the test set. \begin{table}
\begin{tabular}{l c c c c} \hline
**Behavioral Pattern Sequence** & **Average Times of Outstanding Students** & **Average Times of Lagging Students** & **Ratio** & **Node ID** \\ \hline Study-actual & 5.3516 & 2.2573 & 2.3708 & 0 \\ \hline Paid-days & 29.5463 & 27.5556 & 1.0722 & 2 \\ \hline Getting-up-num & 10.7108 & 4.9357 & 2.1701 & 3 \\ \hline Dinner-domitory-num & 8.3119 & 6.0819 & 1.3667 & 13 \\ \hline Breakfast-study-num & 1.2968 & 0.4269 & 3.0377 & 14 \\ \hline Lunch-study-num & 1.0605 & 0.3275 & 3.2383 & 15 \\ \hline Dinner-study-num & 0.7278 & 0.2982 & 2.4402 & 16 \\ \hline Classroom-lunch-or-dinner-num & 1.8204 & 0.8655 & 2.1033 & 18 \\ \hline Breakfast-study-lunch-num & 0.7675 & 0.2690 & 2.8530 & 19 \\ \hline Dinner-study-dorm-bathroom-num & 0.2287 & 0.0526 & 4.4359 & 21 \\ \hline Total-meals & 56.3516 & 42.7252 & 1.3189 & 26 \\ \hline \end{tabular}
\end{table} 
Table 6: Ratio of occurrences of different discriminative behavioural patterns in the two category classification tasks. From the perspective of prediction accuracy in Tables 4 and 5, the improved self-attention GNN performed better than any other model in both the classification tasks and achieved accuracy of 84.86% in two-category classification and 79.43% in three-category classification, respectively. Moreover, precision could reach 94.84% and 97.20%, and F1-score was able to achieve 91.81% and 87.28%, respectively. Indicators, such as precision, recall score and F1-score, revealed that improving the self-attention model could improve the prediction performance and converge to stability rapidly. Judging from several indicators, three variants performed similarly but worse than our improved model, in which the accuracy reached 68.57%, 65.76%, 70.43% and 64.71%, 66.06%, 67% in the two tasks, respectively. They focused on improving graph convolution methods. Compared with machine learning algorithms, the overall performance of the graph neural network variants was found to be superior, demonstrating the graph's strong and in-depth ability to mine mutual influences between local nodes.