# Student Behavior Prediction of Mental Health Based on Two-Stream Informer Network
## 4 Experimental Results and Analysis
### Analysis of Attention Map  
Note that the matrix represents the correlation of behavior and time steps, respectively. We selected a sample from the STU data set for visualization of both attention maps. Figure 4a analyzes the behavior-related attention graph and labels three blocks (b1-b3). For the attention diagram of the behavioral encoder, Figure 4b shows the calculation of the DTW distance of the time series on different channels and marks a block (b4). Figure 4c shows an analysis of the time-dependent attention graph, and Figure 4d shows the calculation of the Euclidean distance of different behaviors for each time step, since there is no timeline at the same point in time and thus DTW is not required. In Figure 5, the original time series for the corresponding channel is plotted. In the later analysis, channel12 is used for student break time (abbreviated c12).  
Figure 4: (**a**) Time Encoder attention map (upper-left); (**b**) Time Encoder DTW (upper-right); (**c**) Behavior Encoder attention map (bottom–left); (**d**) Behavior Encoder L2 distance (bottom–right).  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Time Encoder** & **Behavior Encoder** & \begin{tabular}{c} **Time Encoder + Behavior** \\ **Encoder + Fusion** \\ \end{tabular} & \
\begin{tabular}{c} **Step Encoder + Gate** \\ **Encoder + Gate** \\ \end{tabular} &
\begin{tabular}{c} **TSIN** \\ \end{tabular} \\ \hline AUSLAN & 89.05 & 91.51 & 87.09 & 91.51 & **94.04** \\ ArabicDigits & 96.59 & 98.09 & 97.82 & **98.36** & 98.09 \\ CMUsubject16 & 96.55 & 89.66 & 93.10 & 89.66 & **100.00** \\ CharacterTrajectories & 91.59 & 96.25 & 95.86 & 96.36 & **97.03** \\ ECG & 83.00 & 86.00 & 85.00 & 85.00 & **87.00** \\ JapaneseVowels & 94.32 & 96.76 & 96.49 & 96.22 & **97.84** \\ Libras & 57.22 & 86.67 & 77.78 & 86.67 & **87.22** \\ UWave & 75.57 & **89.29** & 85.55 & 87.89 & 88.66 \\ Wafer & 91.74 & 97.99 & 96.44 & 97.66 & **98.88** \\ WalkvsRun & **100.00** & **100.00** & **100.00** & **100.00** & **100.00** \\ STU & 81.06 & 80.43 & 79.45 & 78.89 & **81.45** \\ \hline \hline \end{tabular}
\end{table}
Table 3: Ablation study of the Time Encoder, Behavior Encoder, Intermediate Fusion Module and gating in the TSIN.  
From Figure 4a, it can be seen that b2 has a relatively high attention score, that is, c6 (students' dinner consumption time) is highly correlated with c12 (students' rest time). From Figure 5, it can be clearly seen that c6 and c11 have relatively similar shapes and trends. b1 and b3 have lower attention scores. Both c5 (the amount students spend on lunch) and c7 (the amount students spend on dinners) show very different and even opposite trends compared to c12 (students' rest time). It can be seen that the behavioral attention learned by the model from the time series can capture similar sequences, which work together to make the output of the model constantly fit the real label.  
Figure 4b shows the DTW of the Time Encoder, where b4 represents a very small DTW distance between c5 and c12. However, it can be seen from Figure 5 that c12 and c5 are very different in both trend and shape, which indicates that the size of DTW distance matrix has little influence on the attention calculation of the Behavior Encoder. For the Behavior Encoder, since the correlation between behaviors is at the same time point, the special Euclidean distance of DTW at the same time point is used as the distance measure. Through the analysis of the behavioral attention diagram and the Euclidean distance matrix in Figure 4c,d, it is found that the distance and shape similarity between time series have an effect on the calculation of the attention fraction in the TSIN, but the effect is not obvious.