# Predicting Vessel Trajectories Using ASTGCN with StemGNN-Derived Correlation Matrix
## 5 Experiment and Analysis
### Experimental Results Analysis
Among them, it can be seen from the prediction of CNN_LSTM_CBAM and TCN that although the relevant models introduce standard convolution technology, which is helpful for trajectory prediction, they only consider the local information of each position of the input data, ignoring the important information of the time dimension. This makes these models limited in making full use of the timing feature information in vessel trajectories. In contrast, graph-based trajectory models such as StemGNN, STGCN, and ASTGCN are more suitable for dealing with vessel trajectories with complex nonlinear relationships. These models can capture the dependencies between features and the pattern information in time series to provide more reliable and stable trajectory prediction results. To verify the robustness and generalizability of the model on different datasets, the trajectory data from April 2023 were used in this study to validate the model, and the experimental results are shown in Table 4. From the data in the table, it can be seen that the prediction accuracy of ASTGCN is higher than that of all other models. Combined with Table 3, it can be seen that when the collective data volume is small, the prediction accuracy of convolution-based models such as CNN_LSTM_CBAM and TCN is lower, while graph-based prediction models can still produce more accurate predictions on smaller volume datasets due to their ability to capture the dependencies between features. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Train**} & \multicolumn{2}{c}{**Val**} & \multicolumn{2}{c}{**Test**} \\ \cline{2-7}  & **MAE** & **MSE** & **MAE** & **MSE** & **MAE** & **MSE** \\ \hline CNN\_LSTM\_CBAM & 0.00660 & 0.00370 & 0.00760 & 0.004600 & 0.1980 & 0.0950 \\ TCN & 0.00094 & 0.00017 & 0.00150 & 0.000287 & 0.0433 & 0.0056 \\ StemGNN & 0.00060 & 0.00014 & 0.00060 & 0.000190 & 0.0230 & 0.0048 \\ STGCN & 0.00070 & 0.00013 & 0.00078 & 0.000160 & 0.0270 & 0.0043 \\ ASTGCN & 0.00060 & 0.00016 & 0.00060 & 0.000160 & 0.0227 & 0.0041 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Trajectory prediction accuracy of each model. In summary, the accuracy of vessel trajectory prediction of the ASTGCN model is significantly better than that of other models on each data set, especially on training and verification data sets, and the error is stable and kept at a low level. This shows that the ASTGCN model has high trajectory prediction accuracy and good generalization ability, and that it can effectively adapt to various vessel trajectory data. Additionally, ASTGCN possesses a certain level of interpretability when performing trajectory prediction. During the training process, after the training of the StemGNN model is completed, the attention matrix in the Latent correlation layer is displayed in the form of a heat map, and the dependence between feature nodes can be visually observed, as shown in Figure 6. In training the ASTGCN network, we use StemGNN's attention matrix as a prior input. After completing the training, the attention matrix was visualized in both spatio-temporal and temporal dimensions, as shown in Figure 7. The visualization reveals significant interactions between different time steps in the temporal dimension. In the spatial dimension, the ship's motion speed (SOG) and steering angular velocity (ROT) have a greater effect on the variables lon, lat, and time, while the interactions among the other variables are weaker. The visual result of this dependence relationship is in accord with the actual motion principle of the vessel. The computational complexity of the ASTGCN model is mainly affected by the graph convolution layer and the attention mechanism.