## 4 Experiments and Results
### Discussions  
The experimental results provide evidence of the superiority of the SA-ConvLSTM-based encoder-decoder structural model. The SA-ConvLSTM consistently outperformed its ConvLSTM counterpart in all evaluated metrics, including SSIM, MAE, and MSE. The SA-ConvLSTM 2-layer model achieved an SSIM of 0.8917, whereas the ConvLSTM 3-layer model achieved an SSIM of 0.8386, indicating a significant improvement in structural similarity between the predicted frames. Similarly, the MAE and MSE values for the SA-ConvLSTM model were significantly lower, indicating that it provided more accurate predictions with fewer errors.  
The proposed model using the MSE loss function has a smoothing effect by smoothing out sharp changes, but this can lead to a lag in the prediction. This is because even if the actual value changes rapidly, the model does not reflect the change immediately because of the MSE penalty, but follows it gradually. This averaging effect also affects the detection speed. When rapid changes need to be detected in real time, MSE-based models do not capture the changes immediately due to the averaging process and need to accumulate data over a period of time, which can slow down the detection rate, which can be a limitation in applications where real time is important. In this study, we used the MSE loss function because our focus was on improving prediction accuracy.  
One of the key findings of this study is the importance of model depth in capturing spatiotemporal features. Multi-layer encoder-decoder structures consistently provided better predictions than single-layer models. This is consistent with the general trend in deep learning, where increasing the depth leads to better feature representation and consequently, better performance. Notably, the 3-layer SA-ConvLSTM model performed the best overall, highlighting the synergistic effect of combining the self-attention mechanism with a deep encoder-decoder architecture. The introduction of the self-attention mechanism is not just a technical tweak but represents a significant advance in the way we process spatiotemporal information and utilize it for predicting future frames, which is a major challenge in the field of video prediction. However, the improved performance of the  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Models**} & \multicolumn{3}{c}{**MovingMNIST/KTH**} & **Inference** & \multirow{2}{*}{**\#Params**} \\ \cline{2-2} \cline{4-5}  & **SSIM** & **MAE** & **MSE** & **Time (ms)** & \\ \hline ConvLSTM 1 layer & 0.7197/ & 586.86/ & 74.45/ & \multirow{2}{*}{16} & \multirow{2}{*}{175,081} \\  & 0.8097 & 115.19 & 54.16 & & \\ \hline ConvLSTM 2 layers & 0.8212/ & 159.92/ & 62.72/ & \multirow{2}{*}{38} & \multirow{2}{*}{405,961} \\  & 0.8535 & 189.77 & 55.22 & & \\ \hline ConvLSTM 3 layers & 0.8386/ & 148.25/ & 58.84/ & \multirow{2}{*}{44} & \multirow{2}{*}{636,841} \\  & 0.8613 & 116.83 & 30.26 & & \\ \hline SA-ConvLSTM 1 layer & 0.7661/ & 324.70/ & 64.00/ & \multirow{2}{*}{250} & \multirow{2}{*}{889,001} \\  & 0.9005 & 139.38 & 36.08 & & \\ \hline SA-ConvLSTM 2 layers & 0.8917/ & 91.11/ & 41.03/ & \multirow{2}{*}{508} & \multirow{2}{*}{1,834,121} \\  & 0.9121 & 113.49 & 22.29 & & \\ \hline SA-ConvLSTM 3 layers & 0.8890/ & 82.62/ & 40.64/ & \multirow{2}{*}{763} & \multirow{2}{*}{2,779,241} \\  & 0.9036 & 144.54 & 44.89 & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of ConvLSTM and SA-ConvLSTM encoder–decoder models.  
SA-ConvLSTM model comes at the the expense of increased computational complexity. The number of parameters in the SA-ConvLSTM model was significantly greater than that in the ConvLSTM model, which resulted in longer training times. This trade-off between performance and computational efficiency is a common challenge in deep learning and should be carefully considered when deploying these models in real-world applications.