## Materials and Methods
### The Architecture of Our Designed Network  
**Overview:** As presented in Figure 4, the GSTGCN model proposed in this paper contains three independent spatial-temporal components with the same structure and an external component. The first three spatial-temporal components are designed to model the recent, daily-periodic, and weekly-periodic dependencies of the historical speed data, respectively, and the external component extracts the characteristics of external factors, such as weather condition, time of the day, and day of the week, to model external impacts on traffic speed. The first three spatial-temporal modules have the same structure. Each of them is composed of a temporal module with multiple stacked residual blocks and a global correlated spatial module. The global correlated spatial module models the localized spatial dependencies and the global spatial correlations of traffic data, respectively. We first construct an adjacency matrix based on the points of interest (POI) data around the sensors and the related features of the road segments. Then, we intercept three time series segments \(\mathcal{X}_{h}\), \(\mathcal{X}_{d}\), and \(\mathcal{X}_{w}\) from the traffic data along the time axis as inputs to the three spatial-temporal components. Next, we extract the characteristics of external factors and enter them into the external component. After that, the outputs of the first three spatial-temporal components \(Y_{h}\), \(Y_{d}\), and \(Y_{w}\) are assigned different weights and then fused into the output \(Y_{res}\). Then, we merge the \(Y_{res}\) with the output of the external component \(Y_{ext}\) to generate the prediction result. Finally, we utilize a tanh function to map the result into \([-1,1]\)[38]. Figure 4: The architecture of GSTGCN. **Adjacency Matrix Construction. ** Previous studies have only used the distances between sensors to construct the adjacency matrix, which represents the topological structure of the road network. However, even if two sensors are geographically far apart, they may have similar traffic conditions when they are in similar functional areas. Therefore, we consider not only the distance between the sensors, but also the similarity of the regions in which they are located to construct the adjacency matrix. More specifically, we first use the Dijkstra algorithm to calculate the distances between pairs of sensors in the road network, \(dist(i,j)\) represents the distance between sensor \(i\) and sensor \(j\). Next, we use Openstreetmap [39] mapping each sensor to the corresponding road segment and collect the properties of the segment as the road-related features of sensors, which includes speed_limit, lanes, length, etc. Then, we obtain the number of points of interest (POIs) of ten categories within 500 m around the detector from FourSquare [40] as POI relevant features, which contain travel and transport, food, arts and entertainment, residence, etc. Finally, we splice the road-related features and POI data to form a feature vector \(E^{r}\). The form is defined as:  
\[E^{r}=(poi_{1},...,poi_{10}, lanes,speed\_limit,type,length,is\_ bridge,oneway) \tag{2}\]  
where \(poi_{i}\) is the number of points of interest of the \(i\)th category. The details of road-related features are presented in Table 1. Therefore, we calculate the similarity of sensor \(i\), \(j\) using the cosine similarity formula [41]:  
\[sim(i,j)=\frac{\sum\limits_{m=1}^{C}E^{r}_{i,m}\times E^{r}_{j,m}}{||E^{r}_{i} ||\times||E^{r}_{j}||} \tag{3}\]  
where \(C\) is the length of feature vector and \(E^{r}_{i}\) represents the feature vector of sensor \(i\). Finally, we use threshold-based Gaussian kernel [42] to calculate the adjacency matrix; the formula is as follows:  
\[W_{i,j}= \begin{cases}B_{i,j}=w_{1}exp(-\frac{dist(i,j)^{2}}{2\sigma_{1}^{2}})+ w_{2}exp(-\frac{(1-sim(i,j))^{2}}{2\sigma_{2}^{2}})&\text{if }B_{i,j}\geq\kappa\\ 0&\text{otherwise}\end{cases}