# Dynamic Spatial-Temporal Self-Attention Network for Traffic Flow Prediction
## 5 Experiments
### Baselines  
To thoroughly validate the advantages of the DSTSAN model, this method performed comparative experiments with 11 representative baseline methods. These methods were  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Datasets** & **Nodes** & **Edges** & **Samples** & **Time Span** \\ \hline PEMS03 & 358 & 547 & 26,208 & 3 months \\ PEMS04 & 307 & 340 & 16,992 & 2 months \\ PEMS07 & 883 & 866 & 28,224 & 3 months \\ PEMS08 & 170 & 295 & 17,856 & 2 months \\ \hline \hline \end{tabular}
\end{table}
Table 1: Statistics of datasets.  
Figure 6: The output layer.  
selected based on their availability of the open-source code and are considered to be representative of the field. The selected baselines cover a range of approaches, including traditional time series prediction models, neural network-based models, Graph Neural Network-based models, and some of the more recent advanced methods.
* _Vector Autoregression Model_ (VAR) [56]: The model first assumes a smooth historical time series state and then accomplishes the forecasting task by estimating the relationship between the time series and its lagged values;
* _Autoregressive Integrated Moving Average Model_ (ARIMA) [19]: The model extracts the time series patterns hidden in the data by means of data autocorrelation and differencing, and then completes the prediction task through these patterns;
* _Fully Connected Long Short-Term Memory Model_ (FC-LSTM) [67]: A Long Short-Term Memory network model with fully connected hidden units that can effectively capture dependencies in time series data;
* _Diffusion Convolutional Recurrent Neural Network_ (DCRNN) [4]: The model integrates the features of bidirectional diffusion graph convolution and Recurrent Neural Networks to predict traffic flow accurately;
* _Graph WaveNet_[37]: The model adopts a hierarchical composition of Gate TCN (Temporal Convolutional Network) modules and GCN (Graph Convolutional Network) modules to model the spatial-temporal correlations in the traffic data effectively;
* _Spatial-Temporal Graph Convolutional Networks_ (STGCNs) [2]: The model integrates Chebyshev graph convolution with 1D temporal convolution to effectively capture comprehensive spatial-temporal dependency features in the traffic data;
* _Spatial-Temporal Fusion Graph Neural Networks_ (STFGNNs) [39]: The model leverages the fusion of spatial graphs and temporal graphs to capture hidden spatiotemporal dependencies in the traffic data effectively;
* _Dynamic Spatial-Temporal Aware Graph Neural Networks_ (DSTAGNNs) [44]: The model incorporates dynamic spatial-temporal perception graph and improved gate convolutional modules to capture the inherent spatiotemporal dynamic features of the traffic data effectively;
* _Graph Multi-Attention Network_ (GMAN) [29]: The multilevel attention model captures the dynamic spatiotemporal dependencies in the traffic data by stacking various attention modules, including spatial attention, temporal attention, and self-attention;
* _Spatial-Temporal Graph Neural Controlled Differential Equations_ (STG-NCDEs) [59]: The temporal dynamics of the traffic data are modelled using the neural control differential equations, while leveraging the Graph Convolutional Networks to capture the spatial dependencies among different data points;
* _Propagation Delay-aware Dynamic Long-range Transformer_ (PDFormer) [13]: The model utilises the self-attention mechanism to capture the dependencies in the traffic data. It introduces different graph mask matrices to model local spatial dependencies and global spatial dependencies separately. Additionally, the model incorporates a traffic delay perception feature module to address the issue of time delay in the spatial information propagation process.