## 4 Experiment
### Temporal and Spatial Attention Mechanism  
This section discusses the temporal and spatial attention scores at different prediction horizons. The temporal attention score for the prediction of shared-bike rental demand in the test dataset is visualized in Figure 6. Specially, Figure 6a-d represent the 15-min, 30-min, 45-min, and 60-min prediction horizon, respectively, and they all use two-hour history demand ahead of the target prediction time. The temporal attention mechanism can capture the important time-dimensional bike-sharing usage information. For example, the bike-sharing usage demand in the previous hour may have a certain influence on that in the next hour. The smaller time granularity can identify the time-dimensional bike-sharing usage information better and give a clearer overall picture. The historical time step index represents the time steps that the model looks back on from the historical time period. A smaller index means a closer time step to the prediction time. The temporal attention score represents the importance of bike-sharing usage demand in the corresponding time steps. The attention score will sum to 1 at different prediction horizons, respectively. For each prediction horizon, the temporal attention scores visualized in the figure is the average value of each time step from all the bike-sharing stations. From Figure 6a-d, all prediction horizons demonstrate that the closest historical data will always give the largest contribution to the prediction results. It is reasonable because the travel of bike-sharing will not last for a very long time; 90% bike-sharing travel takes less than 30 min [54]. It makes the usage of bike-sharing from the closest time period have the highest temporal correlation with the prediction period. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Variables** & **RMSE** & **MAE** \\ \hline STGA-LSTM (historical data only) & 0.8979 & 0.5418 \\ STGA-LSTM (POs and road density data) & 0.8966 & 0.5407 \\ STGA-LSTM (hourly weather data) & 0.8969 & 0.5413 \\ STGA-LSTM (personal data) & 0.8956 & 0.5395 \\ STGA-LSTM (full data) & 0.8919 & 0.5415 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Predictive performance of the different exogenous variables. Figure 6: Temporal attention score for each time step of the different prediction horizons. (**a**) 15-min horizon; (**b**) 30-min horizon; (**c**) 45-min horizon; (**d**) 60-min horizon. A visualization map of the spatial attention score can be found in Figure 7. Specially, Figure 7a-d represent the 15-min, 30-min, 45-min, and 60-min prediction horizon, respectively, and the line between the two stations represents the interaction between these two stations. The width of the blue line shows the value of the attention score among stations. The wider the line is, the stronger the interaction they have between two stations. The spatial attention mechanism could find the important space-dimensional bike-sharing usage information that can influence the usage demand of the bike-sharing stations. The bike-sharing usage demand is not only related to usage pattern of the rent/return bike-sharing stations, but also may be related to the stations around them. In Figure 7a-d, all the prediction horizons demonstrate that the density of the bike-sharing stations is an important factor that influences the correlation among stations. Stations always have a wider line connecting to those stations close to them, which means they have a stronger spatial connection to these stations. We can also see more connections among stations at a higher density area, and the usage of bike-sharing is higher in this area because of the convenience. When an area has a high density of bike-sharing stations, users can have multiple station choices when renting or returning the shared bikes. The walking distance among those stations is acceptable for users to switch from one station to another, which makes these stations more closely correlated [55].